NABI_SE Issue fix 56195 56192
authorkamesh <kamesh.kvss@samsung.com>
Thu, 31 Oct 2013 06:22:57 +0000 (11:52 +0530)
committerkamesh <kamesh.kvss@samsung.com>
Thu, 31 Oct 2013 06:22:57 +0000 (11:52 +0530)
Change-Id: Ied2f9374d661564f561e8919d442ce440d2e513b

inc/CtGroupContactListForm.h
src/CtGroupContactListForm.cpp

index 4ffc429..b648581 100644 (file)
@@ -116,6 +116,7 @@ public:
        virtual bool OnPreviewKeyPressed(Tizen::Ui::Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
        virtual bool OnPreviewKeyReleased(Tizen::Ui::Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
 
+       virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList * pArgs);
 private:
        void ShowDeletePopup(void);
        void HideDeletePopup(void);
index b386bbd..46f3431 100644 (file)
@@ -70,6 +70,8 @@ static const int W_CLOSE_BUTTON = 394;
 
 static const int FONT_SIZE_EMPTY_COMMENT = 32;
 
+static const RequestId  REQ_ID_MOVE_TO_GROUP_LIST = 1000;
+
 static const unsigned int COLOR_EMPTY_COMMENT = Color32<102, 102, 102>::Value;
 static const unsigned int COLOR_DELETE_BUTTON_NORMAL = Color32<213, 82, 82>::Value;
 static const unsigned int COLOR_DELETE_BUTTON_PRESSED = Color32<194, 71, 71>::Value;
@@ -357,7 +359,12 @@ GroupContactListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previo
                }
                else
                {
-                       __pPresentationModel->InitializeGroupContactList(__categoryId);
+                       result r = __pPresentationModel->InitializeGroupContactList(__categoryId);
+                       if (r == E_FAILURE)
+                       {
+                               SendUserEvent(REQ_ID_MOVE_TO_GROUP_LIST, null);
+                               return;
+                       }
                }
        }
 
@@ -470,6 +477,14 @@ GroupContactListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previo
                        __pEmptyCommentLabel->SetShowState(true);
                }
        }
+       else
+       {
+               if (previousSceneId.Equals(IDSCN_CONTACT_SELECTOR, true))
+               {
+                       SendUserEvent(REQ_ID_MOVE_TO_GROUP_LIST, null);
+                       return;
+               }
+       }
        __pPresentationModel->AddContactChangeListener(*this);
        pContactsApp->AddContactsAppChangeEventListener(*this);
 }
@@ -486,6 +501,15 @@ GroupContactListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curre
        __pAppControl = null;
 }
 
+void
+GroupContactListForm::OnUserEventReceivedN (RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+       if (requestId == REQ_ID_MOVE_TO_GROUP_LIST)
+       {
+               SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(IDSCN_GROUP_LIST));
+       }
+}
+
 int
 GroupContactListForm::GetGroupCount(void)
 {