Arrange code
[apps/osp/Gallery.git] / src / GlVideoListEditorPanel.cpp
index 527648c..3b08f4c 100644 (file)
@@ -1,7 +1,7 @@
 //
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
@@ -126,7 +126,7 @@ VideoListEditorPanel::OnInitializing(void)
                        __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
                        __pContentIconListView->SetItemProvider(*this);
                        __pContentIconListView->AddListViewItemEventListener(*this);
-                       AddControl(*__pContentIconListView);
+                       AddControl(__pContentIconListView);
                        __pContentIconListView->SetShowState(true);
 
                        __pLabelSelectCnt = new (std::nothrow) Label();
@@ -137,7 +137,7 @@ VideoListEditorPanel::OnInitializing(void)
                        __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL);
                        __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
                        __pLabelSelectCnt->SetTextConfig(COUNT_LABEL_FONT_SIZE, LABEL_TEXT_STYLE_BOLD);
-                       AddControl(*__pLabelSelectCnt);
+                       AddControl(__pLabelSelectCnt);
                }
                else
                {
@@ -152,7 +152,7 @@ VideoListEditorPanel::OnInitializing(void)
                        __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
                        __pContentIconListView->SetItemProvider(*this);
                        __pContentIconListView->AddListViewItemEventListener(*this);
-                       AddControl(*__pContentIconListView);
+                       AddControl(__pContentIconListView);
                        __pContentIconListView->SetShowState(true);
                }
        }
@@ -171,7 +171,7 @@ VideoListEditorPanel::OnInitializing(void)
                __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
                __pContentIconListView->SetItemProvider(*this);
                __pContentIconListView->AddListViewItemEventListener(*this);
-               AddControl(*__pContentIconListView);
+               AddControl(__pContentIconListView);
                __pContentIconListView->SetShowState(true);
 
                __pLabelSelectCnt = new (std::nothrow) Label();
@@ -183,7 +183,7 @@ VideoListEditorPanel::OnInitializing(void)
                __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL);
                __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
                __pLabelSelectCnt->SetTextConfig(COUNT_LABEL_FONT_SIZE, LABEL_TEXT_STYLE_BOLD);
-               AddControl(*__pLabelSelectCnt);
+               AddControl(__pLabelSelectCnt);
 
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -772,3 +772,16 @@ VideoListEditorPanel::SetButtonState(void)
        
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
+
+void
+VideoListEditorPanel::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);
+}