Fixed prevent issue
[apps/osp/Gallery.git] / src / GlAllListPanel.cpp
index a91d0e4..21a7cdb 100644 (file)
@@ -88,7 +88,18 @@ AllListPanel::Refresh(void)
                SceneManager* pSceneManager = SceneManager::GetInstance();
                TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager", GetErrorMessage(GetLastResult()));
 
-               pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALBUM_LIST));
+               pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALBUM_LIST,SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_DESTROY_OPTION_KEEP));
+       }
+       else
+       {
+               SceneManager* pSceneManager = SceneManager::GetInstance();
+               TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager", GetErrorMessage(GetLastResult()));
+
+               FileListForm* pFileListForm = dynamic_cast<FileListForm*>(pSceneManager->GetCurrentScene()->GetForm());
+               if (pFileListForm != null)
+               {
+                       pFileListForm->SetMenuState(true);
+               }
        }
 
        __pContentIconListView->UpdateList();
@@ -257,6 +268,7 @@ AllListPanel::OnIconListViewItemStateChanged(IconListView& view, int index, Icon
 
                String listIndex;
                listIndex.Format(10, L"%d", index);
+               const String mimeType = APPCONTROL_MIME_IMAGE_ALL;
 
                HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                pDataList->Construct();
@@ -265,7 +277,7 @@ AllListPanel::OnIconListViewItemStateChanged(IconListView& view, int index, Icon
                pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX), new (std::nothrow) String(listIndex));
 
                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)
                {
@@ -312,10 +324,24 @@ AllListPanel::OnThumbnailDecoded(const int index)
 }
 
 void
+AllListPanel::ChangeOrientation(void)
+{
+       AppLogDebug("ENTER");
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       const Form* pForm = dynamic_cast<Form*>(pSceneManager->GetCurrentScene()->GetForm());
+       TryReturn(pForm != null,, "[%s] fail to get the form.", GetErrorMessage(GetLastResult()));
+
+       Rectangle clientAreaBounds = pForm->GetClientAreaBounds();
+       SetBounds(0, 0, clientAreaBounds.width, clientAreaBounds.height);
+       __pContentIconListView->SetBounds(0, 0, clientAreaBounds.width, clientAreaBounds.height);
+}
+
+void
 AllListPanel::OnSceneActivatedN(const SceneId& previousSceneId,
                                                                const SceneId& currentSceneId, IList* pArgs)
 {
        AppLogDebug("ENTER");
+       ChangeOrientation();
 
        __pPresentationModel = FileListPresentationModel::GetInstance();
 
@@ -358,13 +384,13 @@ AllListPanel::OnSceneActivatedN(const SceneId& previousSceneId,
                {
                        pFileListForm->SetTitleText(__pPresentationModel->GetCurrentAlbumName());
 
-                       if__itemCount == 0)
+                       if (__itemCount == 0)
                        {
-                               pFileListForm->SetFooterState(false);
+                               pFileListForm->SetMenuState(false);
                        }
                        else
                        {
-                               pFileListForm->SetFooterState(true);
+                               pFileListForm->SetMenuState(true);
                        }
 
                }