Fix for N_SE-49387
authorGaurav Bhatt <gaurav.bhatt@samsung.com>
Wed, 21 Aug 2013 12:35:11 +0000 (18:05 +0530)
committerGaurav Bhatt <gaurav.bhatt@samsung.com>
Wed, 21 Aug 2013 12:35:11 +0000 (18:05 +0530)
Change-Id: I4afe4adae296aa14ae19c0bcc792e1a941e20fad
Signed-off-by: Gaurav Bhatt <gaurav.bhatt@samsung.com>
inc/ClEventDeleterForm.h
inc/ClEventSearcherForm.h
inc/ClListPanel.h
inc/ClTypes.h
src/ClEventDeleterForm.cpp
src/ClEventSearcherForm.cpp
src/ClListPanel.cpp
src/ClTypes.cpp

index aedff07..1608231 100644 (file)
@@ -40,6 +40,7 @@ class EventDeleterForm
        , public virtual Tizen::Ui::Controls::IGroupedListViewItemEventListener
        , public virtual Tizen::Ui::Controls::IGroupedListViewItemProvider
        , public virtual Tizen::Ui::Scenes::ISceneEventListener
+       , public virtual Tizen::System::ISettingEventListener
        , public virtual ICalendarEventChangedEventListener
 {
 public:
@@ -77,6 +78,8 @@ public:
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                                const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
+       virtual void OnSettingChanged(Tizen::Base::String& key);
+
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnCalendarEventChanged(void);
index de1de34..2a42b1c 100644 (file)
@@ -41,6 +41,7 @@ class EventSearcherForm
        , public virtual Tizen::Ui::Controls::IGroupedListViewItemEventListener
        , public virtual Tizen::Ui::Controls::IGroupedListViewItemProvider
        , public virtual Tizen::Ui::Scenes::ISceneEventListener
+       , public virtual Tizen::System::ISettingEventListener
        , public virtual ICalendarEventChangedEventListener
 {
 public:
@@ -82,6 +83,7 @@ public:
                                                                           const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                                const Tizen::Ui::Scenes::SceneId& nextSceneId);
+       virtual void OnSettingChanged(Tizen::Base::String& key);
 
        virtual void OnKeypadWillOpen(Tizen::Ui::Control& source);
        virtual void OnKeypadOpened(Tizen::Ui::Control& source);
index 7639dcc..4f6c9e0 100644 (file)
@@ -43,6 +43,7 @@ class ListPanel
        , public virtual Tizen::Ui::Controls::IGroupedListViewItemEventListener
        , public virtual Tizen::Ui::Controls::IGroupedListViewItemProvider
        , public virtual Tizen::Ui::Scenes::ISceneEventListener
+       , public virtual Tizen::System::ISettingEventListener
        , public virtual ICalendarEventChangedEventListener
        , public virtual ICurrentDateChangedEventListener
 {
@@ -79,6 +80,8 @@ public:
        virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
                                                                                const Tizen::Ui::Scenes::SceneId& nextSceneId);
 
+       virtual void OnSettingChanged(Tizen::Base::String& key);
+
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnCalendarEventChanged(void);
index 48915b9..b069529 100644 (file)
@@ -265,6 +265,7 @@ extern const wchar_t* KEY_NOTIFICATION_MANAGER_APP_MESSAGE;
 extern const wchar_t* KEY_DATA_RETURN_RESULT;
 extern const wchar_t* KEY_SYSTEM_24_HOUR_NOTATION_ENABLED;
 extern const wchar_t* KEY_SYSTEM_COUNTRY;
+extern const wchar_t* KEY_SYSTEM_DATE;
 extern const wchar_t* KEY_SYSTEM_FIRST_DAY_OF_WEEK;
 extern const wchar_t* KEY_SYSTEM_LANGUAGE;
 extern const wchar_t* KEY_SYSTEM_TIME_FORMAT;
index ec20b38..7983202 100644 (file)
@@ -170,6 +170,7 @@ EventDeleterForm::OnInitializing(void)
        }
 
        SetFormBackEventListener(this);
+       Tizen::System::SettingInfo::AddSettingEventListener(*this);
        Footer* pFooter = GetFooter();
        pFooter->AddActionEventListener(*this);
 
@@ -241,7 +242,7 @@ EventDeleterForm::OnTerminating(void)
            delete __pSelectedEvent;
        }
 
-
+       Tizen::System::SettingInfo::RemoveSettingEventListener(*this);
        return E_SUCCESS;
 }
 
@@ -728,6 +729,15 @@ EventDeleterForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneI
 }
 
 void
+EventDeleterForm::OnSettingChanged(Tizen::Base::String& key)
+{
+       if (key.Equals(KEY_SYSTEM_DATE,false))
+       {
+               __pGroupedListViewDeleteList->UpdateList();
+       }
+}
+
+void
 EventDeleterForm::OnActionPerformed(const Control& source, int actionId)
 {
        TwoButtonPopupStyle style = TWO_BUTTON_POPUP_STYLE_SINGLE_EVENT;
index baca8e5..ed24387 100644 (file)
@@ -130,6 +130,7 @@ EventSearcherForm::OnInitializing(void)
        __pGroupedListViewEvents->AddGroupedListViewItemEventListener(*this);
 
        SetFormBackEventListener(this);
+       Tizen::System::SettingInfo::AddSettingEventListener(*this);
 
        __pSharePopup = new (std::nothrow) SharePopup();
        __pSharePopup->Initialize();
@@ -174,6 +175,7 @@ EventSearcherForm::OnTerminating(void)
        {
                __pTwoButtonPopup->Destroy();
        }
+       Tizen::System::SettingInfo::RemoveSettingEventListener(*this);
        return E_SUCCESS;
 }
 
@@ -420,6 +422,15 @@ EventSearcherForm::OnSceneDeactivated(const SceneId& currentSceneId, const Scene
 }
 
 void
+EventSearcherForm::OnSettingChanged(Tizen::Base::String& key)
+{
+       if (key.Equals(KEY_SYSTEM_DATE,false))
+       {
+               __pGroupedListViewEvents->UpdateList();
+       }
+}
+
+void
 EventSearcherForm::OnKeypadWillOpen(Control& source)
 {
 }
index bc436f1..f656693 100644 (file)
@@ -154,6 +154,7 @@ ListPanel::OnInitializing(void)
        __pGroupedListViewEventsList->SetTextOfEmptyList(ResourceManager::GetString(IDS_CLD_BODY_NO_EVENTS));
        __pGroupedListViewEventsList->SetBitmapOfEmptyList(ResourceManager::GetBitmapN(IDB_LIST_VIEW_NO_CONTENTS_TEXT));
        __pGroupedListViewEventsList->AddGroupedListViewItemEventListener(*this);
+       Tizen::System::SettingInfo::AddSettingEventListener(*this);
 
        __pDateFormatter = ResourceManager::CreateDateFormatterN(DATE_TIME_STYLE_SHORT);
 
@@ -199,6 +200,7 @@ ListPanel::OnTerminating(void)
                __pGoToDatePopup->Destroy();
        }
 
+       Tizen::System::SettingInfo::RemoveSettingEventListener(*this);
        return E_SUCCESS;
 }
 
@@ -658,6 +660,15 @@ ListPanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& next
 }
 
 void
+ListPanel::OnSettingChanged(Tizen::Base::String& key)
+{
+       if (key.Equals(KEY_SYSTEM_DATE,false))
+       {
+               __pGroupedListViewEventsList->UpdateList();
+       }
+}
+
+void
 ListPanel::OnActionPerformed(const Control& source, int actionId)
 {
 }
index 577c5ec..2fb183a 100644 (file)
@@ -258,6 +258,7 @@ const wchar_t* KEY_SOCIAL_RESULT_TYPE = L"http://tizen.org/appcontrol/data/socia
 const wchar_t* KEY_NOTIFICATION_MANAGER_APP_MESSAGE = L"http://tizen.org/appcontrol/data/notification";
 const wchar_t* KEY_SYSTEM_24_HOUR_NOTATION_ENABLED = L"http://tizen.org/setting/locale.time.format.24hour";
 const wchar_t* KEY_SYSTEM_COUNTRY = L"http://tizen.org/setting/locale.country";
+const wchar_t* KEY_SYSTEM_DATE = L"http://tizen.org/setting/locale.date";
 const wchar_t* KEY_SYSTEM_FIRST_DAY_OF_WEEK = L"http://tizen.org/setting/locale.week.format.firstday";
 const wchar_t* KEY_SYSTEM_LANGUAGE = L"http://tizen.org/setting/locale.language";
 const wchar_t* KEY_SYSTEM_TIME_FORMAT = L"http://tizen.org/setting/locale.time.format";