Fix for N_SE-53581 N_SE-53559
authorAmith Kumar Mahale <amith.m@samsung.com>
Mon, 30 Sep 2013 14:40:43 +0000 (20:10 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Mon, 30 Sep 2013 14:40:43 +0000 (20:10 +0530)
Change-Id: I0204954ba232d57b17fda6c6076cfd232bd6d82e
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
src/ClEventDeleterForm.cpp
src/ClListPanel.cpp
src/ClSettingForm.cpp

index 29c88d5..d4d14be 100644 (file)
@@ -338,7 +338,7 @@ EventDeleterForm::GetGroupCount(void)
 
        }
 
-       if (groupCount != 0 && __topBottomItemEnabled == true)
+       if (__pPm->GetAllOriginalEventCount()  != 0 && __topBottomItemEnabled == true)
        {
                groupCount += TOP_BOTTOM_GROUP_ITEM_COUNT;
        }
@@ -533,7 +533,16 @@ EventDeleterForm::OnGroupedListViewItemStateChanged(GroupedListView& listView, i
 
                if (groupIndex == 0)
                {
-                       DateTime startDate = __pPm->GetDateTimeFromGroupIndex(0);
+                       bool bNoevent = false;
+                       DateTime startDate;
+                       if(__pPm->GetWholeDayCount() == 0)
+                       {
+                               bNoevent = true;
+                       }
+                       else
+                       {
+                               startDate = __pPm->GetDateTimeFromGroupIndex(0);
+                       }
                        DateTime minRange = __pPm->GetViewMinRange();
                        minRange.AddMonths(PREVIOUS_DATE);
                        DateTime minDateTime = Calendarbook::GetMinDateTime();
@@ -546,7 +555,15 @@ EventDeleterForm::OnGroupedListViewItemStateChanged(GroupedListView& listView, i
                        __pPm->SetViewRange(minRange, __pPm->GetViewMaxRange());
 
                        __pGroupedListViewDeleteList->RefreshList(0, 0, LIST_REFRESH_TYPE_ITEM_MODIFY);
-                       int addedGroupCount = __pPm->GetGroupIndex(startDate);
+                       int addedGroupCount = -1;
+                       if(bNoevent == false)
+                       {
+                               addedGroupCount = __pPm->GetGroupIndex(startDate);
+                       }
+                       else
+                       {
+                               addedGroupCount = __pPm->GetWholeDayCount();
+                       }
                        for (int i = 0; i < addedGroupCount; ++i)
                        {
                                __pGroupedListViewDeleteList->RefreshList(i + TOP_BOTTOM_ITEM_COUNT, -1, LIST_REFRESH_TYPE_ITEM_ADD);
index 46d76df..75fcd52 100644 (file)
@@ -706,8 +706,17 @@ ListPanel::RefreshGroups(int groupIndex)
 {
        if (groupIndex == 0)
                {
-                       DateTime startDate = __pPm->GetDateTimeFromGroupIndex(0);
+                       bool bNoevent = false;
+                       DateTime startDate;
                        int initialcount = __pGroupedListViewEventsList->GetGroupCount();
+                       if(__pPm->GetWholeDayCount() == 0)
+                       {
+                               bNoevent = true;
+                       }
+                       else
+                       {
+                               startDate = __pPm->GetDateTimeFromGroupIndex(0);
+                       }
                        DateTime minRange = __pPm->GetViewMinRange();
                        minRange.AddMonths(PREVIOUS_DATE);
                        DateTime minDateTime = Calendarbook::GetMinDateTime();
@@ -719,7 +728,15 @@ ListPanel::RefreshGroups(int groupIndex)
 
                        __pPm->SetViewType(VIEW_TYPE_LIST);
                        __pPm->SetViewRange(minRange, __pPm->GetViewMaxRange());
-                       int addedGroupCount = __pPm->GetGroupIndex(startDate);
+                       int addedGroupCount = -1;
+                       if(bNoevent == false)
+                       {
+                               addedGroupCount = __pPm->GetGroupIndex(startDate);
+                       }
+                       else
+                       {
+                               addedGroupCount = __pPm->GetWholeDayCount();
+                       }
 
                        __pGroupedListViewEventsList->RefreshList(0, 0, LIST_REFRESH_TYPE_ITEM_MODIFY);
                        for (int i = 0; i < addedGroupCount; ++i)
index 2ca35af..e349c01 100644 (file)
@@ -87,7 +87,8 @@ static const float H_ICON_SCALE = 0.514;
 static const int IDA_SETTING_FORM_PARSE_VCS_FILE_COMPLETE = 90001;
 static const int H_ITEM_MARGIN = 68;
 static const int W_APPROX = 35;
-
+static const int H_LIST_EXPAN_ICON = 72;
+static const int W_LIST_EXPAN_ICON = 72;
 
 class AsyncVcsParser
        : public Thread
@@ -844,9 +845,9 @@ SettingForm::CreateFirstDayOfWeekExpanderItemN(int itemWidth, bool isSundayFirst
 
        __pLabelFirstDayOfWeekExpandIcon = new (std::nothrow) Label();
        __pLabelFirstDayOfWeekExpandIcon->Construct(Rectangle(itemWidth - __itemHeight * H_ICON_SCALE - W_FIRST_DAY_OF_WEEK_ITEM_ICON_MARGIN,
-                                                                                                                               Y_FIRST_DAY_OF_WEEK_ITEM_ICON,
-                                                                                                                               __itemHeight * H_ICON_SCALE,
-                                                                                                                               __itemHeight * H_ICON_SCALE), L"");
+                                                                                                                               (__itemHeight - H_LIST_EXPAN_ICON)/2,
+                                                                                                                               W_LIST_EXPAN_ICON,
+                                                                                                                               H_LIST_EXPAN_ICON), L"");
        __pLabelFirstDayOfWeekExpandIcon->AddTouchEventListener(*this);
        Bitmap* pButtonIcon = (__isFirstDayOfWeekSelectionItemExpanded)?ResourceManager::GetBitmapN(IDB_ALL_DAY_EVENT_LIST_EXPAND_OPENED):ResourceManager::GetBitmapN(IDB_ALL_DAY_EVENT_LIST_EXPAND_CLOSED);
        if (pButtonIcon != null)