Fix for Issue N_SE-45284, N_SE-45256, N_SE-45023
authorGaurav Bhatt <gaurav.bhatt@samsung.com>
Mon, 8 Jul 2013 12:32:28 +0000 (18:02 +0530)
committerChangyong Jeon <fin10.jeon@samsung.com>
Tue, 9 Jul 2013 00:57:12 +0000 (09:57 +0900)
Change-Id: I417c9c4c2c2f467a86c5f881d9db4a6c9fcd28d5
Signed-off-by: Gaurav Bhatt <gaurav.bhatt@samsung.com>
inc/ClCalendarSelectorPopup.h
src/ClCalendarSelectorPopup.cpp
src/ClEventDeleterForm.cpp
src/ClReminderForm.cpp

index b797a04..19cb9ea 100644 (file)
@@ -29,6 +29,7 @@
 class CalendarSelectorPopup
        : public Tizen::Ui::Controls::Popup
        , public virtual Tizen::Ui::IActionEventListener
+       , public virtual Tizen::Ui::IPropagatedKeyEventListener
        , public virtual Tizen::Ui::Controls::ITableViewItemProvider
        , public virtual Tizen::Ui::Controls::ITableViewItemEventListener
 {
@@ -50,6 +51,11 @@ public:
        virtual int GetItemCount(void);
        virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
 
+       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;};
+
        virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated);
        virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView, int itemIndexFrom, int itemIndexTo);
        virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
index 78ae862..0349e6d 100644 (file)
@@ -138,6 +138,7 @@ result
 CalendarSelectorPopup::OnInitializing(void)
 {
        AppLogDebug("Enter");
+       SetPropagatedKeyEventListener(this);
        TableView* pTableView = static_cast<TableView*>(GetControl(L"IDC_TABLEVIEW"));
        pTableView->SetItemProvider(this);
        pTableView->AddTableViewItemEventListener(*this);
@@ -149,10 +150,23 @@ CalendarSelectorPopup::OnInitializing(void)
        return E_SUCCESS;
 }
 
+bool
+CalendarSelectorPopup::OnKeyReleased(Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo)
+{
+       AppLogDebug("%d", keyEventInfo.GetKeyCode());
+       if (keyEventInfo.GetKeyCode() == KEY_BACK)
+       {
+               SetShowState(false);
+       }
+
+       return false;
+}
+
 result
 CalendarSelectorPopup::OnTerminating(void)
 {
        AppLogDebug("Enter");
+       SetPropagatedKeyEventListener(null);
        return E_SUCCESS;
 }
 
index c4dd9f7..65f9211 100644 (file)
@@ -818,7 +818,13 @@ EventDeleterForm::OnActionPerformed(const Control& source, int actionId)
                                int itemCount = __pGroupedListViewDeleteList->GetItemCountAt(i);
                                for (int j = 0; j < itemCount; j++)
                                {
-                                       __pGroupedListViewDeleteList->SetItemChecked(i, j, true);
+                                       const CalEventInstance* pEventInst = __pPm->GetEventWithWholeIndex(i - startGroupIndex, j);
+                                       if (pEventInst != null)
+                                       {
+                                               RecordId id = pEventInst->GetOriginalEventId();
+                                               __pSelectedEvent->Add(new (std::nothrow) Integer(id));
+                                               __pGroupedListViewDeleteList->SetItemChecked(i, j, true);
+                                       }
                                }
                        }
                        __pSelectAll->SetSelected(IsSelectedAllEvent());
@@ -834,7 +840,13 @@ EventDeleterForm::OnActionPerformed(const Control& source, int actionId)
                                int itemCount = __pGroupedListViewDeleteList->GetItemCountAt(i);
                                for (int j = 0; j < itemCount; j++)
                                {
-                                       __pGroupedListViewDeleteList->SetItemChecked(i, j, false);
+                                       const CalEventInstance* pEventInst = __pPm->GetEventWithWholeIndex(i - startGroupIndex, j);
+                                       if (pEventInst != null)
+                                       {
+                                               RecordId id = pEventInst->GetOriginalEventId();
+                                               __pSelectedEvent->Remove(Integer(id));
+                                               __pGroupedListViewDeleteList->SetItemChecked(i, j, false);
+                                       }
                                }
                        }
                        __pSelectAll->SetSelected(IsSelectedAllEvent());
index 08135b9..b1453ad 100644 (file)
@@ -108,6 +108,8 @@ ReminderForm::OnTerminating(void)
 void
 ReminderForm::OnTextValueChanged(const Control& source)
 {
+       __pEditFieldReminderTime->SetEnabled(true);
+
        int timeOffset = 0;
        __customReminderTimeOffset = __pEditFieldReminderTime->GetText();
        Integer::Parse(__customReminderTimeOffset, timeOffset);
@@ -134,6 +136,7 @@ ReminderForm::OnTextValueChanged(const Control& source)
        default:
                break;
        }
+       __pEditFieldReminderTime->Invalidate(false);
        __pButtonReminderTimeUnit->SetText(__customReminderTimeUnitText);
        __pButtonReminderTimeUnit->Invalidate(false);
 }