Hide the ProgressPopup when user cancel selecting vcs file.
authorSungWan Kim <sw0726.kim@samsung.com>
Tue, 23 Apr 2013 02:56:25 +0000 (11:56 +0900)
committerSungWan Kim <sw0726.kim@samsung.com>
Tue, 23 Apr 2013 02:56:25 +0000 (11:56 +0900)
Change-Id: I51e904caae6cb8cce41811acc1de445992ba9214
Signed-off-by: SungWan Kim <sw0726.kim@samsung.com>
src/ClSettingForm.cpp

index a11496c..ffff9c0 100644 (file)
@@ -263,13 +263,25 @@ SettingForm::OnAppControlCompleteResponseReceived(const AppId& appId, const Stri
        AppLogDebug("Enter.");
        AppLogDebug("AppId : %ls", appId.GetPointer());
        AppLogDebug("OperationId : %ls", operationId.GetPointer());
-       TryReturnVoid(appControlResult == APP_CTRL_RESULT_SUCCEEDED, "[E_FAILURE] AppControl returns exceptions(%d).", appControlResult);
 
+       if (appControlResult != APP_CTRL_RESULT_SUCCEEDED)
+       {
+               if (__pProgressPopup != null)
+               {
+                       __pProgressPopup->SetShowState(false);
+               }
+               AppLogDebug("[E_FAILURE] AppControl returns exceptions(%d).", appControlResult);
+               return;
+       }
+
+       bool remainProgressPopup = false;
        if (operationId.Equals(ID_OPERATION_PICK, false) == true && pExtraData != null)
        {
                const IList* pPaths = dynamic_cast<const IList*>(pExtraData->GetValue(String(KEY_DATA_SELECTED)));
                if ((pPaths != null && pPaths->GetCount() > 0) == false)
                {
+                       __pProgressPopup->SetShowState(false);
+
                        MessageBox msgBox;
                        msgBox.Construct(L"", ResourceManager::GetString(IDS_RSSR_BODY_FAILED_TO_IMPORT_FILE), MSGBOX_STYLE_NONE, MESSAGE_BOX_TIME_OUT);
                        int modalResult;
@@ -318,12 +330,19 @@ SettingForm::OnAppControlCompleteResponseReceived(const AppId& appId, const Stri
                                        pAsyncVcsParser->Initialize(static_cast<const String&>(*pPaths->GetAt(0)), this);
                                        __pThread = pAsyncVcsParser;
                                        __pThread->Start();
+
+                                       remainProgressPopup = true;
                                }
                        }
                }
                delete pEnum;
        }
 
+       if (remainProgressPopup == false && __pProgressPopup != null)
+       {
+               __pProgressPopup->SetShowState(false);
+       }
+
        AppLogDebug("Exit.");
 }