//
// 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
//
* @brief This is the implementation file for AlbumListEditorForm class.
*/
-#include <FApp.h>
#include "GlAlbumInfo.h"
#include "GlAlbumListEditorForm.h"
#include "GlAlbumListPresentationModel.h"
using namespace Tizen::Base::Collection;
using namespace Tizen::Content;
using namespace Tizen::Graphics;
-using namespace Tizen::Media;
using namespace Tizen::Io;
+using namespace Tizen::Media;
using namespace Tizen::System;
using namespace Tizen::Ui;
using namespace Tizen::Ui::Controls;
using namespace Tizen::Ui::Scenes;
-static const unsigned int COLOR_SELECT_COUNT_LABEL = Color32<68, 68, 68>::Value;
-static const unsigned int COLOR_SELECT_COUNT_FONT = Color32<255, 255, 255>::Value;
static const unsigned int COLOR_DELETE_BUTTON_NORMAL = Color32<208, 82, 82>::Value;
static const unsigned int COLOR_DELETE_BUTTON_PRESSED = Color32<194, 71, 71>::Value;
static const unsigned int COLOR_DELETE_BUTTON_TEXT = Color32<248, 246, 239>::Value;
-
-static const int W_FOLDER_SIZE = 334;
-static const int H_FOLDER_SIZE = 334;
-
-static const int W_BUTTON_RENAME_SIZE = 64;
-static const int H_BUTTON_RENAME_SIZE = 64;
+static const String RESERVED_CAMERA_PATH = Environment::GetMediaPath() + L"Camera" + DIRECTORY_SEPARATOR;
+static const String RESERVED_CAMERA_PATH_EXT = Environment::GetExternalStoragePath() + L"Camera" + DIRECTORY_SEPARATOR;
+static const String RESERVED_MEDIA_PATH = Environment::GetMediaPath();
+static const String RESERVED_EXTERNAL_MEDIA_PATH = Environment::GetExternalStoragePath();
static const int GAP_W_POPUP_ITEM = 5;
-static const int W_DELETE_POPUP = 600;
+static const int W_DELETE_POPUP = 620;
static const int H_DELETE_POPUP = 300;
static const int H_DELETE_LABEL = 180;
static const int Y_DELETE_BUTTON = 180;
static const int H_DELETE_BUTTON = 80;
-static const int X_POSITION_ICON_LIST_VIEW = 0;
-static const int Y_POSITION_ICON_LIST_VIEW = 80;
-
-static const int H_CHECKBOX = 80;
-static const int GAP_H_ICON_LIST_VIEW = 40;
-
-static const int H_SELECT_COUNT_LABEL = 48;
-
static const int FORMAT_BUFFER_SIZE = 256;
-static const int X_POSITION_SHARE_CONTEXTMENU = 300;
-static const int Y_POSITION_SHARE_CONTEXTMENU = 1180;
-
static const Color COLOR_FOLDER_BITMAP_DIM(Color::GetColor(COLOR_ID_BLACK));
static const int ALPHA_FOLDER_BITMAP_DIM = 70;
-AlbumListEditorForm::AlbumListEditorForm()
+static const int IDA_ALBUM_EDIT = 503 ;
+
+AlbumListEditorForm::AlbumListEditorForm(void)
: __checkedCount(0)
- , __pAllCheckButton(null)
, __pSelectCountLabel(null)
, __pEditorFolderIconList(null)
, __pShareContextMenu(null)
, __pDeletePopup(null)
- , __pEditFolderBitmap(null)
+ , __pFileUpdateTimer(null)
, __pPresentationModel(null)
{
AppLogDebug("ENTER");
- __overlayMsg = false;
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
-AlbumListEditorForm::~AlbumListEditorForm()
+AlbumListEditorForm::~AlbumListEditorForm(void)
{
AppLogDebug("ENTER");
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
AlbumListEditorForm::Initialize(void)
{
AppLogDebug("ENTER");
- result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
+ result r = Form::Construct(IDL_FORM_ALBUM_LIST_EDITOR);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return r;
AppLogDebug("ENTER");
result r = E_SUCCESS;
- SetRenameButtonImage();
+ SetOrientation(ORIENTATION_AUTOMATIC);
+ AddOrientationEventListener(*this);
__pPresentationModel = AlbumListPresentationModel::GetInstance();
__pPresentationModel->ClearThumbnailRequests();
- __pPresentationModel->AddPresentationModelListener(this);
+ r = __pPresentationModel->AddPresentationModelListener(this);
- r = InitializeHeader();
- if (r != E_SUCCESS)
- {
- AppLogDebug("[%s] Unable to InitializeHeader.", GetErrorMessage(r));
- }
-
- r = InitializeFooter();
- if (r != E_SUCCESS)
- {
- AppLogDebug("[%s] Unable to set InitializeFooter.", GetErrorMessage(r));
- }
+ SetFormBackEventListener(this);
+ GetHeader()->AddActionEventListener(*this);
+ GetFooter()->AddActionEventListener(*this);
r = InitializeControl();
if (r != E_SUCCESS)
AlbumListEditorForm::OnTerminating(void)
{
AppLogDebug("ENTER");
- __pPresentationModel->RemovePresentationModelListener(*this);
+ result r = E_SUCCESS;
+ r = __pPresentationModel->RemovePresentationModelListener(*this);
+ __pPresentationModel->RemoveContentEventListener(*this);
if (__pDeletePopup != null)
{
delete __pDeletePopup;
__pDeletePopup = null;
}
-
- if (__pEditFolderBitmap != null)
+ if (__pFileUpdateTimer != null)
{
- delete __pEditFolderBitmap;
- __pEditFolderBitmap = null;
+ delete __pFileUpdateTimer;
+ __pFileUpdateTimer = null;
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
- return E_SUCCESS;
+ return r;
}
void
-AlbumListEditorForm::OnUpdateContentList()
+AlbumListEditorForm::OnContentUpdated(void)
{
AppLogDebug("ENTER");
- SceneManager* pSceneManager = SceneManager::GetInstance();
- pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-result
-AlbumListEditorForm::SetRenameButtonImage(void)
-{
- AppLogDebug("ENTER");
- Bitmap* pSrcBitmap1 = ResourceManager::GetBitmapN(IDB_BUTTON_CIRCLE_BACKGROUND);
- Bitmap* pSrcBitmap2 = ResourceManager::GetBitmapN(IDB_BUTTON_RENAME);
-
- Bitmap* pBitmap = new (std::nothrow) Bitmap();
- BufferInfo bufferinfo;
- Canvas canvas;
- Dimension size(W_BUTTON_RENAME_SIZE, H_BUTTON_RENAME_SIZE);
- result r = pBitmap->Construct(size, BITMAP_PIXEL_FORMAT_ARGB8888);
- r = pBitmap->Lock(bufferinfo);
- r = canvas.Construct(bufferinfo);
-
- if (pSrcBitmap1 != null)
- {
- canvas.DrawBitmap(Point(0, 0), *pSrcBitmap1);
- delete pSrcBitmap1;
- pSrcBitmap1 = null;
- }
- if (pSrcBitmap2 != null)
- {
- canvas.DrawBitmap(Point(0, 0), *pSrcBitmap2);
- delete pSrcBitmap2;
- pSrcBitmap2 = null;
- }
-
- pBitmap->Unlock();
-
- __pEditFolderBitmap = pBitmap;
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-
- return E_SUCCESS;
-}
-
-result
-AlbumListEditorForm::InitializeHeader(void)
-{
- AppLogDebug("ENTER");
- Header* pHeader = GetHeader();
- if (pHeader == null)
+ int maxCount = __pPresentationModel->GetFolderCount();
+ if(__pDeletePopup != null)
{
- AppLogDebug("EXIT 1");
-
- return E_SYSTEM;
+ if(__pDeletePopup->IsVisible() == true)
+ {
+ __pDeletePopup->Destroy();
+ __pDeletePopup = null;
+ InitializePopup();
+ }
}
- result r = pHeader->SetStyle(HEADER_STYLE_TITLE);
- if (r != E_SUCCESS)
+ for (int i = 0; i < maxCount; ++i)
{
- AppLogDebug("EXIT 2");
-
- return r;
+ __pEditorFolderIconList->SetItemChecked(i, false);
}
-
- pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_GALLERY"));
- pHeader->AddActionEventListener(*this);
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-
- return E_SUCCESS;
}
result
-AlbumListEditorForm::InitializeFooter(void)
+AlbumListEditorForm::InitializeControl(void)
{
AppLogDebug("ENTER");
- Footer* pFooter = GetFooter();
- if (pFooter == null)
- {
- AppLogDebug("EXIT 1");
-
- return E_SYSTEM;
- }
-
- pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON);
- pFooter->RemoveAllItems();
- pFooter->SetBackButtonEnabled(true);
- pFooter->SetBackButton();
- SetFormBackEventListener(this);
-
- FooterItem itemShare;
- itemShare.Construct(ACTION_ID_FOOTER_SHARE);
- itemShare.SetText(ResourceManager::GetString(L"EMPTY_SPACE"));
- Bitmap* pShareBitmap = ResourceManager::GetBitmapN(IDB_CONTROLBAR_SHARE);
- Bitmap* pShareBitmapDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_SHARE_DIM);
- if (pShareBitmap != null && pShareBitmapDim !=null )
- {
- itemShare.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pShareBitmap);
- itemShare.SetIcon(FOOTER_ITEM_STATUS_DISABLED, pShareBitmapDim);
- }
-
- pFooter->AddItem(itemShare);
- delete pShareBitmap;
- delete pShareBitmapDim;
-
- FooterItem itemDelete;
- itemDelete.Construct(ACTION_ID_FOOTER_DELETE);
- itemDelete.SetText(ResourceManager::GetString(L"EMPTY_SPACE"));
- Bitmap* pBitmapDelete = ResourceManager::GetBitmapN(IDB_CONTROLBAR_DELETE);
- Bitmap* pBitmapDeleteDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_DELETE_DIM);
+ result r = E_SUCCESS;
+ String tempString;
- if (pBitmapDelete != null)
- {
- itemDelete.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmapDelete);
- }
+ __pSelectCountLabel = static_cast<Label*>(GetControl(L"IDC_LABEL_ALBUM_LIST_EDITOR_SELECTED"));
+ AppAssert(__pSelectCountLabel);
- if( pBitmapDeleteDim != null)
- {
- itemDelete.SetIcon(FOOTER_ITEM_STATUS_DISABLED, pBitmapDeleteDim);
- }
+ CreateIconListView();
+ __checkedCount = GetCheckedFolderCount();
- pFooter->AddItem(itemDelete);
- delete pBitmapDelete;
- delete pBitmapDeleteDim;
- pFooter->AddActionEventListener(*this);
+ r = InitializePopup();
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
- return E_SUCCESS;
-}
-
-result
-AlbumListEditorForm::InitializeControl()
-{
- AppLogDebug("ENTER");
- String tempString;
-
- CreateIconListView();
- __checkedCount = GetCheckedFolder();
- tempString.Format(FORMAT_BUFFER_SIZE, L"%ls (%d)",
- ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), __checkedCount);
-
- __pAllCheckButton = new (std::nothrow) CheckButton();
- __pAllCheckButton->Construct(Rectangle(0, 0, GetClientAreaBounds().width, H_CHECKBOX),
- CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_DEFAULT, false);
- __pAllCheckButton->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL"));
- __pAllCheckButton->SetActionId(ACTION_ID_CHECK_SELECT_ON, ACTION_ID_CHECK_SELECT_OFF);
- __pAllCheckButton->SetChromaKeyColor(Color(COLOR_SELECT_COUNT_LABEL));
- __pAllCheckButton->AddActionEventListener(*this);
- AddControl(*__pAllCheckButton);
-
- __pSelectCountLabel = new (std::nothrow) Label();
- __pSelectCountLabel->Construct(Rectangle(0, GetClientAreaBounds().height - H_SELECT_COUNT_LABEL,
- GetClientAreaBounds().width, H_SELECT_COUNT_LABEL), tempString);
-
- __pSelectCountLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
- __pSelectCountLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
- __pSelectCountLabel->SetBackgroundColor(Color(COLOR_SELECT_COUNT_LABEL));
- __pSelectCountLabel->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
- AddControl(*__pSelectCountLabel);
-
- __pShareContextMenu = new ContextMenu();
- __pShareContextMenu->Construct(Point(X_POSITION_SHARE_CONTEXTMENU, Y_POSITION_SHARE_CONTEXTMENU),
- CONTEXT_MENU_STYLE_LIST);
- __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MESSAGE"),
- ACTION_ID_CONTEXT_MENU_MESSAGE);
- __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"), ACTION_ID_CONTEXT_MENU_EMAIL);
- __pShareContextMenu->AddActionEventListener(*this);
-
- InitializePopup();
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-
- return E_SUCCESS;
+ return r;
}
result
{
__pDeletePopup = new (std::nothrow) Popup();
__pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP));
+ __pDeletePopup->SetPropagatedKeyEventListener(this);
Rectangle popupClientBounds = __pDeletePopup->GetClientAreaBounds();
Label* pLabel = new (std::nothrow) Label();
pLabel->Construct(Rectangle(0, 0, popupClientBounds.width, H_DELETE_LABEL),
ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q"));
+ pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pLabel->SetTextConfig(34,LABEL_TEXT_STYLE_BOLD);
Button* pDeleteButton = new (std::nothrow) Button();
pDeleteButton->Construct(
- Rectangle(0, Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM, H_DELETE_BUTTON),
+ Rectangle(10, Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM -10, H_DELETE_BUTTON),
ResourceManager::GetString(L"IDS_COM_BODY_DELETE"));
pDeleteButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_DELETE_BUTTON_NORMAL);
pDeleteButton->SetColor(BUTTON_STATUS_PRESSED, COLOR_DELETE_BUTTON_PRESSED);
pDeleteButton->SetTextColor(COLOR_DELETE_BUTTON_TEXT);
- pDeleteButton->SetActionId(ACTION_ID_DELETE_POPUP_DEL);
+ pDeleteButton->SetActionId(IDA_DELETE_POPUP_DEL);
pDeleteButton->AddActionEventListener(*this);
Button* pCancelButton = new (std::nothrow) Button();
pCancelButton->Construct(
Rectangle(popupClientBounds.width / 2 + GAP_W_POPUP_ITEM, Y_DELETE_BUTTON,
- popupClientBounds.width / 2 - GAP_W_POPUP_ITEM, H_DELETE_BUTTON),
+ popupClientBounds.width / 2 - GAP_W_POPUP_ITEM -10, H_DELETE_BUTTON),
ResourceManager::GetString(L"IDS_COM_POP_CANCEL"));
- pCancelButton->SetActionId(ACTION_ID_DELETE_POPUP_CANCEL);
+ pCancelButton->SetActionId(IDA_DELETE_POPUP_CANCEL);
pCancelButton->AddActionEventListener(*this);
- __pDeletePopup->AddControl(*pLabel);
- __pDeletePopup->AddControl(*pDeleteButton);
- __pDeletePopup->AddControl(*pCancelButton);
+ __pDeletePopup->AddControl(pLabel);
+ __pDeletePopup->AddControl(pDeleteButton);
+ __pDeletePopup->AddControl(pCancelButton);
}
else
{
AlbumListEditorForm::CreateIconListView(void)
{
AppLogDebug("ENTER");
- Dimension itemSize(W_FOLDER_SIZE, H_FOLDER_SIZE);
- __pEditorFolderIconList = new (std::nothrow) IconListView();
- __pEditorFolderIconList->Construct(Rectangle(X_POSITION_ICON_LIST_VIEW, Y_POSITION_ICON_LIST_VIEW,
- GetClientAreaBounds().width, GetClientAreaBounds().height - H_CHECKBOX - GAP_H_ICON_LIST_VIEW),
- itemSize, ICON_LIST_VIEW_STYLE_MARK, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL);
+
+
+ __pEditorFolderIconList = new IconListView();
+ __pEditorFolderIconList->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height - __pSelectCountLabel->GetHeight()),
+ Dimension(348, 348), ICON_LIST_VIEW_STYLE_MARK, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL);
+ __pEditorFolderIconList->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT);
+ __pEditorFolderIconList->SetTouchAnimationEnabled(false);
+ __pEditorFolderIconList->SetItemProvider(*this);
+ __pEditorFolderIconList->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE);
+ __pEditorFolderIconList->AddIconListViewItemEventListener(*this);
+
Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
+
if (pBitmap != null)
{
__pEditorFolderIconList->SetBitmapOfEmptyList(pBitmap);
delete pBitmap;
}
+
__pEditorFolderIconList->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
- __pEditorFolderIconList->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE);
- __pEditorFolderIconList->SetItemProvider(*this);
- __pEditorFolderIconList->SetTouchAnimationEnabled(false);
- __pEditorFolderIconList->AddIconListViewItemEventListener(*this);
- AddControl(*__pEditorFolderIconList);
+
+ AddControl(__pEditorFolderIconList);
+
__pEditorFolderIconList->SetShowState(true);
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
{
AppLogDebug("ENTER : index(%d)", index);
Bitmap* pBitmap = null;
- IconListViewItem* pIconListview = new IconListViewItem();
+ Canvas* pEditAlbumCanvas = null;
+ Bitmap* pEditAlbumBitmap = null;
+ Bitmap* pBitmapRenameBg = null;
+ Bitmap* pBitmapRename = null;
+ String albumName ;
+ int canvasWidth = 75;
+ int canvasHeight = 75;
+
+ IconListViewItem* pIconListviewItem = new (std::nothrow) IconListViewItem();
IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList();
AlbumInfo* pAlbumInfo = static_cast<AlbumInfo*>(pAlbumInfoList->GetAt(index));
canvas.FillRectangle(dimColor, canvas.GetBounds());
Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap();
pSelectedBitmap->Construct(canvas, canvas.GetBounds());
- pIconListview->Construct(*pBitmap, null, pSelectedBitmap);
+ pIconListviewItem->Construct(*pBitmap, null, pSelectedBitmap);
delete pSelectedBitmap;
- pSelectedBitmap = null;
}
}
else
{
- pIconListview->Construct(*pBitmap);
+ pIconListviewItem->Construct(*pBitmap);
}
if (pBitmap != null)
{
delete pBitmap;
}
+
+ pBitmapRenameBg = ResourceManager::GetBitmapN(IDB_ALBUM_EDIT_RENAME_BG);
+ pBitmapRename = ResourceManager::GetBitmapN(IDB_ALBUM_EDIT_RENAME);
+
+ if (pBitmapRenameBg != null && pBitmapRename != null)
+ {
+
+ pEditAlbumCanvas = new (std::nothrow) Canvas();
+ pEditAlbumCanvas->Construct(Rectangle(0, 0, canvasWidth, canvasHeight));
+ pEditAlbumCanvas->DrawBitmap(Point(0, 6), *pBitmapRenameBg);
+ pEditAlbumCanvas->DrawBitmap(Point(0, 6), *pBitmapRename);
+
+
+ pEditAlbumBitmap = new (std::nothrow) Bitmap();
+
+ if (pEditAlbumBitmap != NULL)
+ {
+ pEditAlbumBitmap->Construct(*pEditAlbumCanvas, Rectangle(0, 0, canvasWidth, canvasHeight));
+
+ }
+ delete pEditAlbumCanvas;
+
+ albumName = pAlbumInfo->GetAlbumName();
+ String reservedCameraName = ResourceManager::GetString(L"IDS_MEDIABR_BODY_CAMERA_ROLL_ABB");
+ String albumPath = pAlbumInfo->GetDirectory(0);
+ albumPath.Append(DIRECTORY_SEPARATOR);
+
+ if (index == 0 || (reservedCameraName.Equals(albumName, true) &&
+ (RESERVED_CAMERA_PATH.Equals(albumPath, true) || RESERVED_CAMERA_PATH_EXT.Equals(albumPath, true)))
+ || RESERVED_MEDIA_PATH.Equals(albumPath, true) || RESERVED_EXTERNAL_MEDIA_PATH.Equals(albumPath, true))
+ {
+ // rename disabled
+ }
+ else
+ {
+ pIconListviewItem->SetOverlayBitmap(IDA_ALBUM_EDIT, pEditAlbumBitmap, ALIGNMENT_RIGHT, ALIGNMENT_TOP);
+ }
+
+ if (pEditAlbumBitmap != null)
+ {
+ delete pEditAlbumBitmap;
+ }
+ }
+
+ if (pBitmapRenameBg)
+ {
+ delete pBitmapRenameBg;
+ }
+ if (pBitmapRename)
+ {
+ delete pBitmapRename;
+ }
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
- return pIconListview;
+ return pIconListviewItem;
}
void
AlbumListEditorForm::OnIconListViewItemStateChanged(IconListView& view, int index, IconListViewItemStatus status)
{
AppLogDebug("ENTER");
- String tempString;
if (status == ICON_LIST_VIEW_ITEM_CHECKED || status == ICON_LIST_VIEW_ITEM_UNCHECKED)
{
- __checkedCount = GetCheckedFolder();
- tempString.Format(FORMAT_BUFFER_SIZE, L"%ls (%d)",
- ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), __checkedCount);
- __pSelectCountLabel->SetText(tempString);
- __pSelectCountLabel->RequestRedraw();
- __pEditorFolderIconList->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
- int maxCount = __pPresentationModel->GetFolderCount();
+ if (status == ICON_LIST_VIEW_ITEM_CHECKED)
+ {
+ ++__checkedCount;
+ }
+ else if (status == ICON_LIST_VIEW_ITEM_UNCHECKED)
+ {
+ --__checkedCount;
+ }
- if (__pAllCheckButton->IsSelected() == true)
+ String tempString;
+ if (__checkedCount == 0)
+ {
+ tempString = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
+ }
+ else if (__checkedCount == 1)
{
- __pAllCheckButton->SetSelected(false);
+ tempString = ResourceManager::GetString(L"IDS_VR_POP_1_ITEM_SELECTED");
}
else
{
- if (__checkedCount == maxCount)
- {
- AppLogDebug("SELECTIONTEST(%d)(%d)",__checkedCount, maxCount);
- __pAllCheckButton->SetSelected(true);
- }
+ tempString.Format(FORMAT_BUFFER_SIZE, ResourceManager::GetString(L"IDS_VR_POP_PD_ITEMS_SELECTED").GetPointer(), __checkedCount);
}
+
+ __pSelectCountLabel->SetText(tempString);
+ __pSelectCountLabel->RequestRedraw();
+ __pEditorFolderIconList->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
}
+
SetButtonState();
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
AppLogDebug("ENTER");
SceneManager* pSceneManager = SceneManager::GetInstance();
- if (overlayBitmapId == ACTION_ID_EDITE_FOLDER)
- {
- ArrayList* pSelectedIndex = new (std::nothrow) ArrayList(SingleObjectDeleter);
- pSelectedIndex->Construct();
- pSelectedIndex->Add(new (std::nothrow) Integer(index));
+ ArrayList* pSelectedIndex = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pSelectedIndex->Construct();
+ //Adding the Action Type
+ pSelectedIndex->Add(new (std::nothrow) Integer(ALBUM_RENAME));
+ pSelectedIndex->Add(new (std::nothrow) Integer(FILE_ACTION_MOVE));
+ pSelectedIndex->Add(new (std::nothrow) Integer(index));
- pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pSelectedIndex);
+ if( __pEditorFolderIconList->IsItemChecked(index) == false )
+ {
+ __pEditorFolderIconList->SetItemChecked(index,true);
}
+ else
+ {
+ __pEditorFolderIconList->SetItemChecked(index,false);
+ }
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pSelectedIndex);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
}
result
-AlbumListEditorForm::DeleteFolder()
+AlbumListEditorForm::DeleteFolder(void)
{
- AppLogDebug("ENTER");
- int maxCount = __pPresentationModel->GetFolderCount();
- result r = E_FAILURE;
- int checkedCount = 0;
+ AppLogDebug("ENTER");
+ IList* pIndexList = GetItemCheckedIndexListN();
+ if (pIndexList->GetCount() <= 0)
+ {
+ delete pIndexList;
+ AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
+ return E_FAILURE;
+ }
- for (int i = 0 ; i < maxCount; ++i)
+ if (__pFileUpdateTimer != null)
{
- if (__pEditorFolderIconList->IsItemChecked(i) == true)
- {
- ++checkedCount;
- __pPresentationModel->DeleteContentInfoInDirectory(i, CONTENT_TYPE_ALL);
- if (i == 0)
- {
- break;
- }
- }
+ delete __pFileUpdateTimer;
}
+ __pFileUpdateTimer = new (std::nothrow) FileUpdateTimer(pIndexList, __pPresentationModel, this, FILE_ACTION_DELETE);
+ result r = __pFileUpdateTimer->StartTimer();
- if (checkedCount == 0)
+ if (IsFailed(r))
{
- r = E_FAILURE;
+ delete __pFileUpdateTimer;
+ __pFileUpdateTimer = null;
+ return E_FAILURE;
}
else
{
- r = E_SUCCESS;
- __pAllCheckButton->SetSelected(true);
- __pAllCheckButton->RequestRedraw(true);
+ __pPresentationModel->SetUpdateProgressStatus(true);
}
+ return E_SUCCESS;
+}
- SetAllCheckState(false);
- __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_ALL);
- __pEditorFolderIconList->UpdateList();
+IList*
+AlbumListEditorForm::GetItemCheckedIndexListN(void) const
+{
+ AppLogDebug("ENTER");
+ IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ Integer* pIndex = null;
+
+ if (__pEditorFolderIconList!=null)
+ {
+ int loopCount = __pPresentationModel->GetFolderCount();
+ for (int i = 0; i < loopCount; ++i)
+ {
+ if (__pEditorFolderIconList->IsItemChecked(i) == true)
+ {
+ pIndex = new (std::nothrow) Integer(i);
+ pList->Add(pIndex);
+ AppLogDebug("checked index(%d)", i);
+ }
+ }
+ }
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
- return r;
+ return pList;
}
void
-AlbumListEditorForm::SetAllCheckState(bool state)
+AlbumListEditorForm::SetAllCheckState(const bool state)
{
AppLogDebug("ENTER");
+
int maxCount = __pPresentationModel->GetFolderCount();
String tempString;
if (state == true)
{
- tempString.Format(FORMAT_BUFFER_SIZE, L"%ls (%d)",
- ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), maxCount);
+ if (maxCount == 1)
+ {
+ tempString = ResourceManager::GetString(L"IDS_VR_POP_1_ITEM_SELECTED;");
+ }
+ else
+ {
+ tempString.Format(FORMAT_BUFFER_SIZE,
+ ResourceManager::GetString(L"IDS_VR_POP_PD_ITEMS_SELECTED").GetPointer(), maxCount);
+ }
}
else
{
- tempString.Format(FORMAT_BUFFER_SIZE, L"%ls (%d)",
- ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0);
+ tempString = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
}
- for (int i = 0 ; i < maxCount; ++i)
+ for (int i = 0; i < maxCount; ++i)
{
__pEditorFolderIconList->SetItemChecked(i, state);
__pEditorFolderIconList->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
__pEditorFolderIconList->Draw();
__pSelectCountLabel->SetText(tempString);
__pSelectCountLabel->RequestRedraw();
- __checkedCount = GetCheckedFolder();
+ __checkedCount = GetCheckedFolderCount();
SetButtonState();
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
int
-AlbumListEditorForm::GetCheckedFolder()
+AlbumListEditorForm::GetCheckedFolderCount(void) const
{
AppLogDebug("ENTER");
int maxCount = __pPresentationModel->GetFolderCount();
AppLogDebug("ENTER");
switch (actionId)
{
- case ACTION_ID_CHECK_SELECT_ON:
- SetAllCheckState(true);
- break;
- case ACTION_ID_CHECK_SELECT_OFF:
- SetAllCheckState(false);
- break;
- case ACTION_ID_FOOTER_DELETE:
- if (__checkedCount > 0)
+ case IDA_ALBUM_LIST_SELECT_ALL:
+ {
+ if (__pPresentationModel->GetFolderCount() == GetCheckedFolderCount())
{
- __pDeletePopup->SetShowState(true);
- __pDeletePopup->Show();
+ SetAllCheckState(false);
}
- break;
- case ACTION_ID_FOOTER_SHARE:
+ else
+ {
+ SetAllCheckState(true);
+ }
+ }
+ break;
+
+ case IDA_FOOTER_DELETE:
+ {
+ __pDeletePopup->SetShowState(true);
+ __pDeletePopup->Show();
+ }
+ break;
+
+ case IDA_FOOTER_SHARE:
+ {
+
+ if( __pShareContextMenu != NULL)
+ {
+ delete __pShareContextMenu;
+ __pShareContextMenu = null;
+ }
+
+ __pShareContextMenu = new (std::nothrow) ContextMenu();
+ __pShareContextMenu->Construct(Point(GetClientAreaBounds().width/3 + 15, GetClientAreaBounds().height + __pSelectCountLabel->GetHeight() + 5),
+ CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD);
+ __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MESSAGE"),
+ IDA_CONTEXT_MENU_MESSAGE);
+ __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"), IDA_CONTEXT_MENU_EMAIL);
+ __pShareContextMenu->SetFocusable(true);
+ __pShareContextMenu->AddActionEventListener(*this);
__pShareContextMenu->SetShowState(true);
__pShareContextMenu->Show();
- break;
- case ACTION_ID_CONTEXT_MENU_MESSAGE:
+ }
+ break;
+
+ case IDA_CONTEXT_MENU_MESSAGE:
{
OnRequestMessage();
- break;
}
- case ACTION_ID_CONTEXT_MENU_EMAIL:
+ break;
+
+ case IDA_CONTEXT_MENU_EMAIL:
{
OnRequestEmail();
- break;
}
- case ACTION_ID_DELETE_POPUP_DEL:
+ break;
+
+ case IDA_DELETE_POPUP_DEL:
{
__pDeletePopup->SetShowState(false);
__pDeletePopup->Show();
- result r = DeleteFolder();
- AppLogDebug("CHECKBUTTONSTATE : R1");
- if (r == E_SUCCESS)
- {
- AppLogDebug("CHECKBUTTONSTATE : R2");
- SceneManager* pSceneManager = SceneManager::GetInstance();
- AppAssert(pSceneManager);
- pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
- }
- AppLogDebug("CHECKBUTTONSTATE : R3");
- break;
+ DeleteFolder();
}
- case ACTION_ID_DELETE_POPUP_CANCEL:
+ break;
+
+ case IDA_DELETE_POPUP_CANCEL:
{
__pDeletePopup->SetShowState(false);
__pDeletePopup->Show();
- break;
}
+ break;
+
default:
break;
}
const SceneId& currentSceneId, IList* pArgs)
{
AppLogDebug("ENTER OnSceneActivatedN");
- __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_ALL);
- __pEditorFolderIconList->UpdateList();
+ String tempString;
- __checkedCount = GetCheckedFolder();
- String tempString;
- tempString.Format(FORMAT_BUFFER_SIZE, L"%ls (%d)",
- ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), __checkedCount);
- __pSelectCountLabel->SetText(tempString);
- __pSelectCountLabel->RequestRedraw();
+ int count = __pPresentationModel->GetFolderCount();
- int maxCount = __pPresentationModel->GetFolderCount();
- if (__checkedCount != 0 && __checkedCount == maxCount)
+ __pPresentationModel->AddContentEventListener(this);
+
+ __checkedCount = GetCheckedFolderCount();
+
+ if ( previousSceneId == IDSCN_ALBUM_NAME_EDITOR )
{
- __pAllCheckButton->SetSelected(true);
+
+ if (__checkedCount == 0)
+ {
+ tempString = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
+ }
+ else
+ {
+ tempString.Format(FORMAT_BUFFER_SIZE,
+ ResourceManager::GetString(L"IDS_VR_POP_PD_ITEMS_SELECTED").GetPointer(), __checkedCount);
+ }
}
else
{
- __pAllCheckButton->SetSelected(false);
+ __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_ALL);
+
+ for ( int index = 0 ; index < count ; index++ )
+ {
+ __pEditorFolderIconList->SetItemChecked(index,false);
+ }
+
+ __pEditorFolderIconList->UpdateList();
+
+ tempString = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
}
+ __pSelectCountLabel->SetText(tempString);
+ __pSelectCountLabel->Invalidate(true);
+
SetButtonState();
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
void
-AlbumListEditorForm::OnSceneDeactivated(const SceneId& currentSceneId,
- const SceneId& nextSceneId)
+AlbumListEditorForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
{
AppLogDebug("ENTER");
+ __pPresentationModel->RemoveContentEventListener(*this);
+
+ if (nextSceneId != IDSCN_ALBUM_NAME_EDITOR )
+ {
+ int loopCount = __pPresentationModel->GetFolderCount();
+
+ for( int count = 0 ; count < loopCount ; count++ )
+ {
+ __pEditorFolderIconList->SetItemChecked(count,false);
+ }
+ __pEditorFolderIconList->UpdateList();
+ }
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
+void AlbumListEditorForm::OnFileOpInvalidate(enum FileActionMode actionId)
+{
+ Invalidate(true);
+}
+
+void AlbumListEditorForm::OnFileOpComplete(enum FileActionMode actionId, enum FileActionCompleteRes res)
+{
+ AppLogDebug("ENTER");
+ __pPresentationModel->SetUpdateProgressStatus(false);
+ SetAllCheckState(false);
+ __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_ALL);
+ __pEditorFolderIconList->UpdateList();
+
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+}
+
+bool AlbumListEditorForm::OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("ENTER");
+
+ if(keyEventInfo.GetKeyCode() == KEY_BACK)
+ {
+ __pDeletePopup->SetShowState(false);
+ __pDeletePopup->Show();
+ }
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+ return false;
+}
+
result
AlbumListEditorForm::Update(void)
{
{
AppLogDebug("ENTER");
- int checkCount = GetCheckedFolder();
+ int checkCount = GetCheckedFolderCount();
if (checkCount <= 0)
{
return;
}
- String combineText;
-
IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList();
int maxCount = __pPresentationModel->GetFolderCount();
if (maxCount <= 0)
{
AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
-
return;
}
- for (int i = 0 ; i < maxCount; ++i)
+
+ ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pArrayList->Construct();
+ for (int i = 0; i < maxCount; ++i)
{
if (__pEditorFolderIconList->IsItemChecked (i))
{
{
break;
}
- String path = pContentInfo->GetContentPath();
- if (combineText.CompareTo(EMPTY_SPACE) != 0)
- {
- combineText.Append(L";");
- }
- combineText.Append(path);
+
+ pArrayList->Add(new (std::nothrow) String(pContentInfo->GetContentPath()));
}
if (i == 0)
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()));
}
{
AppLogDebug("ENTER");
- int checkCount = GetCheckedFolder();
+ int checkCount = GetCheckedFolderCount();
if (checkCount <= 0)
{
return;
}
- String combineText;
-
IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList();
int maxCount = __pPresentationModel->GetFolderCount();
if (maxCount <= 0)
{
AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
-
return;
}
- for (int i = 0 ; i < maxCount; ++i)
+
+ ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pArrayList->Construct();
+ for (int i = 0; i < maxCount; ++i)
{
- if (__pEditorFolderIconList->IsItemChecked (i))
+ if (__pEditorFolderIconList->IsItemChecked(i))
{
AlbumInfo* pAlbumInfo = static_cast<AlbumInfo*>(pAlbumInfoList->GetAt(i));
IList* pContentIdList = pAlbumInfo->GetContentIdListN();
{
break;
}
- String path = pContentInfo->GetContentPath();
- if (combineText.CompareTo(EMPTY_SPACE) != 0)
- {
- combineText.Append(L";");
- }
- combineText.Append(path);
+
+ pArrayList->Add(new (std::nothrow) String(pContentInfo->GetContentPath()));
}
if (i == 0)
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);
- __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL,
- APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null);
+ 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);
+ }
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
void
-AlbumListEditorForm::SetFooterButtonsState(bool enableState)
+AlbumListEditorForm::SetFooterButtonsState(const bool enableState)
{
AppLogDebug("ENTER");
Footer* pFooter = GetFooter();
AlbumListEditorForm::SetButtonState(void)
{
AppLogDebug("ENTER");
- if (GetCheckedFolder() > 0)
+ if (GetCheckedFolderCount() > 0)
{
AppLogDebug("BUTTONSTATE : Request Enable");
SetFooterButtonsState(true);
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
+
+
+void
+AlbumListEditorForm::OnOrientationChanged(const Tizen::Ui::Control &source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+
+ IList* pIndexList = GetItemCheckedIndexListN();
+
+ if( __pEditorFolderIconList != null )
+ {
+ RemoveControl(__pEditorFolderIconList);
+ }
+
+ __pEditorFolderIconList = new IconListView();
+
+ if( orientationStatus == ORIENTATION_STATUS_PORTRAIT )
+ {
+ __pEditorFolderIconList->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height- __pSelectCountLabel->GetHeight()),
+ Dimension(348, 348), ICON_LIST_VIEW_STYLE_MARK, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL);
+ }
+ else if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE || orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ int horizontalSpacing = 8;
+ int verticalSpacing = 60;
+ int height = 424;
+ int width = 410;
+
+ __pEditorFolderIconList->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height - __pSelectCountLabel->GetHeight()),
+ Dimension(width, height), ICON_LIST_VIEW_STYLE_MARK, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL);
+
+ __pEditorFolderIconList->SetItemSpacing(horizontalSpacing, verticalSpacing);
+ __pEditorFolderIconList->SetMargin(MARGIN_TYPE_TOP,40);
+ }
+
+ Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
+
+ if (pBitmap != null)
+ {
+ __pEditorFolderIconList->SetBitmapOfEmptyList(pBitmap);
+ delete pBitmap;
+ }
+
+ __pEditorFolderIconList->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT);
+ __pEditorFolderIconList->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
+ __pEditorFolderIconList->SetTouchAnimationEnabled(false);
+ __pEditorFolderIconList->SetItemProvider(*this);
+ __pEditorFolderIconList->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE);
+ __pEditorFolderIconList->AddIconListViewItemEventListener(*this);
+
+ AddControl(__pEditorFolderIconList);
+
+ int loopCount = pIndexList->GetCount();
+ int index = -1 ;
+ for(int count = 0 ; count < loopCount; count ++)
+ {
+ Integer* pRealIndex = static_cast<Integer*>(pIndexList->GetAt(count));
+ index = pRealIndex->ToInt();
+ __pEditorFolderIconList->SetItemChecked(index, true);
+ __pEditorFolderIconList->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
+ }
+
+}
+