2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file GlVideoListEditorPanel.cpp
19 * @brief This is the implementation file for VideoListEditorPanel class.
24 #include "GlAlbumInfo.h"
25 #include "GlCommonUtil.h"
26 #include "GlFileListPresentationModel.h"
27 #include "GlGalleryApp.h"
28 #include "GlResourceManager.h"
30 #include "GlVideoListEditorPanel.h"
31 #include "GlFileListEditorForm.h"
32 #include "GlFileUpdateTimer.h"
34 using namespace Tizen::App;
35 using namespace Tizen::Base;
36 using namespace Tizen::Base::Collection;
37 using namespace Tizen::Content;
38 using namespace Tizen::Graphics;
39 using namespace Tizen::Media;
40 using namespace Tizen::Ui::Controls;
41 using namespace Tizen::Ui::Scenes;
43 static const unsigned int COLOR_COUNT_LABEL = Color32<68, 68, 68>::Value;
44 static const unsigned int COLOR_SELECT_COUNT_FONT = Color32<255, 255, 255>::Value;
45 static const Color COLOR_THUMBNAIL_DIM (Color::GetColor(COLOR_ID_BLACK));
46 static const Rectangle RECT_VIDEO_THUMBNAIL(16, 16, 172, 128);
47 static const Rectangle RECT_INITIAL(0, 0, 10, 10);
49 static const int H_SELECTALL_REGION = 112;
50 static const int ALPHA_THUMBNAIL_DIM = 70;
51 static const int H_COUNT_LABEL = 48;
52 static const int COUNT_LABEL_FONT_SIZE = 33;
53 static const int LENGTH_COUNT_LABEL = 256;
54 static const int W_CLIENT_REGION = 720;
55 static const int H_VIDEO_ITEM = 160;
56 static const int GAP_W_VIDEO_TITLE = 16+172+16;
57 static const int GAP_H_VIDEO_TITLE = 22;
58 static const int W_VIDEO_TITLE = (16+172+16)+(16+64+16);
59 static const int H_VIDEO_TITLE = 64;
60 static const int FONT_SIZE_TITLE = 36;
61 static const int GAP_W_VIDEO_DURATION = 16+172+16;
62 static const int GAP_H_VIDEO_DURATION = 22+64;
63 static const int W_VIDEO_DURATION = (16+172+16)+(16+64+16);
64 static const int H_VIDEO_DURATION = 48;
65 static const int FONT_SIZE_DURATION = 32;
67 VideoListEditorPanel::VideoListEditorPanel(void)
68 : __pContentIconListView(null)
69 , __pCheckButton(null)
70 , __pLabelSelectCnt(null)
72 , __pPresentationModel(null)
74 , __pFileListEditorForm(null)
77 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
80 VideoListEditorPanel::~VideoListEditorPanel(void)
84 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
88 VideoListEditorPanel::Initialize(void)
91 result r = Construct(RECT_INITIAL);
92 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
98 VideoListEditorPanel::OnInitializing(void)
100 AppLogDebug("ENTER");
101 const Form* pForm = dynamic_cast<Form*>(GetParent());
102 TryReturn(pForm != null, E_FAILURE, "[%s] fail to get the form.", GetErrorMessage(GetLastResult()));
104 __pPresentationModel = FileListPresentationModel::GetInstance();
105 __pPresentationModel->ClearThumbnailRequests();
106 __pPresentationModel->AddPresentationModelListener(this);
109 Rectangle clientAreaBounds = pForm->GetClientAreaBounds();
110 clientAreaBounds.x = clientAreaBounds.y = 0;
111 SetBounds(clientAreaBounds);
113 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
115 __pContentIconListView = new (std::nothrow) ListView();
117 if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
119 __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width, clientAreaBounds.height), true, false);
120 Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
121 if (pBitmapEmpty != null)
123 __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
126 __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
127 __pContentIconListView->SetItemProvider(*this);
128 __pContentIconListView->AddListViewItemEventListener(*this);
129 AddControl(*__pContentIconListView);
130 __pContentIconListView->SetShowState(true);
134 __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width,
135 clientAreaBounds.height), true, false);
136 Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
137 if (pBitmapEmpty != null)
139 __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
142 __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
143 __pContentIconListView->SetItemProvider(*this);
144 __pContentIconListView->AddListViewItemEventListener(*this);
145 AddControl(*__pContentIconListView);
146 __pContentIconListView->SetShowState(true);
151 __pContentIconListView = new (std::nothrow) ListView();
152 __pContentIconListView->Construct(
153 Rectangle(0, H_SELECTALL_REGION, W_CLIENT_REGION, clientAreaBounds.height - H_SELECTALL_REGION),
155 Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
156 if (pBitmapEmpty != null)
158 __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
161 __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
162 __pContentIconListView->SetItemProvider(*this);
163 __pContentIconListView->AddListViewItemEventListener(*this);
164 AddControl(*__pContentIconListView);
165 __pContentIconListView->SetShowState(true);
167 __pLabelSelectCnt = new (std::nothrow) Label();
168 __pLabelSelectCnt->Construct(
169 Rectangle(0, clientAreaBounds.height - H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL),
170 ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED"));
171 __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
172 __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
173 __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL);
174 __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
175 __pLabelSelectCnt->SetTextConfig(COUNT_LABEL_FONT_SIZE, LABEL_TEXT_STYLE_BOLD);
176 AddControl(*__pLabelSelectCnt);
179 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
185 VideoListEditorPanel::OnTerminating(void)
187 AppLogDebug("ENTER");
188 __pPresentationModel->RemovePresentationModelListener(*this);
189 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
195 VideoListEditorPanel::GetItemCount(void)
197 AppLogDebug("ENTER");
198 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
204 VideoListEditorPanel::CreateItem(int index, int itemWidth)
206 AppLogDebug("ENTER : index(%d)", index);
207 CustomItem* pItem = new (std::nothrow) CustomItem();
209 Bitmap* pBitmap = null;
210 String* pItemText = null;
211 String* pTitle = null;
212 String* pDuration = null;
214 result r = __pPresentationModel->GetThumbnailVideoInSyncCacheN(index, pItemText, pBitmap, pDuration);
215 if (pBitmap == null || r == E_FAILURE)
217 __pPresentationModel->RequestThumbnail(index);
218 pBitmap = CommonUtil::GetEmptyThumbnailN();
221 if (pItemText == null)
223 pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE"));
226 pTitle = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE"));
228 if (pDuration == null)
230 pDuration = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE"));
233 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
235 if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
237 pItem->Construct(Dimension(itemWidth, H_VIDEO_ITEM), LIST_ANNEX_STYLE_MARK);
239 if (__pContentIconListView->IsItemChecked(index) == true)
243 BufferInfo bufferInfo;
244 pBitmap->Lock(bufferInfo, INFINITE);
247 Color dimColor(COLOR_THUMBNAIL_DIM);
248 dimColor.SetAlpha(ALPHA_THUMBNAIL_DIM);
251 canvas.Construct(bufferInfo);
252 canvas.FillRectangle(dimColor, canvas.GetBounds());
254 Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap();
255 pSelectedBitmap->Construct(canvas, canvas.GetBounds());
256 pItem->AddElement(RECT_VIDEO_THUMBNAIL, IDA_FORMAT_THUMBNAIL, *pBitmap, pSelectedBitmap);
257 delete pSelectedBitmap;
261 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
270 pItem->AddElement(RECT_VIDEO_THUMBNAIL, IDA_FORMAT_THUMBNAIL, *pBitmap);
275 pTitle = new (std::nothrow) String(SINGLE_SPACE);
277 else if (pTitle->IsEmpty() == true)
280 pTitle = new (std::nothrow) String(SINGLE_SPACE);
283 Rectangle titleRect(GAP_W_VIDEO_TITLE, GAP_H_VIDEO_TITLE, itemWidth-W_VIDEO_TITLE, H_VIDEO_TITLE);
284 pItem->AddElement(titleRect, IDA_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE,
285 Color::GetColor(COLOR_ID_BLACK),null,null,false);
287 Rectangle durationRect(GAP_W_VIDEO_DURATION, GAP_H_VIDEO_DURATION, itemWidth-W_VIDEO_DURATION,
289 pItem->AddElement(durationRect, IDA_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION,
290 Color::GetColor(COLOR_ID_GREY),null,null,false);
294 pItem->Construct(Dimension(itemWidth, H_VIDEO_ITEM), LIST_ANNEX_STYLE_NORMAL);
295 pItem->AddElement(RECT_VIDEO_THUMBNAIL, IDA_FORMAT_THUMBNAIL, *pBitmap);
299 pTitle = new (std::nothrow) String(SINGLE_SPACE);
301 else if (pTitle->IsEmpty() == true)
304 pTitle = new (std::nothrow) String(SINGLE_SPACE);
307 Rectangle titleRect(GAP_W_VIDEO_TITLE, GAP_H_VIDEO_TITLE, itemWidth-W_VIDEO_TITLE, H_VIDEO_TITLE);
308 pItem->AddElement(titleRect, IDA_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE,
309 Color::GetColor(COLOR_ID_BLACK), null, null, false);
311 Rectangle durationRect(GAP_W_VIDEO_DURATION, GAP_H_VIDEO_DURATION, itemWidth-W_VIDEO_DURATION,
313 pItem->AddElement(durationRect, IDA_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION,
314 Color::GetColor(COLOR_ID_GREY), null, null, false);
319 pItem->Construct(Dimension(itemWidth, H_VIDEO_ITEM), LIST_ANNEX_STYLE_MARK);
320 if (__pContentIconListView->IsItemChecked(index) == true)
324 BufferInfo bufferInfo;
325 pBitmap->Lock(bufferInfo, INFINITE);
327 Color dimColor(COLOR_THUMBNAIL_DIM);
328 dimColor.SetAlpha(ALPHA_THUMBNAIL_DIM);
331 canvas.Construct(bufferInfo);
332 canvas.FillRectangle(dimColor, canvas.GetBounds());
334 Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap();
335 pSelectedBitmap->Construct(canvas, canvas.GetBounds());
336 pItem->AddElement(RECT_VIDEO_THUMBNAIL, IDA_FORMAT_THUMBNAIL, *pBitmap, pSelectedBitmap);
337 delete pSelectedBitmap;
341 pItem->AddElement(RECT_VIDEO_THUMBNAIL, IDA_FORMAT_THUMBNAIL, *pBitmap);
346 pItem->AddElement(RECT_VIDEO_THUMBNAIL, IDA_FORMAT_THUMBNAIL, *pBitmap);
351 pTitle = new (std::nothrow) String(SINGLE_SPACE);
353 else if (pTitle->IsEmpty() == true)
356 pTitle = new (std::nothrow) String(SINGLE_SPACE);
359 Rectangle titleRect(GAP_W_VIDEO_TITLE, GAP_H_VIDEO_TITLE, itemWidth-W_VIDEO_TITLE, H_VIDEO_TITLE);
360 pItem->AddElement(titleRect, IDA_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE,
361 Color::GetColor(COLOR_ID_BLACK), null, null, false);
363 Rectangle durationRect(GAP_W_VIDEO_DURATION, GAP_H_VIDEO_DURATION, itemWidth - W_VIDEO_DURATION,
365 pItem->AddElement(durationRect, IDA_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION,
366 Color::GetColor(COLOR_ID_GREY), null, null, false);
373 if (pItemText != null)
381 if (pDuration != null)
385 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
391 VideoListEditorPanel::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
393 AppLogDebug("ENTER");
395 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
401 VideoListEditorPanel::OnListViewItemStateChanged(ListView& listView, int index, int elementId,
402 ListItemStatus status)
404 AppLogDebug("ENTER");
406 if (status == LIST_ITEM_STATUS_CHECKED || status == LIST_ITEM_STATUS_UNCHECKED)
408 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
410 if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
412 int checkedCount = GetItemCheckedCount();
414 if (checkedCount == 0)
416 strTmp = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
418 else if (checkedCount == 1)
420 strTmp = ResourceManager::GetString(L"IDS_VR_POP_1_ITEM_SELECTED");
424 strTmp.Format(LENGTH_COUNT_LABEL,
425 ResourceManager::GetString(L"IDS_VR_POP_PD_ITEMS_SELECTED").GetPointer(), checkedCount);
428 __pLabelSelectCnt->SetText(strTmp);
429 __pLabelSelectCnt->RequestRedraw(true);
430 __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
435 int checkedCount = GetItemCheckedCount();
437 if (checkedCount == 0)
439 strTmp = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
441 else if (checkedCount == 1)
443 strTmp = ResourceManager::GetString(L"IDS_VR_POP_1_ITEM_SELECTED");
447 strTmp.Format(LENGTH_COUNT_LABEL,
448 ResourceManager::GetString(L"IDS_VR_POP_PD_ITEMS_SELECTED").GetPointer(), checkedCount);
451 __pLabelSelectCnt->SetText(strTmp);
452 __pLabelSelectCnt->RequestRedraw(true);
453 if (__pCheckButton->IsSelected())
455 __pCheckButton->SetSelected(false);
457 __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
461 if ( __pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK
462 && __pPresentationModel->GetAppControlSelectionMode() != APPCONTROL_SELECTION_MODE_MULTIPLE)
464 if (status == LIST_ITEM_STATUS_SELECTED)
466 HashMap* pMap = new (std::nothrow) HashMap(SingleObjectDeleter);
467 result r = pMap->Construct();
470 pMap->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
471 new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
472 ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
473 pArrayList->Construct();
477 pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
478 pMap->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), (Object*)pArrayList);
480 GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
483 pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, pMap);
498 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
502 VideoListEditorPanel::OnFileInfoChanged(const ContentType contentType)
504 AppLogDebug("ENTER");
505 if (contentType == CONTENT_TYPE_VIDEO)
507 __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_VIDEO);
508 __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
509 __pContentIconListView->UpdateList();
511 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
515 VideoListEditorPanel::OnThumbnailDecoded(const int index)
517 AppLogDebug("ENTER : index(%d)", index);
520 __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
522 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
526 VideoListEditorPanel::OnSceneActivatedN(const SceneId& previousSceneId,
527 const SceneId& currentSceneId, IList* pArgs)
529 AppLogDebug("ENTER");
530 __pPresentationModel = FileListPresentationModel::GetInstance();
532 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
534 if (currentSceneId == IDSCN_VIDEO_LIST_EDITOR)
536 if (previousSceneId == IDSCN_ALBUM_LIST)
538 AlbumInfo* pAlbumInfo = static_cast<AlbumInfo*>(pArgs->GetAt(0));
539 if (pAlbumInfo == null)
541 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
546 IList* pDirectoryList = pAlbumInfo->GetDirectoryListN();
547 __pPresentationModel->SetCurrentAlbumInfo(pAlbumInfo->GetAlbumName(), *pDirectoryList);
549 if (pDirectoryList != null)
551 delete pDirectoryList;
555 __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
556 __pContentIconListView->UpdateList();
562 __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
563 __pContentIconListView->RequestRedraw(true);
566 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
570 VideoListEditorPanel::OnSceneDeactivated(const SceneId& currentSceneId,
571 const SceneId& nextSceneId)
573 AppLogDebug("ENTER");
574 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
578 VideoListEditorPanel::GetItemCheckedCount(void) const
580 AppLogDebug("ENTER");
582 if (__pContentIconListView != null)
584 int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
585 for (int i = 0; i < loopCount; ++i)
587 if (__pContentIconListView->IsItemChecked(i))
593 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
599 VideoListEditorPanel::GetItemCheckedIndexListN(void) const
601 AppLogDebug("ENTER");
602 IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
603 Integer* pIndex = null;
605 if (__pContentIconListView != null)
607 int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
608 for (int i = 0; i < loopCount; ++i)
610 if (__pContentIconListView->IsItemChecked(i))
612 pIndex = new (std::nothrow) Integer(i);
617 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
623 VideoListEditorPanel::OnFileOpInvalidate(enum FileActionMode actionId)
625 SceneManager* pSceneManager = SceneManager::GetInstance();
626 FileListEditorForm* pFileListEditorForm =
627 dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
628 TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get SceneManager.",
629 GetErrorMessage(GetLastResult()));
630 pFileListEditorForm->Invalidate(true);
634 VideoListEditorPanel::OnRequestAppExitWithMultipleSelectionAppControlResult(void)
636 AppLogDebug("ENTER");
637 IList* pIndexList = GetItemCheckedIndexListN();
639 if (pIndexList->GetCount() <= 0)
642 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
646 HashMap* pMap = new (std::nothrow) HashMap(SingleObjectDeleter);
647 result r = pMap->Construct();
651 ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
652 r = pArrayList->Construct();
656 Integer* pTemp = null;
657 int loopCount = pIndexList->GetCount();
659 for (int i = 0; i < loopCount; ++i)
661 pTemp = static_cast<Integer*>(pIndexList->GetAt(i));
662 pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(pTemp->ToInt())));
665 pMap->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), (Object*)pArrayList);
667 GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
670 pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, pMap);
690 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
694 VideoListEditorPanel::OnSelectAllPressed(void)
696 bool needToSelectAll = true;
697 int checkedCount = GetItemCheckedCount();
698 int totalFileCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
699 if (checkedCount == totalFileCount)
701 needToSelectAll = false;
704 if (needToSelectAll == true)
706 for (int i = 0; i < totalFileCount; ++i)
708 if (__pContentIconListView->IsItemChecked(i) == false)
710 __pContentIconListView->SetItemChecked(i, true);
711 __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
713 __pFileListEditorForm->SetFooterButtonsState(true);
718 for (int i = 0; i < totalFileCount; ++i)
720 if (__pContentIconListView->IsItemChecked(i) == true)
722 __pContentIconListView->SetItemChecked(i, false);
723 __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
725 __pFileListEditorForm->SetFooterButtonsState(false);
730 if (needToSelectAll == true)
732 tempString.Format(LENGTH_COUNT_LABEL,
733 ResourceManager::GetString(L"IDS_VR_POP_PD_ITEMS_SELECTED").GetPointer(), totalFileCount);
737 tempString = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
740 __pLabelSelectCnt->SetText(tempString);
741 __pLabelSelectCnt->RequestRedraw(true);
745 VideoListEditorPanel::SetButtonState(void)
747 AppLogDebug("ENTER");
749 SceneManager* pSceneManager = SceneManager::GetInstance();
750 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
752 if (GetItemCheckedCount() > 0)
754 __pFileListEditorForm->SetFooterButtonsState(true);
758 __pFileListEditorForm->SetFooterButtonsState(false);
761 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));