From 3ab36b7012880838fefb488e68c93eb92d5ac9e7 Mon Sep 17 00:00:00 2001 From: kamesh Date: Thu, 31 Oct 2013 11:52:57 +0530 Subject: [PATCH] NABI_SE Issue fix 56195 56192 Change-Id: Ied2f9374d661564f561e8919d442ce440d2e513b --- inc/CtGroupContactListForm.h | 1 + src/CtGroupContactListForm.cpp | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/inc/CtGroupContactListForm.h b/inc/CtGroupContactListForm.h index 4ffc429..b648581 100644 --- a/inc/CtGroupContactListForm.h +++ b/inc/CtGroupContactListForm.h @@ -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); diff --git a/src/CtGroupContactListForm.cpp b/src/CtGroupContactListForm.cpp index b386bbd..46f3431 100644 --- a/src/CtGroupContactListForm.cpp +++ b/src/CtGroupContactListForm.cpp @@ -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) { -- 2.7.4