Fixed prevent issue
[apps/osp/Gallery.git] / src / GlFileListForm.cpp
index dc276e0..95fc7b1 100644 (file)
@@ -169,11 +169,12 @@ FileListForm::OnActionPerformed(const Control& source, int actionId)
 
        case IDA_FOOTER_CAMERA:
        {
+               const String mimeType = APPCONTROL_MIME_IMAGE_JPG;
                HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                pDataList->Construct();
                pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_CAMERA_ALLOW_SWITCH), new (std::nothrow) String(APPCONTROL_DATA_TRUE));
                __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_CAMERA, APPCONTROL_OPERATION_ID_CREATE_CONTENT,
-                               null, new (std::nothrow) String(APPCONTROL_MIME_IMAGE_JPG), pDataList, null);
+                               null, &mimeType, pDataList, this);
        }
        break;
 
@@ -270,7 +271,17 @@ FileListForm::SetTitleText(const String& titleText)
        AppLogDebug("ENTER");
        Header* pHeader = GetHeader();
        TryReturnVoid(pHeader != null, "[%s] fail to get the Header.", GetErrorMessage(GetLastResult()));
-       pHeader->SetTitleText(titleText);
+
+       if (titleText == ALL_ALBUMS_REAL_NAME)
+       {
+               String text = ResourceManager::GetString(L"IDS_MEDIABR_BODY_ALL_ALBUMS");
+               pHeader->SetTitleText(text);
+       }
+       else
+       {
+               pHeader->SetTitleText(titleText);
+       }
+
        pHeader->Show();
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
@@ -295,13 +306,14 @@ FileListForm::OnSlideSettingPopUpItemSelected(int index)
                        pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
                }
 
+               const String mimeType = APPCONTROL_MIME_IMAGE_ALL;
                HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                pDataList->Construct();
                pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
                pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
                r = __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, null,
-                               new (std::nothrow) String(APPCONTROL_MIME_IMAGE_ALL), pDataList, null);
+                               &mimeType, pDataList, null);
 
                if (r == E_MAX_EXCEEDED)
                {
@@ -345,3 +357,13 @@ FileListForm::OnFormMenuRequested (Tizen::Ui::Controls::Form &source)
        }
 }
 
+void
+FileListForm::OnAppControlCompleteResponseReceived(const AppId& appId, const Tizen::Base::String& operationId,
+                       AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData)
+{
+       AppLogDebug("OnAppControlCompleteResponseReceived : %d", appControlResult);
+
+       GalleryApp* pGalleryApp = static_cast<GalleryApp*>(GalleryApp::GetInstance());
+       TryReturnVoid(pGalleryApp != null, "pGalleryApp is null");
+       pGalleryApp->SetFrameEnabled(true);
+}