summaryrefslogtreecommitdiff
path: root/project/src/MainForm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'project/src/MainForm.cpp')
-rwxr-xr-xproject/src/MainForm.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/project/src/MainForm.cpp b/project/src/MainForm.cpp
index 0696f39..ef52113 100755
--- a/project/src/MainForm.cpp
+++ b/project/src/MainForm.cpp
@@ -52,6 +52,7 @@ MainForm::MainForm(void)
, __pFriendListForm(null)
, __connManager(this)
, __friendImagePath(L"")
+ , __isOnForeground(true)
{
}
@@ -158,6 +159,10 @@ void
MainForm::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition,
const Tizen::Ui::TouchEventInfo& touchInfo)
{
+ result r = E_SUCCESS;
+
+ TryReturnVoid(__isOnForeground == true, "ImageViewer is on initializing.");
+
if (source.Equals(*__pFriendProfileLabel))
{
// shows the detailed image of the connected friend by using the Image AppControl.
@@ -167,7 +172,11 @@ MainForm::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics
if (__pImageAppControl != null)
{
- __pImageAppControl->Start(&uri, null, null, null);
+ r = __pImageAppControl->Start(&uri, null, null, null);
+ if (r == E_SUCCESS)
+ {
+ __isOnForeground = false;
+ }
delete __pImageAppControl;
}
}
@@ -475,3 +484,10 @@ MainForm::CloseNoticePopup(void)
delete __pNoticePopup;
__pNoticePopup = null;
}
+
+void
+MainForm::SetOnForeground(bool isOnForeground)
+{
+ __isOnForeground = isOnForeground;
+}
+