Arrange code
[apps/osp/Gallery.git] / src / GlImageListEditorPanel.cpp
index c876572..6760adc 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
 //
@@ -28,7 +28,7 @@
 #include "GlImageListEditorPanel.h"
 #include "GlResourceManager.h"
 #include "GlTypes.h"
-#include "GlFileDeleteTimer.h"
+#include "GlFileUpdateTimer.h"
 #include "GlFileListEditorForm.h"
 
 using namespace Tizen::App;
@@ -42,7 +42,7 @@ using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
 static const int H_SELECTALL_REGION = 112;
-static const unsigned int COLOR_SELECTALL_REGION = Color32<0x2A, 0x36, 0x4A>::Value;
+static const int COUNT_LABEL_FONT_SIZE = 33;
 static const unsigned int COLOR_COUNT_LABEL = Color32<68, 68, 68>::Value;
 static const unsigned int COLOR_SELECT_COUNT_FONT = Color32<255, 255, 255>::Value;
 static const Color COLOR_THUMBNAIL_DIM (Color::GetColor(COLOR_ID_BLACK));
@@ -52,12 +52,12 @@ static const int ALPHA_THUMBNAIL_DIM = 70;
 static const Rectangle RECT_INITIAL (0, 0, 10, 10);
 
 ImageListEditorPanel::ImageListEditorPanel(void)
-       : __pContentIconListView(null)
+       : __itemCount(0)
+       , __pContentIconListView(null)
        , __pCheckButton(null)
        , __pLabelSelectCnt(null)
-       , __itemCount(0)
        , __pPresentationModel(null)
-       , __pFileDelete(null)
+       , __pFileListEditorForm(null)
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -66,7 +66,6 @@ ImageListEditorPanel::ImageListEditorPanel(void)
 ImageListEditorPanel::~ImageListEditorPanel(void)
 {
        AppLogDebug("ENTER");
-       delete __pFileDelete;
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -95,13 +94,13 @@ ImageListEditorPanel::OnInitializing(void)
        Rectangle clientAreaBounds = pForm->GetClientAreaBounds();
        SetBounds(0, 0, clientAreaBounds.width, clientAreaBounds.height);
 
-       if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK)
+       if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
        {
                __pContentIconListView = new (std::nothrow) IconListView();
 
                if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
                {
-                       __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width, clientAreaBounds.height),
+                       __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width, clientAreaBounds.height - H_COUNT_LABEL),
                                        DIMENSION_DEFAULT_THUMBNAIL, ICON_LIST_VIEW_STYLE_MARK,
                                        ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL);
                        Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
@@ -116,17 +115,18 @@ ImageListEditorPanel::OnInitializing(void)
                        __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT);
                        __pContentIconListView->AddIconListViewItemEventListener(*this);
                        __pContentIconListView->SetTouchAnimationEnabled(false);
-                       AddControl(*__pContentIconListView);
+                       AddControl(__pContentIconListView);
                        __pContentIconListView->SetShowState(true);
 
                        __pLabelSelectCnt = new (std::nothrow) Label();
-                       __pLabelSelectCnt->Construct(Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL,
+                       __pLabelSelectCnt->Construct(Rectangle(0, clientAreaBounds.height - H_COUNT_LABEL,
                                        clientAreaBounds.width, H_COUNT_LABEL), ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED"));
                        __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
                        __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
                        __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL);
                        __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
-                       AddControl(*__pLabelSelectCnt);
+                       __pLabelSelectCnt->SetTextConfig(COUNT_LABEL_FONT_SIZE, LABEL_TEXT_STYLE_BOLD);
+                       AddControl(__pLabelSelectCnt);
                }
                else
                {
@@ -145,23 +145,12 @@ ImageListEditorPanel::OnInitializing(void)
                        __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT);
                        __pContentIconListView->AddIconListViewItemEventListener(*this);
                        __pContentIconListView->SetTouchAnimationEnabled(false);
-                       AddControl(*__pContentIconListView);
+                       AddControl(__pContentIconListView);
                        __pContentIconListView->SetShowState(true);
                }
        }
        else
        {
-               Panel* pCheckPanel = new (std::nothrow) Panel();
-               pCheckPanel->Construct(Rectangle(0, 0, clientAreaBounds.width, H_SELECTALL_REGION));
-               pCheckPanel->SetBackgroundColor(COLOR_SELECTALL_REGION);
-               __pCheckButton = new (std::nothrow) CheckButton();
-               __pCheckButton->Construct(pCheckPanel->GetBounds(), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_DEFAULT,
-                               false, ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL"));
-               __pCheckButton->SetActionId(ACTION_ID_SELECTALL_CHECKED, ACTION_ID_SELECTALL_UNCHECKED);
-               __pCheckButton->AddActionEventListener(*this);
-               pCheckPanel->AddControl(*__pCheckButton);
-               AddControl(*pCheckPanel);
-
                __pContentIconListView = new (std::nothrow) IconListView();
                __pContentIconListView->Construct(Rectangle(0, H_SELECTALL_REGION, clientAreaBounds.width,
                                clientAreaBounds.height - H_SELECTALL_REGION), DIMENSION_DEFAULT_THUMBNAIL,
@@ -178,18 +167,18 @@ ImageListEditorPanel::OnInitializing(void)
                __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT);
                __pContentIconListView->AddIconListViewItemEventListener(*this);
                __pContentIconListView->SetTouchAnimationEnabled(false);
-               AddControl(*__pContentIconListView);
+               AddControl(__pContentIconListView);
                __pContentIconListView->SetShowState(true);
 
                __pLabelSelectCnt = new (std::nothrow) Label();
                __pLabelSelectCnt->Construct(
-                               Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL),
+                               Rectangle(0, clientAreaBounds.height - H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL),
                                ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED"));
                __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
                __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
                __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL);
                __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
-               AddControl(*__pLabelSelectCnt);
+               AddControl(__pLabelSelectCnt);
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
@@ -206,95 +195,6 @@ ImageListEditorPanel::OnTerminating(void)
        return E_SUCCESS;
 }
 
-void
-ImageListEditorPanel::UpdatePanelContent()
-{
-       AppLogDebug("ENTER");
-       SceneManager* pSceneManager = SceneManager::GetInstance();
-       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-ImageListEditorPanel::OnActionPerformed(const Control& source, int actionId)
-{
-       AppLogDebug("ENTER");
-       SceneManager* pSceneManager = SceneManager::GetInstance();
-       AppAssert(pSceneManager);
-
-       switch (actionId)
-       {
-       case ACTION_ID_SELECTALL_CHECKED:
-       {
-               int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
-               for (int i = 0; i < loopCount; ++i)
-               {
-                       if (__pContentIconListView->IsItemChecked(i) == false)
-                       {
-                               __pContentIconListView->SetItemChecked(i,true);
-                               __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
-                       }
-               }
-
-               int checkedCount = GetItemCheckedCount();
-               String strTmp;
-               if (checkedCount == 0)
-               {
-                       strTmp = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
-               }
-               else if (checkedCount == 1)
-               {
-                       strTmp = ResourceManager::GetString(L"IDS_VR_POP_1_ITEM_SELECTED");
-               }
-               else
-               {
-                       strTmp.Format(LENGTH_COUNT_LABEL,
-                                       ResourceManager::GetString(L"IDS_VR_POP_PD_ITEMS_SELECTED").GetPointer(), checkedCount);
-               }
-
-               __pLabelSelectCnt->SetText(strTmp);
-               __pLabelSelectCnt->RequestRedraw(true);
-               break;
-       }
-       case ACTION_ID_SELECTALL_UNCHECKED:
-       {
-               int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
-               for (int i = 0; i < loopCount; ++i)
-               {
-                       if (__pContentIconListView->IsItemChecked(i) == true)
-                       {
-                               __pContentIconListView->SetItemChecked(i,false);
-                       }
-               }
-               int checkedCount = GetItemCheckedCount();
-               String strTmp;
-               if (checkedCount == 0)
-               {
-                       strTmp = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
-               }
-               else if (checkedCount == 1)
-               {
-                       strTmp = ResourceManager::GetString(L"IDS_VR_POP_1_ITEM_SELECTED");
-               }
-               else
-               {
-                       strTmp.Format(LENGTH_COUNT_LABEL,
-                                       ResourceManager::GetString(L"IDS_VR_POP_PD_ITEMS_SELECTED").GetPointer(), checkedCount);
-               }
-
-               __pLabelSelectCnt->SetText(strTmp);
-               __pLabelSelectCnt->RequestRedraw(true);
-               __pContentIconListView->UpdateList();
-               break;
-       }
-       default:
-       {
-               break;
-       }
-       }
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
 int
 ImageListEditorPanel::GetItemCount(void)
 {
@@ -351,7 +251,8 @@ ImageListEditorPanel::CreateItem(int index)
                else
                {
                        AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
+                       delete pIconListviewItem;
+                       delete pItemText;
                        return null;
                }
        }
@@ -390,7 +291,7 @@ ImageListEditorPanel::OnIconListViewItemStateChanged(IconListView& view, int ind
 
        if (status == ICON_LIST_VIEW_ITEM_CHECKED || status == ICON_LIST_VIEW_ITEM_UNCHECKED)
        {
-               if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK)
+               if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
                {
                        if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
                        {
@@ -443,37 +344,48 @@ ImageListEditorPanel::OnIconListViewItemStateChanged(IconListView& view, int ind
                }
        }
 
-       if (    __pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK
+       if (    __pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK
                && __pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_SINGLE)
        {
                if (status == ICON_LIST_VIEW_ITEM_SELECTED)
                {
-                       HashMap* map = new (std::nothrow) HashMap(SingleObjectDeleter);
-                       result r = map->Construct();
+                       HashMap* pMap = new (std::nothrow) HashMap(SingleObjectDeleter);
+                       result r = pMap->Construct();
                        if (r == E_SUCCESS)
                        {
-                               map->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
-                                               new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
-                               map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED),
-                                               new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
+                               ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+                               r = pArrayList->Construct();
 
-                               GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
-                               if (pApp != null)
+                               if (r == E_SUCCESS)
                                {
-                                       pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map);
-                                       pApp->Terminate();
+                                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
+                                       pMap->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), (Object*)pArrayList);
+
+                                       GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
+                                       if (pApp != null)
+                                       {
+                                               pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, pMap);
+                                               pApp->Terminate();
+                                       }
+                                       else
+                                       {
+                                               delete pMap;
+                                       }
                                }
                                else
                                {
-                                       delete map;
+                                       delete pArrayList;
+                                       delete pMap;
                                }
                        }
                        else
                        {
-                               delete map;
+                               delete pMap;
                        }
                }
        }
+       SetButtonState();
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -506,9 +418,15 @@ ImageListEditorPanel::OnSceneActivatedN(const SceneId& previousSceneId,
                                                                const SceneId& currentSceneId, IList* pArgs)
 {
        AppLogDebug("ENTER");
+
+       ChangeOrientation();
+
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       __pFileListEditorForm = dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
+
        __pPresentationModel = FileListPresentationModel::GetInstance();
 
-       if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK)
+       if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
        {
                if (currentSceneId == IDSCN_IMAGE_LIST_EDITOR)
                {
@@ -574,7 +492,7 @@ ImageListEditorPanel::GetItemCheckedCount(void) const
 }
 
 IList*
-ImageListEditorPanel::GetItemCheckedIndexList(void) const
+ImageListEditorPanel::GetItemCheckedIndexListN(void) const
 {
        AppLogDebug("ENTER");
        IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
@@ -583,11 +501,14 @@ ImageListEditorPanel::GetItemCheckedIndexList(void) const
        if (__pContentIconListView != null)
        {
                int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
+               AppLogDebug("ENTER loopCount(%d)", loopCount);
                for (int i = 0; i < loopCount; ++i)
                {
                        if (__pContentIconListView->IsItemChecked(i))
                        {
                                pIndex = new (std::nothrow) Integer(i);
+                               AppLogDebug("ENTER loopCount(%d)", loopCount);
+                               AppLogDebug("ENTER loopCount(%d)", pIndex->ToInt());
                                pList->Add(pIndex);
                        }
                }
@@ -597,34 +518,6 @@ ImageListEditorPanel::GetItemCheckedIndexList(void) const
        return pList;
 }
 
-void
-ImageListEditorPanel::OnRequestDelete(void)
-{
-       AppLogDebug("ENTER");
-       IList* pIndexList = GetItemCheckedIndexList();
-
-       if (pIndexList == null || pIndexList->GetCount() <= 0 || __pPresentationModel == null)
-       {
-               delete pIndexList;
-               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
-               return;
-       }
-       //TODO To test this properly, seems like OnRequestDelete is unused
-       delete __pFileDelete;
-       __pFileDelete = new FileDeleteTimer(pIndexList, __pPresentationModel, this);
-       result r = __pFileDelete->StartTimer();
-
-       if (IsFailed(r))
-       {
-               delete __pFileDelete;
-               __pFileDelete = null;
-               return ;
-       }
-
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
 void ImageListEditorPanel::OnFileOpInvalidate(enum FileActionMode actionId)
 {
        SceneManager* pSceneManager = SceneManager::GetInstance();
@@ -637,184 +530,48 @@ void ImageListEditorPanel::OnFileOpInvalidate(enum FileActionMode actionId)
 
 void ImageListEditorPanel::OnFileOpComplete(enum FileActionMode actionId, enum FileActionCompleteRes res)
 {
-       if (actionId == FILE_DELETE_ACTION)
-       {
-               //Do nothing
-       }
-       else if (actionId == FILE_MOVE_ACTION)
-       {
-       }
-}
-
-void
-ImageListEditorPanel::OnRequestMessage(void)
-{
-       AppLogDebug("ENTER");
-       IList* pIndexList = GetItemCheckedIndexList();
-       if (pIndexList->GetCount() <= 0)
-       {
-               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
-               return;
-       }
-
-       String combineText;
-       String path;
-       int loopCount = pIndexList->GetCount();
-       for (int i = 0; i < loopCount; ++i)
-       {
-               path = __pPresentationModel->GetContentFilePath(i);
-
-               if (path.EndsWith(CONTENT_EXT_PNG)
-                               || path.EndsWith(CONTENT_EXT_BMP)
-                               || path.EndsWith(CONTENT_EXT_JPG)
-                               || path.EndsWith(CONTENT_EXT_GIF)
-                               || path.EndsWith(CONTENT_EXT_TIF)
-                               || path.EndsWith(CONTENT_EXT_MP4)
-                               || path.EndsWith(CONTENT_EXT_3GP)
-                               || path.EndsWith(CONTENT_EXT_AVI)
-                               || path.EndsWith(CONTENT_EXT_RM)
-                               || path.EndsWith(CONTENT_EXT_WMV)
-                               || path.EndsWith(CONTENT_EXT_ASF)
-                       )
-               {
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                       {
-                               combineText.Append(L";");
-                       }
-                       combineText.Append(path);
-               }
-       }
-
-       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-       pDataList->Construct();
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(combineText));
-
-       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE,
-                       pDataList, null);
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-ImageListEditorPanel::OnRequestEmail(void)
-{
-       AppLogDebug("ENTER");
-       IList* pIndexList = GetItemCheckedIndexList();
-       if (pIndexList->GetCount() <= 0)
-       {
-               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
-               return;
-       }
-
-       String combineText;
-       String path;
-       int loopCount = pIndexList->GetCount();
-       for (int i = 0; i < loopCount; ++i)
-       {
-               path = __pPresentationModel->GetContentFilePath(i);
-
-               if (path.EndsWith(CONTENT_EXT_PNG)
-                               || path.EndsWith(CONTENT_EXT_BMP)
-                               || path.EndsWith(CONTENT_EXT_JPG)
-                               || path.EndsWith(CONTENT_EXT_GIF)
-                               || path.EndsWith(CONTENT_EXT_TIF)
-                               || path.EndsWith(CONTENT_EXT_MP4)
-                               || path.EndsWith(CONTENT_EXT_3GP)
-                               || path.EndsWith(CONTENT_EXT_AVI)
-                               || path.EndsWith(CONTENT_EXT_RM)
-                               || path.EndsWith(CONTENT_EXT_WMV)
-                               || path.EndsWith(CONTENT_EXT_ASF)
-                       )
-               {
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                       {
-                               combineText.Append(L";");
-                       }
-                       combineText.Append(path);
-               }
-       }
-
-       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-       pDataList->Construct();
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS),
-                       new (std::nothrow) String(combineText));
-
-       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE,
-                       pDataList, null);
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-ImageListEditorPanel::OnRequestMoveTo(String& destDirectory)
-{
-       AppLogDebug("ENTER");
-       if (&destDirectory == null || destDirectory.IsEmpty())
-       {
-               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
-               return;
-       }
-
-       IList* pIndexList = GetItemCheckedIndexList();
-       if (pIndexList == null || pIndexList->GetCount() <= 0)
-       {
-               AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
-
-               return;
-       }
-
-       result r = __pPresentationModel->MoveToContentFileList(*pIndexList, destDirectory);
-       delete pIndexList;
-       TryReturn(r == E_SUCCESS, , "Failed on OnRequestDeleteAction");
-
-       __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL);
-       __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
-       __pContentIconListView->UpdateList();
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
 void
 ImageListEditorPanel::OnRequestAppExitWithMultipleSelectionAppControlResult(void)
 {
        AppLogDebug("ENTER");
-       IList* pIndexList = GetItemCheckedIndexList();
+       IList* pIndexList = GetItemCheckedIndexListN();
 
        if (pIndexList->GetCount() <= 0)
        {
+               delete pIndexList;
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
                return;
        }
 
-       String combineText;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
+       Integer* pTemp = null;
        for (int i = 0; i < loopCount; ++i)
        {
-               combineText.Append(__pPresentationModel->GetContentFilePath(i));
-               combineText.Append(L";");
+               pTemp = static_cast<Integer*>(pIndexList->GetAt(i));
+               pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(pTemp->ToInt())));
        }
 
-       HashMap* map = new (std::nothrow) HashMap(SingleObjectDeleter);
-       map->Construct();
-       map->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
-                       new (std::nothrow) String(combineText));
-       map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED),
-                               new (std::nothrow) String(combineText));
+       HashMap* pMap = new (std::nothrow) HashMap(SingleObjectDeleter);
+       pMap->Construct();
+       pMap->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), pArrayList);
 
        GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
        if (pApp != null)
        {
-               pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map);
+               pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, pMap);
                pApp->Terminate();
        }
+
+       delete pIndexList;
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
 void
-ImageListEditorPanel::SelectAllPressed(void)
+ImageListEditorPanel::OnSelectAllPressed(void)
 {
        bool needToSelectAll = true;
        int checkedCount = GetItemCheckedCount();
@@ -826,24 +583,26 @@ ImageListEditorPanel::SelectAllPressed(void)
 
        if (needToSelectAll == true)
        {
-               for (int i = 0 ; i < totalFileCount; ++i)
+               for (int i = 0; i < totalFileCount; ++i)
                {
                        if (__pContentIconListView->IsItemChecked(i) == false)
                        {
-                               __pContentIconListView->SetItemChecked(i,true);
+                               __pContentIconListView->SetItemChecked(i, true);
                                __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
                        }
+                       __pFileListEditorForm->SetFooterButtonsState(true);
                }
        }
        else
        {
-               for (int i = 0 ; i < totalFileCount; ++i)
+               for (int i = 0; i < totalFileCount; ++i)
                {
                        if (__pContentIconListView->IsItemChecked(i) == true)
                        {
                                __pContentIconListView->SetItemChecked(i, false);
                                __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
                        }
+                       __pFileListEditorForm->SetFooterButtonsState(false);
                }
        }
 
@@ -861,3 +620,40 @@ ImageListEditorPanel::SelectAllPressed(void)
        __pLabelSelectCnt->SetText(tempString);
        __pLabelSelectCnt->RequestRedraw(true);
 }
+
+void
+ImageListEditorPanel::SetButtonState(void)
+{
+       AppLogDebug("ENTER");
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
+
+       if (GetItemCheckedCount() > 0)
+       {
+               AppLogDebug("BUTTONSTATE : Request Enable");
+               __pFileListEditorForm->SetFooterButtonsState(true);
+       }
+       else
+       {
+               AppLogDebug("BUTTONSTATE : Request disable");
+               __pFileListEditorForm->SetFooterButtonsState(false);
+       }
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+void
+ImageListEditorPanel::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);
+       if (__pLabelSelectCnt != NULL)
+       {
+       __pLabelSelectCnt->SetBounds(0, clientAreaBounds.height - H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL);
+       }
+       __pContentIconListView->SetBounds(0, 0, clientAreaBounds.width, clientAreaBounds.height -H_COUNT_LABEL);
+}