From ceee01de8739e8f763181704361830a97a10cec0 Mon Sep 17 00:00:00 2001 From: Changyong Jeon Date: Thu, 4 Jul 2013 16:03:09 +0900 Subject: [PATCH] fix jira issue N_SE-44683 Change-Id: Ic03e8689d65fc9e102791cd6a39b51e5a4728f78 --- inc/ClGoToDatePopup.h | 5 +++++ src/ClEventSearcherForm.cpp | 1 - src/ClGoToDatePopup.cpp | 17 +++++++++++++++++ src/ClListPanel.cpp | 1 - src/ClMonthPanel.cpp | 1 - 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/inc/ClGoToDatePopup.h b/inc/ClGoToDatePopup.h index e3a88e0..fdb610a 100644 --- a/inc/ClGoToDatePopup.h +++ b/inc/ClGoToDatePopup.h @@ -28,6 +28,7 @@ class GoToDatePopup : public Tizen::Ui::Controls::Popup , public virtual Tizen::Ui::IActionEventListener + , public virtual Tizen::Ui::IPropagatedKeyEventListener { public: GoToDatePopup(void); @@ -40,6 +41,10 @@ public: virtual result OnTerminating(void); virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + virtual bool OnKeyPressed(Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo){return false;}; + virtual bool OnKeyReleased(Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo); + virtual bool OnPreviewKeyPressed(Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo){return false;}; + virtual bool OnPreviewKeyReleased(Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo){return false;}; private: Tizen::Base::DateTime __date; diff --git a/src/ClEventSearcherForm.cpp b/src/ClEventSearcherForm.cpp index ece5fba..baca8e5 100644 --- a/src/ClEventSearcherForm.cpp +++ b/src/ClEventSearcherForm.cpp @@ -147,7 +147,6 @@ EventSearcherForm::OnInitializing(void) __pContextItem->AddElement(IDA_EVENT_SEARCHER_CONTEXT_MENU_DELETE, ResourceManager::GetString(IDS_CLD_SK3_DELETE), true); __pContextItem->SetElementBackgroundColor(IDA_EVENT_SEARCHER_CONTEXT_MENU_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_BACKGROUND)); __pContextItem->SetElementBackgroundColor(IDA_EVENT_SEARCHER_CONTEXT_MENU_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND)); - __pContextItem->SetElementBackgroundColor(IDA_EVENT_SEARCHER_CONTEXT_MENU_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_HIGHLIGHTED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND)); __pContextItem->SetElementTextColor(IDA_EVENT_SEARCHER_CONTEXT_MENU_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_TEXT)); __pContextItemNoEdit = new (std::nothrow) ListContextItem(); diff --git a/src/ClGoToDatePopup.cpp b/src/ClGoToDatePopup.cpp index 4f2c730..729616a 100644 --- a/src/ClGoToDatePopup.cpp +++ b/src/ClGoToDatePopup.cpp @@ -62,6 +62,9 @@ GoToDatePopup::RequestPopup(const DateTime& initialDate, Control* pTarget) result GoToDatePopup::OnInitializing(void) { + AppLogDebug("Enter"); + SetPropagatedKeyEventListener(this); + __pEditDate = dynamic_cast(GetControl(L"IDC_EDITDATE")); __pEditDate->SetYearRange(Calendarbook::GetMinDateTime().GetYear() + 1, Calendarbook::GetMaxDateTime().GetYear() - 1); __pEditDate->SetDate(__date); @@ -86,6 +89,8 @@ GoToDatePopup::OnInitializing(void) result GoToDatePopup::OnTerminating(void) { + AppLogDebug("Enter"); + SetPropagatedKeyEventListener(null); return E_SUCCESS; } @@ -109,3 +114,15 @@ GoToDatePopup::OnActionPerformed(const Control& source, int actionId) break; } } + +bool +GoToDatePopup::OnKeyReleased(Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo) +{ + AppLogDebug("%d", keyEventInfo.GetKeyCode()); + if (keyEventInfo.GetKeyCode() == KEY_BACK) + { + SetShowState(false); + } + + return false; +} diff --git a/src/ClListPanel.cpp b/src/ClListPanel.cpp index b87159b..8f61aeb 100644 --- a/src/ClListPanel.cpp +++ b/src/ClListPanel.cpp @@ -461,7 +461,6 @@ ListPanel::CreateItem(int groupIndex, int itemIndex, int itemWidth) ResourceManager::GetString(IDS_CLD_SK3_DELETE), true); pContextItem->SetElementBackgroundColor(IDA_LIST_PANEL_CONTEXT_MENU_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_BACKGROUND)); pContextItem->SetElementBackgroundColor(IDA_LIST_PANEL_CONTEXT_MENU_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND)); - pContextItem->SetElementBackgroundColor(IDA_LIST_PANEL_CONTEXT_MENU_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_HIGHLIGHTED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND)); pContextItem->SetElementTextColor(IDA_LIST_PANEL_CONTEXT_MENU_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_TEXT_PRESSED)); __pContextItem = pContextItem; diff --git a/src/ClMonthPanel.cpp b/src/ClMonthPanel.cpp index d789415..a99c64d 100644 --- a/src/ClMonthPanel.cpp +++ b/src/ClMonthPanel.cpp @@ -692,7 +692,6 @@ MonthPanel::OnInitializing(void) ResourceManager::GetString(IDS_CLD_SK3_DELETE), true); __pContextItem->SetElementBackgroundColor(IDA_MONTH_PANEL_CONTEXT_MENU_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_BACKGROUND)); __pContextItem->SetElementBackgroundColor(IDA_MONTH_PANEL_CONTEXT_MENU_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND)); - __pContextItem->SetElementBackgroundColor(IDA_MONTH_PANEL_CONTEXT_MENU_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_HIGHLIGHTED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND)); __pContextItem->SetElementTextColor(IDA_MONTH_PANEL_CONTEXT_MENU_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_TEXT)); __pContextItemNoEdit = new (std::nothrow) ListContextItem(); -- 2.7.4