Landscape implementation Gallery
[apps/osp/Gallery.git] / src / GlVideoListEditorPanel.cpp
index 32c26cd..7943fa7 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
 //
@@ -29,7 +29,7 @@
 #include "GlTypes.h"
 #include "GlVideoListEditorPanel.h"
 #include "GlFileListEditorForm.h"
-#include "GlFileDeleteTimer.h"
+#include "GlFileUpdateTimer.h"
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
@@ -40,7 +40,6 @@ using namespace Tizen::Media;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
-static const unsigned int COLOR_SELECTALL_REGION = Color32<0x2A, 0x36, 0x4A>::Value;
 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));
@@ -50,6 +49,7 @@ static const Rectangle RECT_INITIAL(0, 0, 10, 10);
 static const int H_SELECTALL_REGION = 112;
 static const int ALPHA_THUMBNAIL_DIM = 70;
 static const int H_COUNT_LABEL = 48;
+static const int COUNT_LABEL_FONT_SIZE = 33;
 static const int LENGTH_COUNT_LABEL = 256;
 static const int W_CLIENT_REGION = 720;
 static const int H_VIDEO_ITEM = 160;
@@ -64,19 +64,20 @@ static const int W_VIDEO_DURATION = (16+172+16)+(16+64+16);
 static const int H_VIDEO_DURATION = 48;
 static const int FONT_SIZE_DURATION = 32;
 
-VideoListEditorPanel::VideoListEditorPanel()
-       : __pContentListView(null)
+VideoListEditorPanel::VideoListEditorPanel(void)
+       : __pContentIconListView(null)
        , __pCheckButton(null)
        , __pLabelSelectCnt(null)
        , __itemCount(0)
        , __pPresentationModel(null)
        , __pFileDelete(null)
+       , __pFileListEditorForm(null)
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
-VideoListEditorPanel::~VideoListEditorPanel()
+VideoListEditorPanel::~VideoListEditorPanel(void)
 {
        AppLogDebug("ENTER");
        delete __pFileDelete;
@@ -109,89 +110,80 @@ VideoListEditorPanel::OnInitializing(void)
        clientAreaBounds.x = clientAreaBounds.y = 0;
        SetBounds(clientAreaBounds);
 
-       if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK)
+       if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
        {
-               __pContentListView = new (std::nothrow) ListView();
+               __pContentIconListView = new (std::nothrow) ListView();
 
                if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
                {
-                       __pContentListView->Construct(Rectangle(0, 0, W_CLIENT_REGION, clientAreaBounds.height), true, false);
+                       __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width, clientAreaBounds.height), true, false);
                        Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
                        if (pBitmapEmpty != null)
                        {
-                               __pContentListView->SetBitmapOfEmptyList(pBitmapEmpty);
+                               __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
                                delete pBitmapEmpty;
                        }
-                       __pContentListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
-                       __pContentListView->SetItemProvider(*this);
-                       __pContentListView->AddListViewItemEventListener(*this);
-                       AddControl(*__pContentListView);
-                       __pContentListView->SetShowState(true);
+                       __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
+                       __pContentIconListView->SetItemProvider(*this);
+                       __pContentIconListView->AddListViewItemEventListener(*this);
+                       AddControl(__pContentIconListView);
+                       __pContentIconListView->SetShowState(true);
 
                        __pLabelSelectCnt = new (std::nothrow) 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->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
                {
-                       __pContentListView->Construct(Rectangle(0, 0, W_CLIENT_REGION, clientAreaBounds.height),true, false);
+                       __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width,
+                                       clientAreaBounds.height), true, false);
                        Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
                        if (pBitmapEmpty != null)
                        {
-                               __pContentListView->SetBitmapOfEmptyList(pBitmapEmpty);
+                               __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
                                delete pBitmapEmpty;
                        }
-                       __pContentListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
-                       __pContentListView->SetItemProvider(*this);
-                       __pContentListView->AddListViewItemEventListener(*this);
-                       AddControl(*__pContentListView);
-                       __pContentListView->SetShowState(true);
+                       __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
+                       __pContentIconListView->SetItemProvider(*this);
+                       __pContentIconListView->AddListViewItemEventListener(*this);
+                       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);
-
-               __pContentListView = new (std::nothrow) ListView();
-               __pContentListView->Construct(
-                               Rectangle(0, H_SELECTALL_REGION, W_CLIENT_REGION, clientAreaBounds.height-H_SELECTALL_REGION),
+               __pContentIconListView = new (std::nothrow) ListView();
+               __pContentIconListView->Construct(
+                               Rectangle(0, H_SELECTALL_REGION, W_CLIENT_REGION, clientAreaBounds.height - H_SELECTALL_REGION),
                                true, false);
                Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
                if (pBitmapEmpty != null)
                {
-                       __pContentListView->SetBitmapOfEmptyList(pBitmapEmpty);
+                       __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
                        delete pBitmapEmpty;
                }
-               __pContentListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
-               __pContentListView->SetItemProvider(*this);
-               __pContentListView->AddListViewItemEventListener(*this);
-               AddControl(*__pContentListView);
-               __pContentListView->SetShowState(true);
+               __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
+               __pContentIconListView->SetItemProvider(*this);
+               __pContentIconListView->AddListViewItemEventListener(*this);
+               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);
+               __pLabelSelectCnt->SetTextConfig(COUNT_LABEL_FONT_SIZE, LABEL_TEXT_STYLE_BOLD);
+               AddControl(__pLabelSelectCnt);
 
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -209,96 +201,6 @@ VideoListEditorPanel::OnTerminating(void)
        return E_SUCCESS;
 }
 
-void
-VideoListEditorPanel::OnUpdateContentList()
-{
-       AppLogDebug("ENTER");
-       SceneManager* pSceneManager = SceneManager::GetInstance();
-       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-VideoListEditorPanel::OnActionPerformed(const Control& source, int actionId)
-{
-       AppLogDebug("ENTER");
-       SceneManager* pSceneManager = SceneManager::GetInstance();
-       TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
-
-       switch (actionId)
-       {
-       case ACTION_ID_SELECTALL_CHECKED:
-       {
-               int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
-               for (int i = 0; i < loopCount; ++i)
-               {
-                       if (__pContentListView->IsItemChecked(i) == false)
-                       {
-                               __pContentListView->SetItemChecked(i,true);
-                               __pContentListView->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 (__pContentListView->IsItemChecked(i) == true)
-                       {
-                               __pContentListView->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);
-               __pContentListView->UpdateList();
-               break;
-       }
-       default:
-       {
-               break;
-       }
-       }
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
 int
 VideoListEditorPanel::GetItemCount(void)
 {
@@ -338,13 +240,13 @@ VideoListEditorPanel::CreateItem(int index, int itemWidth)
                pDuration = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE"));
        }
 
-       if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK)
+       if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
        {
                if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
                {
                        pItem->Construct(Dimension(itemWidth, H_VIDEO_ITEM), LIST_ANNEX_STYLE_MARK);
 
-                       if (__pContentListView->IsItemChecked(index) == true)
+                       if (__pContentIconListView->IsItemChecked(index) == true)
                        {
                                if (pBitmap != null)
                                {
@@ -361,20 +263,21 @@ VideoListEditorPanel::CreateItem(int index, int itemWidth)
 
                                        Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap();
                                        pSelectedBitmap->Construct(canvas, canvas.GetBounds());
-                                       pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap,
-                                                       pSelectedBitmap);
+                                       pItem->AddElement(RECT_VIDEO_THUMBNAIL, IDA_FORMAT_THUMBNAIL, *pBitmap, pSelectedBitmap);
                                        delete pSelectedBitmap;
                                }
                                else
                                {
                                        AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
+                                       delete pTitle;
+                                       delete pItemText;
+                                       delete pDuration;
                                        return null;
                                }
                        }
                        else
                        {
-                               pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap);
+                               pItem->AddElement(RECT_VIDEO_THUMBNAIL, IDA_FORMAT_THUMBNAIL, *pBitmap);
                        }
 
                        if (pTitle == null)
@@ -388,18 +291,18 @@ VideoListEditorPanel::CreateItem(int index, int itemWidth)
                        }
 
                        Rectangle titleRect(GAP_W_VIDEO_TITLE, GAP_H_VIDEO_TITLE, itemWidth-W_VIDEO_TITLE, H_VIDEO_TITLE);
-                       pItem->AddElement(titleRect, ACTION_ID_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE,
+                       pItem->AddElement(titleRect, IDA_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE,
                                        Color::GetColor(COLOR_ID_BLACK),null,null,false);
 
                        Rectangle durationRect(GAP_W_VIDEO_DURATION, GAP_H_VIDEO_DURATION, itemWidth-W_VIDEO_DURATION,
                                        H_VIDEO_DURATION);
-                       pItem->AddElement(durationRect, ACTION_ID_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION,
+                       pItem->AddElement(durationRect, IDA_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION,
                                        Color::GetColor(COLOR_ID_GREY),null,null,false);
                }
                else
                {
                        pItem->Construct(Dimension(itemWidth, H_VIDEO_ITEM), LIST_ANNEX_STYLE_NORMAL);
-                       pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap);
+                       pItem->AddElement(RECT_VIDEO_THUMBNAIL, IDA_FORMAT_THUMBNAIL, *pBitmap);
 
                        if (pTitle == null)
                        {
@@ -412,19 +315,19 @@ VideoListEditorPanel::CreateItem(int index, int itemWidth)
                        }
 
                        Rectangle titleRect(GAP_W_VIDEO_TITLE, GAP_H_VIDEO_TITLE, itemWidth-W_VIDEO_TITLE, H_VIDEO_TITLE);
-                       pItem->AddElement(titleRect, ACTION_ID_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE,
-                                       Color::GetColor(COLOR_ID_BLACK),null,null,false);
+                       pItem->AddElement(titleRect, IDA_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE,
+                                       Color::GetColor(COLOR_ID_BLACK), null, null, false);
 
                        Rectangle durationRect(GAP_W_VIDEO_DURATION, GAP_H_VIDEO_DURATION, itemWidth-W_VIDEO_DURATION,
                                        H_VIDEO_DURATION);
-                       pItem->AddElement(durationRect, ACTION_ID_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION,
-                                       Color::GetColor(COLOR_ID_GREY),null,null,false);
+                       pItem->AddElement(durationRect, IDA_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION,
+                                       Color::GetColor(COLOR_ID_GREY), null, null, false);
                }
        }
        else
        {
                pItem->Construct(Dimension(itemWidth, H_VIDEO_ITEM), LIST_ANNEX_STYLE_MARK);
-               if (__pContentListView->IsItemChecked(index) == true)
+               if (__pContentIconListView->IsItemChecked(index) == true)
                {
                        if (pBitmap != null)
                        {
@@ -440,17 +343,17 @@ VideoListEditorPanel::CreateItem(int index, int itemWidth)
 
                                Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap();
                                pSelectedBitmap->Construct(canvas, canvas.GetBounds());
-                               pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap, pSelectedBitmap);
+                               pItem->AddElement(RECT_VIDEO_THUMBNAIL, IDA_FORMAT_THUMBNAIL, *pBitmap, pSelectedBitmap);
                                delete pSelectedBitmap;
                        }
                        else
                        {
-                               pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap);
+                               pItem->AddElement(RECT_VIDEO_THUMBNAIL, IDA_FORMAT_THUMBNAIL, *pBitmap);
                        }
                }
                else
                {
-                       pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap);
+                       pItem->AddElement(RECT_VIDEO_THUMBNAIL, IDA_FORMAT_THUMBNAIL, *pBitmap);
                }
 
                if (pTitle == null)
@@ -464,13 +367,13 @@ VideoListEditorPanel::CreateItem(int index, int itemWidth)
                }
 
                Rectangle titleRect(GAP_W_VIDEO_TITLE, GAP_H_VIDEO_TITLE, itemWidth-W_VIDEO_TITLE, H_VIDEO_TITLE);
-               pItem->AddElement(titleRect, ACTION_ID_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE,
-                               Color::GetColor(COLOR_ID_BLACK),null,null,false);
+               pItem->AddElement(titleRect, IDA_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE,
+                               Color::GetColor(COLOR_ID_BLACK), null, null, false);
 
                Rectangle durationRect(GAP_W_VIDEO_DURATION, GAP_H_VIDEO_DURATION, itemWidth - W_VIDEO_DURATION,
                                H_VIDEO_DURATION);
-               pItem->AddElement(durationRect, ACTION_ID_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION,
-                               Color::GetColor(COLOR_ID_GREY),null,null,false);
+               pItem->AddElement(durationRect, IDA_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION,
+                               Color::GetColor(COLOR_ID_GREY), null, null, false);
        }
 
        if (pBitmap != null)
@@ -512,7 +415,7 @@ VideoListEditorPanel::OnListViewItemStateChanged(ListView& listView, int index,
 
        if (status == LIST_ITEM_STATUS_CHECKED || status == LIST_ITEM_STATUS_UNCHECKED)
        {
-               if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK)
+               if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
                {
                        if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
                        {
@@ -534,7 +437,7 @@ VideoListEditorPanel::OnListViewItemStateChanged(ListView& listView, int index,
 
                                __pLabelSelectCnt->SetText(strTmp);
                                __pLabelSelectCnt->RequestRedraw(true);
-                               __pContentListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
+                               __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
                        }
                }
                else
@@ -561,56 +464,46 @@ VideoListEditorPanel::OnListViewItemStateChanged(ListView& listView, int index,
                        {
                                __pCheckButton->SetSelected(false);
                        }
-                       __pContentListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
+                       __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
                }
        }
 
-       if (    __pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK
+       if (    __pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK
                && __pPresentationModel->GetAppControlSelectionMode() != APPCONTROL_SELECTION_MODE_MULTIPLE)
        {
                if (status == LIST_ITEM_STATUS_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);
+                               pArrayList->Construct();
 
-                               GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
-                               if (pApp != null)
-                               {
-                                       pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map);
-                                       pApp->Terminate();
-                               }
-                               else
+                               if (r == E_SUCCESS)
                                {
-                                       delete map;
+                                       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 pMap;
                        }
                }
        }
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-VideoListEditorPanel::OnListViewItemSwept(ListView& listView, int index, SweepDirection direction)
-{
-       AppLogDebug("ENTER");
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-VideoListEditorPanel::OnListViewContextItemStateChanged(ListView& listView, int index, int elementId,
-               ListContextItemStatus status)
-{
-       AppLogDebug("ENTER");
+       SetButtonState();
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -622,7 +515,7 @@ VideoListEditorPanel::OnFileInfoChanged(const ContentType contentType)
        {
                __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_VIDEO);
                __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
-               __pContentListView->UpdateList();
+               __pContentIconListView->UpdateList();
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
@@ -633,7 +526,7 @@ VideoListEditorPanel::OnThumbnailDecoded(const int index)
        AppLogDebug("ENTER : index(%d)", index);
        if (index >= 0)
        {
-               __pContentListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
+               __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
@@ -643,9 +536,12 @@ VideoListEditorPanel::OnSceneActivatedN(const SceneId& previousSceneId,
                                                                const SceneId& currentSceneId, IList* pArgs)
 {
        AppLogDebug("ENTER");
+       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_VIDEO_LIST_EDITOR)
                {
@@ -669,14 +565,14 @@ VideoListEditorPanel::OnSceneActivatedN(const SceneId& previousSceneId,
                                delete pArgs;
 
                                __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
-                               __pContentListView->UpdateList();
+                               __pContentIconListView->UpdateList();
                        }
                }
        }
        else
        {
                __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
-               __pContentListView->RequestRedraw(true);
+               __pContentIconListView->RequestRedraw(true);
        }
 
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -695,12 +591,12 @@ VideoListEditorPanel::GetItemCheckedCount(void) const
 {
        AppLogDebug("ENTER");
        int count = 0;
-       if (__pContentListView != null)
+       if (__pContentIconListView != null)
        {
                int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
                for (int i = 0; i < loopCount; ++i)
                {
-                       if (__pContentListView->IsItemChecked(i))
+                       if (__pContentIconListView->IsItemChecked(i))
                        {
                                ++count;
                        }
@@ -712,18 +608,18 @@ VideoListEditorPanel::GetItemCheckedCount(void) const
 }
 
 IList*
-VideoListEditorPanel::GetItemCheckedIndexList(void) const
+VideoListEditorPanel::GetItemCheckedIndexListN(void) const
 {
        AppLogDebug("ENTER");
        IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
-       Integer* pIndex=null;
+       Integer* pIndex = null;
 
-       if (__pContentListView != null)
+       if (__pContentIconListView != null)
        {
                int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
                for (int i = 0; i < loopCount; ++i)
                {
-                       if (__pContentListView->IsItemChecked(i))
+                       if (__pContentIconListView->IsItemChecked(i))
                        {
                                pIndex = new (std::nothrow) Integer(i);
                                pList->Add(pIndex);
@@ -736,34 +632,7 @@ VideoListEditorPanel::GetItemCheckedIndexList(void) const
 }
 
 void
-VideoListEditorPanel::OnRequestDelete(void)
-{
-       AppLogDebug("ENTER");
-       IList* pIndexList = GetItemCheckedIndexList();
-
-       if (pIndexList == null || pIndexList->GetCount() <= 0 || __pPresentationModel == null)
-       {
-               delete pIndexList;
-               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
-               return;
-       }
-       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 VideoListEditorPanel::OnFileOpInvalidate(enum FileActionMode actionId)
+VideoListEditorPanel::OnFileOpInvalidate(enum FileActionMode actionId)
 {
        SceneManager* pSceneManager = SceneManager::GetInstance();
        FileListEditorForm* pFileListEditorForm =
@@ -773,182 +642,146 @@ void VideoListEditorPanel::OnFileOpInvalidate(enum FileActionMode actionId)
        pFileListEditorForm->Invalidate(true);
 }
 
-void VideoListEditorPanel::OnFileOpComplete(enum FileActionMode actionId, enum FileActionCompleteRes res)
-{
-       if ( actionId == FILE_DELETE_ACTION )
-       {
-               //Do nothing
-       }
-       else if ( actionId == FILE_MOVE_ACTION )
-       {
-
-       }
-}
 void
-VideoListEditorPanel::OnRequestMessage(void)
+VideoListEditorPanel::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;
-       String path;
+       HashMap* pMap = new (std::nothrow) HashMap(SingleObjectDeleter);
+       result r = pMap->Construct();
 
-       int loopCount = pIndexList->GetCount();
-       for (int i = 0; i < loopCount; ++i)
+       if (r == E_SUCCESS)
        {
-               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)
-                       )
+               ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+               r = pArrayList->Construct();
+
+               if (r == E_SUCCESS)
                {
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
+                       Integer* pTemp = null;
+                       int loopCount = pIndexList->GetCount();
+
+                       for (int i = 0; i < loopCount; ++i)
+                       {
+                               pTemp = static_cast<Integer*>(pIndexList->GetAt(i));
+                               pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(pTemp->ToInt())));
+                       }
+
+                       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
                        {
-                               combineText.Append(L";");
+                               delete pMap;
                        }
-                       combineText.Append(path);
+               }
+               else
+               {
+                       delete pMap;
+                       delete pArrayList;
                }
        }
+       else
+       {
+               delete pMap;
+       }
 
-       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);
+       delete pIndexList;
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
 void
-VideoListEditorPanel::OnRequestEmail(void)
+VideoListEditorPanel::OnSelectAllPressed(void)
 {
-       AppLogDebug("ENTER");
-       IList* pIndexList = GetItemCheckedIndexList();
-       if (pIndexList->GetCount() <= 0)
+       bool needToSelectAll = true;
+       int checkedCount = GetItemCheckedCount();
+       int totalFileCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
+       if (checkedCount == totalFileCount)
        {
-               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
-               return;
+               needToSelectAll = false;
        }
 
-       String combineText;
-       String path;
-
-       int loopCount = pIndexList->GetCount();
-       for (int i = 0; i < loopCount; ++i)
+       if (needToSelectAll == true)
        {
-               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)
-                       )
+               for (int i = 0; i < totalFileCount; ++i)
                {
-                       if (combineText.CompareTo(EMPTY_SPACE) != 0)
+                       if (__pContentIconListView->IsItemChecked(i) == false)
                        {
-                               combineText.Append(L";");
+                               __pContentIconListView->SetItemChecked(i, true);
+                               __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
                        }
-                       combineText.Append(path);
+                       __pFileListEditorForm->SetFooterButtonsState(true);
                }
        }
-
-       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
-VideoListEditorPanel::OnRequestMoveTo(String& destDirectory)
-{
-       AppLogDebug("ENTER");
-       if (&destDirectory == null || destDirectory.IsEmpty())
+       else
        {
-               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
-               return;
+               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);
+               }
        }
 
-       IList* pIndexList = GetItemCheckedIndexList();
-       if (pIndexList == null || pIndexList->GetCount() <= 0)
+       String tempString;
+       if (needToSelectAll == true)
        {
-               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
-               return;
+               tempString.Format(LENGTH_COUNT_LABEL,
+                                               ResourceManager::GetString(L"IDS_VR_POP_PD_ITEMS_SELECTED").GetPointer(), totalFileCount);
+       }
+       else
+       {
+               tempString = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
        }
 
-       result r = __pPresentationModel->MoveToContentFileList(*pIndexList, destDirectory);
-       delete pIndexList;
-       TryReturn(r == E_SUCCESS, , "Failed on OnRequestDeleteAction");
-
-       __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL);
-       __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
-       __pContentListView->UpdateList();
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+       __pLabelSelectCnt->SetText(tempString);
+       __pLabelSelectCnt->RequestRedraw(true);
 }
 
 void
-VideoListEditorPanel::OnRequestAppExitWithMultipleSelectionAppControlResult(void)
+VideoListEditorPanel::SetButtonState(void)
 {
        AppLogDebug("ENTER");
-       IList* pIndexList = GetItemCheckedIndexList();
+       
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
 
-       if (pIndexList->GetCount() <= 0)
+       if (GetItemCheckedCount() > 0)
        {
-               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
-               return;
+               __pFileListEditorForm->SetFooterButtonsState(true);
        }
-
-       String combineText;
-
-       int loopCount = pIndexList->GetCount();
-       for (int i = 0; i < loopCount; ++i)
+       else
        {
-               combineText.Append(__pPresentationModel->GetContentFilePath(i));
-               combineText.Append(L";");
+               __pFileListEditorForm->SetFooterButtonsState(false);
        }
+       
+       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
 
-       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));
+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()));
 
-       GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
-       if (pApp != null)
-       {
-               pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map);
-               pApp->Terminate();
-       }
-       AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+       Rectangle clientAreaBounds = pForm->GetClientAreaBounds();
+       SetBounds(0, 0, clientAreaBounds.width, clientAreaBounds.height);
+       __pContentIconListView->SetBounds(0, 0, clientAreaBounds.width, clientAreaBounds.height);
 }