Fixed issue 42036
[apps/osp/Gallery.git] / src / GlAllListEditorPanel.cpp
index 7b860ac..5314ae9 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
 //
  */
 
 #include <FContent.h>
-#include <FMedia.h>
 #include "GlAllListEditorPanel.h"
 #include "GlCommonUtil.h"
+#include "GlFileUpdateTimer.h"
 #include "GlFileListEditorForm.h"
 #include "GlFileListPresentationModel.h"
 #include "GlResourceManager.h"
 #include "GlTypes.h"
-#include "GlFileDeleteTimer.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -42,6 +41,7 @@ using namespace Tizen::Ui::Scenes;
 static const int H_COUNT_LABEL = 48;
 static const int H_COUNT_LABEL_BUTTON = 42;
 static const int W_COUNT_LABEL_BUTTON = 42;
+static const int COUNT_LABEL_FONT_SIZE = 33;
 static const int H_CONTENT_MARGIN = 9;
 static const int W_CONTENT_MARGIN = 6;
 static const int W_CONTENT_SPACE = 6;
@@ -56,13 +56,13 @@ static const int ALPHA_THUMBNAIL_DIM = 70;
 static const Rectangle RECT_INITIAL (0, 0, 10, 10);
 
 AllListEditorPanel::AllListEditorPanel(void)
-       : __pContentIconListView(null)
+       : __itemCount(0)
+       , __pContentIconListView(null)
        , __pLabelSelectCnt(null)
        , __pButtonSelectRegion(null)
-       , __itemCount(0)
-       , __deleteInProgress(false)
+       , __pFileUpdateTimer(null)
+       , __pFileListEditorForm(null)
        , __pPresentationModel(null)
-       , __pFileDelete(null)
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -71,7 +71,7 @@ AllListEditorPanel::AllListEditorPanel(void)
 AllListEditorPanel::~AllListEditorPanel(void)
 {
        AppLogDebug("ENTER");
-       delete __pFileDelete;
+       delete __pFileUpdateTimer;
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -118,26 +118,27 @@ AllListEditorPanel::OnInitializing(void)
        __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT);
        __pContentIconListView->AddIconListViewItemEventListener(*this);
        __pContentIconListView->SetTouchAnimationEnabled(false);
-       AddControl(*__pContentIconListView);
+       AddControl(__pContentIconListView);
        __pContentIconListView->SetShowState(true);
 
        __pLabelSelectCnt = new (std::nothrow) Label();
        String strTmp;
        strTmp = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED").GetPointer();
        __pLabelSelectCnt->Construct(
-                       Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL), strTmp);
+                       Rectangle(0, clientAreaBounds.height - H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL), strTmp);
        __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);
        __pLabelSelectCnt->Invalidate(true);
 
        __pButtonSelectRegion = new (std::nothrow) Button();
        __pButtonSelectRegion->Construct(Rectangle(clientAreaBounds.width - W_COUNT_LABEL_BUTTON - 10,
                        clientAreaBounds.height - H_COUNT_LABEL_BUTTON - 4, W_COUNT_LABEL_BUTTON, H_COUNT_LABEL_BUTTON),
                        EMPTY_SPACE);
-       __pButtonSelectRegion->SetActionId(ACTION_ID_BUTTON_MOVE_TO_SELECTION);
+       __pButtonSelectRegion->SetActionId(IDA_BUTTON_MOVE_TO_SELECTION);
        __pButtonSelectRegion->SetColor(BUTTON_STATUS_NORMAL, COLOR_COUNT_LABEL_BUTTON);
        Bitmap* pSelectionBitmap = ResourceManager::GetBitmapN(IDB_BUTTON_MOVE_SELECTION);
        if (pSelectionBitmap != null)
@@ -147,7 +148,7 @@ AllListEditorPanel::OnInitializing(void)
                __pButtonSelectRegion->SetNormalBitmap(Point(buttonRegionRect.width, buttonRegionRect.height),
                                *pSelectionBitmap);
        }
-       AddControl(*__pButtonSelectRegion);
+       AddControl(__pButtonSelectRegion);
 
        if (pSelectionBitmap != null)
        {
@@ -166,30 +167,13 @@ AllListEditorPanel::OnTerminating(void)
 {
        AppLogDebug("ENTER");
        __pPresentationModel->RemovePresentationModelListener(*this);
+       __pPresentationModel->RemoveContentEventListener(__pFileListEditorForm);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return E_SUCCESS;
 }
 
 void
-AllListEditorPanel::UpdatePanelContent()
-{
-       AppLogDebug("ENTER");
-       SceneManager* pSceneManager = SceneManager::GetInstance();
-       FileListEditorForm* pFileListEditorForm =
-                       dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
-       TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get SceneManager.",
-                       GetErrorMessage(GetLastResult()));
-
-       if (pFileListEditorForm->GetOverlayStatus() == false && __deleteInProgress == false)
-       {
-               SceneManager* pSceneManager = SceneManager::GetInstance();
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST));
-               AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-       }
-}
-
-void
 AllListEditorPanel::OnActionPerformed(const Control& source, int actionId)
 {
        AppLogDebug("ENTER");
@@ -198,14 +182,14 @@ AllListEditorPanel::OnActionPerformed(const Control& source, int actionId)
 
        switch (actionId)
        {
-       case ACTION_ID_BUTTON_CHECKED:
+       case IDA_BUTTON_CHECKED:
        {
                int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
-               for (int i=0 ; i < loopCount; ++i)
+               for (int i=0; i < loopCount; ++i)
                {
                        if (__pContentIconListView->IsItemChecked(i) == false)
                        {
-                               __pContentIconListView->SetItemChecked(i,true);
+                               __pContentIconListView->SetItemChecked(i, true);
                                __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
                        }
                }
@@ -229,9 +213,10 @@ AllListEditorPanel::OnActionPerformed(const Control& source, int actionId)
                __pLabelSelectCnt->SetText(strTmp);
                __pLabelSelectCnt->RequestRedraw(true);
                SetButtonState();
-               break;
        }
-       case ACTION_ID_BUTTON_UNCHECKED:
+       break;
+
+       case IDA_BUTTON_UNCHECKED:
        {
                int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
                for (int i = 0; i < loopCount; ++i)
@@ -262,9 +247,10 @@ AllListEditorPanel::OnActionPerformed(const Control& source, int actionId)
                __pLabelSelectCnt->RequestRedraw(true);
                __pContentIconListView->UpdateList();
                SetButtonState();
-               break;
        }
-       case ACTION_ID_BUTTON_MOVE_TO_SELECTION:
+       break;
+
+       case IDA_BUTTON_MOVE_TO_SELECTION:
        {
                if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
                {
@@ -279,13 +265,12 @@ AllListEditorPanel::OnActionPerformed(const Control& source, int actionId)
                {
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST_SELECTION));
                }
-               break;
        }
+       break;
+
        default:
-       {
                break;
        }
-       }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -345,6 +330,7 @@ AllListEditorPanel::CreateItem(int index)
                else
                {
                        AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
+                       delete pItemText;
                        return null;
                }
        }
@@ -443,21 +429,59 @@ AllListEditorPanel::OnSceneActivatedN(const SceneId& previousSceneId,
 
        SceneManager* pSceneManager = SceneManager::GetInstance();
        TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
+       __pFileListEditorForm = dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
+       TryReturnVoid(__pFileListEditorForm != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
+       __pPresentationModel->AddContentEventListener(__pFileListEditorForm);
 
-       if (previousSceneId == IDSCN_ALL_LIST_SELECTION)
+       if (previousSceneId == IDSCN_ALL_LIST_SELECTION)
        {
-               ResetSelection();
-               if (pArgs != null && pArgs->GetCount() > 0)
+               if (pArgs != null)
                {
-                       IList* pSeletedIndexList = pArgs;
-                       int loopCount = pSeletedIndexList->GetCount();
-                       for (int i = 0; i < loopCount; ++i)
+                       if (__pContentIconListView != null)
                        {
-                               int index = static_cast<Integer*>(pSeletedIndexList->GetAt(i))->ToInt();
-                               __pContentIconListView->SetItemChecked(index, true);
+                               int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
+                               for (int i = 0; i < loopCount; ++i)
+                               {
+                                       __pContentIconListView->SetItemChecked(i, false);
+                               }
+                               __pContentIconListView->UpdateList();
                        }
-                       __pContentIconListView->RequestRedraw(true);
+
+                       if (pArgs->GetCount() > 0) //SomeItems are Still Selected.
+                       {
+                               IList* pSeletedIndexList = pArgs;
+                               int loopCount = pSeletedIndexList->GetCount();
+                               if (__pContentIconListView != null)
+                               {
+                                       for (int i = 0; i < loopCount; ++i)
+                                       {
+                                               int index = static_cast<Integer*>(pSeletedIndexList->GetAt(i))->ToInt();
+                                               __pContentIconListView->SetItemChecked(index, true);
+                                       }
+                                       __pContentIconListView->UpdateList();
+                               }
+                       }
+               }
+
+               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);
        }
        else if (previousSceneId == IDSCN_ALL_LIST)
        {
@@ -466,19 +490,14 @@ AllListEditorPanel::OnSceneActivatedN(const SceneId& previousSceneId,
 
        SetButtonState();
 
-       FileListEditorForm* pFileListEditorForm =
-                       dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
-       TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get SceneManager.",
-                       GetErrorMessage(GetLastResult()));
-
-       pFileListEditorForm->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT"));
+       __pFileListEditorForm->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT"));
        
        if (pArgs != null && pArgs->GetCount() > 0 && previousSceneId != IDSCN_ALL_LIST_SELECTION)
        {
                String* pDirectory = static_cast<String*>(pArgs->GetAt(0));
                if (pDirectory != null && pDirectory->GetLength() > 0)
                {
-                       pFileListEditorForm->MoveToAlbum(*pDirectory);
+                       __pFileListEditorForm->MoveToAlbum(*pDirectory);
                }
        }
 
@@ -489,6 +508,7 @@ void
 AllListEditorPanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
        AppLogDebug("ENTER");
+       __pPresentationModel->RemoveContentEventListener(__pFileListEditorForm);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -506,6 +526,10 @@ AllListEditorPanel::GetItemCheckedCount(void) const
                        {
                                ++count;
                        }
+                       else
+                       {
+                               AppLog("Index i = %d is Not Checked", i);
+                       }
                }
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -551,36 +575,31 @@ AllListEditorPanel::OnRequestDelete(void)
                return E_FAILURE;
        }
 
-       delete __pFileDelete;
-       __pFileDelete = new FileDeleteTimer(pIndexList, __pPresentationModel, this);
-       result r = __pFileDelete->StartTimer();
+       delete __pFileUpdateTimer;
+       __pFileUpdateTimer = new (std::nothrow) FileUpdateTimer(pIndexList, __pPresentationModel, this, FILE_ACTION_DELETE);
+       result r = __pFileUpdateTimer->StartTimer();
 
        if (IsFailed(r))
        {
-               delete __pFileDelete;
-               __pFileDelete = null;
+               delete __pFileUpdateTimer;
+               __pFileUpdateTimer = null;
                return E_FAILURE;
        }
        else
        {
-               __deleteInProgress = true;
+               __pPresentationModel->SetUpdateProgressStatus(true);
        }
        return E_SUCCESS;
 }
 
 void AllListEditorPanel::OnFileOpInvalidate(enum FileActionMode actionId)
 {
-       SceneManager* pSceneManager = SceneManager::GetInstance();
-       FileListEditorForm* pFileListEditorForm =
-                               dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
-       TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get SceneManager.",
-                       GetErrorMessage(GetLastResult()));
-       pFileListEditorForm->Invalidate(true);
+       __pFileListEditorForm->Invalidate(true);
 }
 
 void AllListEditorPanel::OnFileOpComplete(enum FileActionMode actionId, enum FileActionCompleteRes res)
 {
-       __deleteInProgress = false;     
+       __pPresentationModel->SetUpdateProgressStatus(false);
 
        __pLabelSelectCnt->SetText(ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED"));
        __pLabelSelectCnt->RequestRedraw(true);
@@ -592,11 +611,13 @@ void AllListEditorPanel::OnFileOpComplete(enum FileActionMode actionId, enum Fil
        SceneManager* pSceneManager = SceneManager::GetInstance();
        if (GetItemCount() > 0)
        {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST));
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST,SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+                                                                  SCENE_HISTORY_OPTION_ADD_HISTORY, SCENE_DESTROY_OPTION_DESTROY));
        }
        else
        {
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
+               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST,SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+                                                                  SCENE_HISTORY_OPTION_ADD_HISTORY, SCENE_DESTROY_OPTION_DESTROY));
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
@@ -605,6 +626,7 @@ result
 AllListEditorPanel::OnRequestMessage(void)
 {
        AppLogDebug("ENTER");
+       result r = E_SUCCESS;
        IList* pIndexList = GetItemCheckedIndexListN();
        if (pIndexList == null || pIndexList->GetCount() <= 0)
        {
@@ -613,45 +635,49 @@ AllListEditorPanel::OnRequestMessage(void)
                return E_FAILURE;
        }
 
-       String combineText;
-       String path;
        Integer* pIndex = null;
        int checkedIndex;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
-       AppLogDebug("pIndexList->GetCount(%d)", loopCount);
+
        for (int i = 0; i < loopCount; ++i)
        {
                pIndex = static_cast<Integer*>(pIndexList->GetAt(i));
                if (pIndex != null)
                {
                        checkedIndex = pIndex->ToInt();
-                       path = __pPresentationModel->GetContentFilePath(checkedIndex);
+                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(checkedIndex)));
                }
-
-               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));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_MESSAGE_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
 
-       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE,
-                       pDataList, null);
+       r = __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE, null,
+                       null, pDataList, null);
+
+       if (r == E_MAX_EXCEEDED)
+       {
+               MessageBox messageBox;
+               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_RCS_BODY_MAXIMUM_NUMBER_OF_FILES_EXCEEDED"),
+                               MSGBOX_STYLE_NONE, 3000);
+               int modalResult;
+               messageBox.ShowAndWait(modalResult);
+       }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
-       return E_SUCCESS;
+       return r;
 }
 
 result
 AllListEditorPanel::OnRequestEmail(void)
 {
        AppLogDebug("ENTER");
+       result r = E_SUCCESS;
+
        IList* pIndexList = GetItemCheckedIndexListN();
        if (pIndexList == null || pIndexList->GetCount() <= 0)
        {
@@ -660,99 +686,92 @@ AllListEditorPanel::OnRequestEmail(void)
                return E_FAILURE;
        }
 
-       String combineText;
-       String path;
        Integer* pIndex = null;
        int checkedIndex;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
-       AppLogDebug("pIndexList->GetCount(%d)", loopCount);
+
        for (int i = 0; i < loopCount; ++i)
        {
                pIndex = static_cast<Integer*>(pIndexList->GetAt(i));
                if (pIndex != null)
                {
                        checkedIndex = pIndex->ToInt();
-                       path = __pPresentationModel->GetContentFilePath(checkedIndex);
-               }
-
-               if (combineText.CompareTo(EMPTY_SPACE) != 0)
-               {
-                       combineText.Append(L";");
+                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(checkedIndex)));
                }
-               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));
+       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
+
+       r = __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE,
+                       new (std::nothrow) String(APPCONTROL_URI_MAIL_TO), null, pDataList, null);
+
+       if (r == E_MAX_EXCEEDED)
+       {
+               MessageBox messageBox;
+               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_RCS_BODY_MAXIMUM_NUMBER_OF_FILES_EXCEEDED"),
+                               MSGBOX_STYLE_NONE, 3000);
+               int modalResult;
+               messageBox.ShowAndWait(modalResult);
+       }
 
-       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE,
-                       pDataList, null);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
-       return E_SUCCESS;
+       return r;
 }
 
 result
 AllListEditorPanel::OnRequestSlideShow(void)
 {
        AppLogDebug("ENTER");
+       result r = E_SUCCESS;
        IList* pIndexList = GetItemCheckedIndexListN();
        if (pIndexList == null)
        {
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
                return E_FAILURE;
        }
 
-       HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
-       result r = pDataList->Construct();
-       if (r != E_SUCCESS)
-       {
-               delete pDataList;
-               delete pIndexList;
-               AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
-
-               return E_FAILURE;
-       }
-
-       pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE),
-                       new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
-
        Integer* pRealIndex = null;
        int realIndex = -1;
-       String combineText;
-       String path;
-
+       ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pArrayList->Construct();
        int loopCount = pIndexList->GetCount();
-       if (loopCount > 0)
+
+       for (int i = 0; i < loopCount; ++i)
        {
-               for (int i = 0; i < loopCount; ++i)
+               pRealIndex = static_cast<Integer*>(pIndexList->GetAt(i));
+               if (pRealIndex != null)
                {
-                       pRealIndex = static_cast<Integer*>(pIndexList->GetAt(i));
-                       if (pRealIndex != null)
-                       {
-                               realIndex = pRealIndex->ToInt();
-                       }
-
-                       path = __pPresentationModel->GetContentFilePath(realIndex);
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
-                       {
-                               combineText.Append(L";");
-                       }
-                       combineText.Append(path);
+                       realIndex = pRealIndex->ToInt();
+                       pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(realIndex)));
                }
-               pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(combineText));
        }
 
-       delete pIndexList;
+       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);
+
+       if (r == E_MAX_EXCEEDED)
+       {
+               MessageBox messageBox;
+               messageBox.Construct(L"", ResourceManager::GetString(L"IDS_RCS_BODY_MAXIMUM_NUMBER_OF_FILES_EXCEEDED"),
+                               MSGBOX_STYLE_NONE, 3000);
+               int modalResult;
+               messageBox.ShowAndWait(modalResult);
+       }
 
-       __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE,
-                       APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
+       delete pIndexList;
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
-       return E_SUCCESS;
+       return r;
 }
 
 void
@@ -763,23 +782,15 @@ AllListEditorPanel::ResetSelection(void)
        __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
        __pContentIconListView->UpdateList();
 
-       int checkedCount = GetItemCheckedCount();
-       String strTmp;
-
-       if (checkedCount == 0)
-       {
-               strTmp = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
-       }
-       else if (checkedCount == 1)
+       for ( int index = 0; index < __itemCount; index++)
        {
-               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);
+               __pContentIconListView->SetItemChecked(index, false);
+               __pContentIconListView->RefreshList(index,LIST_REFRESH_TYPE_ITEM_MODIFY);
        }
 
+       String strTmp;
+       strTmp = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
+
        __pLabelSelectCnt->SetText(strTmp);
        __pLabelSelectCnt->RequestRedraw(true);
        SetButtonState();
@@ -793,28 +804,23 @@ AllListEditorPanel::SetButtonState(void)
        SceneManager* pSceneManager = SceneManager::GetInstance();
        TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
 
-       FileListEditorForm* pFileListEditorForm =
-                       dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
-       TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get SceneManager.",
-                       GetErrorMessage(GetLastResult()));
-
        if (GetItemCheckedCount() > 0)
        {
                AppLogDebug("BUTTONSTATE : Request Enable");
-               pFileListEditorForm->SetFooterButtonsState(true);
+               __pFileListEditorForm->SetFooterButtonsState(true);
                __pButtonSelectRegion->SetShowState(true);
        }
        else
        {
                AppLogDebug("BUTTONSTATE : Request disable");
-               pFileListEditorForm->SetFooterButtonsState(false);
+               __pFileListEditorForm->SetFooterButtonsState(false);
                __pButtonSelectRegion->SetShowState(false);
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
 void
-AllListEditorPanel::SelectAllPressed(void)
+AllListEditorPanel::OnSelectAllPressed(void)
 {
        bool needToSelectAll = true;
        int checkedCount = GetItemCheckedCount();
@@ -826,7 +832,7 @@ AllListEditorPanel::SelectAllPressed(void)
 
        if (needToSelectAll == true)
        {
-               for (int i = 0 ; i < totalFileCount; ++i)
+               for (int i = 0; i < totalFileCount; ++i)
                {
                        if (__pContentIconListView->IsItemChecked(i) == false)
                        {
@@ -837,7 +843,7 @@ AllListEditorPanel::SelectAllPressed(void)
        }
        else
        {
-               for (int i = 0 ; i < totalFileCount; ++i)
+               for (int i = 0; i < totalFileCount; ++i)
                {
                        if (__pContentIconListView->IsItemChecked(i) == true)
                        {
@@ -862,3 +868,48 @@ AllListEditorPanel::SelectAllPressed(void)
        __pLabelSelectCnt->RequestRedraw(true);
        SetButtonState();
 }
+
+result
+AllListEditorPanel::OnRequestRotate(RotateMode rotateMode)
+{
+       AppLogDebug("ENTER");
+       IList* pIndexList = GetItemCheckedIndexListN();
+       if (pIndexList == null)
+       {
+               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
+               return E_FAILURE;
+       }
+       else if (pIndexList->GetCount() <= 0)
+       {
+               delete pIndexList;
+               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
+
+               return E_FAILURE;
+       }
+
+       delete __pFileUpdateTimer;
+       __pFileUpdateTimer = new (std::nothrow) FileUpdateTimer(pIndexList, __pPresentationModel, this, FILE_ACTION_ROTATE, rotateMode);
+       result r = __pFileUpdateTimer->StartTimer();
+
+       if (IsFailed(r))
+       {
+               delete __pFileUpdateTimer;
+               __pFileUpdateTimer = null;
+               return E_FAILURE;
+       }
+       else
+       {
+               __pPresentationModel->SetUpdateProgressStatus(true);
+       }
+       return E_SUCCESS;
+}
+
+void AllListEditorPanel::CancelUpdateProgress(void)
+{
+       if( __pFileUpdateTimer!= null && __pFileUpdateTimer->IsStarted())
+       {
+               __pFileUpdateTimer->Cancel();
+               delete __pFileUpdateTimer;
+               __pFileUpdateTimer = null;
+       }
+}