Arrange code
[apps/osp/Gallery.git] / src / GlAllListSelectionPanel.cpp
index 9ee9b4c..95f6ae6 100644 (file)
@@ -280,6 +280,9 @@ AllListSelectionPanel::OnSceneActivatedN(const SceneId& previousSceneId,
                const SceneId& currentSceneId, IList* pArgs)
 {
        AppLogDebug("ENTER");
+
+       ChangeOrientation();
+
        __pPresentationModel = FileListPresentationModel::GetInstance();
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
@@ -481,6 +484,18 @@ void AllListSelectionPanel::OnFileOpComplete(enum FileActionMode actionId, enum
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
+void
+AllListSelectionPanel::ChangeOrientation()
+{
+       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);
+}
+
 result
 AllListSelectionPanel::OnRequestMessage(void)
 {
@@ -767,7 +782,7 @@ AllListSelectionPanel::OnRotateRequested(RotateMode rotateMode)
 
 void AllListSelectionPanel::CancelUpdateProgress(void)
 {
-       if__pFileUpdateTimer!= null && __pFileUpdateTimer->IsStarted())
+       if (__pFileUpdateTimer!= null && __pFileUpdateTimer->IsStarted())
        {
                __pFileUpdateTimer->Cancel();
                delete __pFileUpdateTimer;