Resolve JIRA issues(N_SE-32329 and N_SE-32513), and fix export file path.
authorSungWan Kim <sw0726.kim@samsung.com>
Mon, 8 Apr 2013 01:01:07 +0000 (10:01 +0900)
committerSungWan Kim <sw0726.kim@samsung.com>
Mon, 8 Apr 2013 01:01:07 +0000 (10:01 +0900)
Change-Id: I6ab1330fff416f3d50cadcd6ee35ed346d708f40
Signed-off-by: SungWan Kim <sw0726.kim@samsung.com>
src/ClCalendarApp.cpp
src/ClImportForm.cpp
src/ClThreeButtonPopup.cpp
src/ClTwoButtonPopup.cpp

index 40bf7d7..fa39e5a 100644 (file)
@@ -119,7 +119,10 @@ CalendarApp::GetExportVcsFilePath(void)
                String nextPath;
                do
                {
-                       nextPath.Format(35, L"%ls-%3d", path.GetPointer(), ++count);
+                       String countString;
+                       countString.Format(5, L"-%3d", ++count);
+                       nextPath = path;
+                       nextPath.Insert(countString, path.GetLength() - 4);
                } while (File::IsFileExist(nextPath) == true);
                path = nextPath;
        }
index 9e3a72c..a408ca1 100644 (file)
@@ -185,18 +185,20 @@ ImportForm::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
 void
 ImportForm::OnActionPerformed(const Control& source, int actionId)
 {
-       bool checkFlag = false;
-       int count = __pList->GetCount();
+       AppLogDebug("Enter.");
        switch (actionId)
        {
        case IDA_IMPORT_FORM_SELECT_ALL:
-               checkFlag = IsAllItemChecked() == false;
+       {
+               bool checkFlag = IsAllItemChecked() == false;
+               int count = __pList->GetCount();
                for (int i = 0; i < count; ++i)
                {
                        __pListViewContents->SetItemChecked(i, checkFlag);
                }
                __pListViewContents->Invalidate(true);
                break;
+       }
        case IDA_IMPORT_FORM_ADD_TO_CALENDAR:
                if (IsEventItemChecked() == true)
                {
@@ -208,12 +210,15 @@ ImportForm::OnActionPerformed(const Control& source, int actionId)
                }
                break;
        }
+       AppLogDebug("Exit.");
 }
 
 void
 ImportForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
+       AppLogDebug("Enter.");
        SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
+       AppLogDebug("Exit.");
 }
 
 int
@@ -302,6 +307,7 @@ ImportForm::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
 void
 ImportForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
 {
+       AppLogDebug("Enter.");
        if (pArgs != null)
        {
                if (dynamic_cast<CalEvent*>(pArgs->GetAt(0)) != null || dynamic_cast<CalTodo*>(pArgs->GetAt(0)) != null)
@@ -313,12 +319,15 @@ ImportForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& cur
        }
 
        __pListViewContents->UpdateList();
+       AppLogDebug("Exit.");
 }
 
 void
 ImportForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
+       AppLogDebug("Enter.");
        __pList = null;
+       AppLogDebug("Exit.");
 }
 
 Color
index 0d1ae51..99f6236 100755 (executable)
@@ -115,7 +115,7 @@ ThreeButtonPopup::OnActionPerformed(const Control& source, int actionId)
 {
        SetShowState(false);
 
-       if (actionId != IDA_EVENT_POPUP_CANCEL && __pTarget != null)
+       if (actionId != IDA_EVENT_POPUP_CANCEL && actionId > 0 && __pTarget != null)
        {
                LinkedList* pArgs = null;
                if (__pEvent != null)
@@ -125,5 +125,6 @@ ThreeButtonPopup::OnActionPerformed(const Control& source, int actionId)
                        __pEvent = null;
                }
                __pTarget->SendUserEvent(actionId, pArgs);
+               __pTarget = null;
        }
 }
index 488c4f4..751023d 100644 (file)
@@ -105,7 +105,7 @@ TwoButtonPopup::OnActionPerformed(const Control& source, int actionId)
 {
        SetShowState(false);
 
-       if (actionId != IDA_EVENT_POPUP_CANCEL && __pTarget != null)
+       if (actionId != IDA_EVENT_POPUP_CANCEL && actionId > 0 && __pTarget != null)
        {
                LinkedList* pArgs = null;
                if (__pEvent != null)
@@ -115,5 +115,6 @@ TwoButtonPopup::OnActionPerformed(const Control& source, int actionId)
                        __pEvent = null;
                }
                __pTarget->SendUserEvent(actionId, pArgs);
+               __pTarget = null;
        }
 }