2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (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 GlFileListEditorForm.cpp
19 * @brief This is the implementation file for FileListEditorForm class.
22 #include "GlAllListEditorPanel.h"
23 #include "GlAllListSelectionPanel.h"
24 #include "GlFileListEditorForm.h"
25 #include "GlFileListPresentationModel.h"
26 #include "GlGalleryApp.h"
27 #include "GlImageListEditorPanel.h"
28 #include "GlProgressAnimation.h"
29 #include "GlResourceManager.h"
30 #include "GlSlideSettingListener.h"
31 #include "GlSlideShowPopUp.h"
33 #include "GlVideoListEditorPanel.h"
34 #include "GlFileMoveTimer.h"
36 using namespace Tizen::App;
37 using namespace Tizen::Base;
38 using namespace Tizen::Base::Collection;
39 using namespace Tizen::Content;
40 using namespace Tizen::Graphics;
41 using namespace Tizen::System;
42 using namespace Tizen::Ui;
43 using namespace Tizen::Ui::Controls;
44 using namespace Tizen::Ui::Scenes;
45 using namespace Tizen::Base::Utility;
47 static const int GAP_W_POPUP_ITEM = 10;
48 static const int W_DELETE_POPUP = 688;
49 static const int H_DELETE_POPUP = 230;
50 static const int H_DELETE_LABEL = 80;
51 static const int Y_DELETE_BUTTON = 132;
52 static const int H_DELETE_BUTTON = 74;
53 static const int W_DELETE_BUTTON = 318;
54 static const int H_TOAST_LABEL = 48;
55 static const int Y_DELETE_LABEL = 32;
57 static const unsigned int COLOR_DELETE_BUTTON_NORMAL = Color32<208, 82, 82>::Value;
58 static const unsigned int COLOR_DELETE_BUTTON_PRESSED = Color32<194, 71, 71>::Value;
59 static const unsigned int COLOR_DELETE_BUTTON_TEXT = Color32<248, 246, 239>::Value;
61 static const String RESERVED_MEDIA_PATH = Environment::GetMediaPath();
63 FileListEditorForm::FileListEditorForm(void)
64 : __pShareContextMenu(null)
66 , __pDeletePopup(null)
67 , __morePosition(Point(0, 0))
68 , __pContentDirectoryList(null)
69 , __pContentDirectoryNameList(null)
72 , __isCopyOperation(false)
73 , __pPresentationModel(null)
74 , __isScanProgress(false)
78 _pProgressAnim = null;
79 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
82 FileListEditorForm::~FileListEditorForm(void)
85 if (__pContentDirectoryList != null)
87 __pContentDirectoryList->RemoveAll(true);
88 delete __pContentDirectoryList;
89 __pContentDirectoryList = null;
98 if (__pContentDirectoryNameList != null)
100 __pContentDirectoryNameList->RemoveAll(true);
101 delete __pContentDirectoryNameList;
102 __pContentDirectoryNameList = null;
105 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
109 FileListEditorForm::Initialize(void)
111 AppLogDebug("ENTER");
112 result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_HEADER | FORM_STYLE_FOOTER | FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE | FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE);
114 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
120 FileListEditorForm::ShowAnimation()
122 AppLogDebug("ENTER");
123 Rectangle clientRect= GetClientAreaBounds();
124 Rectangle rect(0, 0, clientRect.width, clientRect.height);
125 _pProgressAnim = new (std::nothrow) ProgressAnimation;
126 _pProgressAnim->Construct(rect);
127 AddControl(_pProgressAnim);
128 _pProgressAnim->SetShowState(true);
129 GetFooter()->SetEnabled(false);
130 _pProgressAnim->AnimationStart();
131 _pProgressAnim->Draw();
137 FileListEditorForm::StopAnimation(void)
139 AppLogDebug("ENTER");
142 _pProgressAnim->AnimationStop();
143 _pProgressAnim->SetShowState(false);
144 RemoveControl(_pProgressAnim);
145 GetFooter()->SetEnabled(true);
146 _pProgressAnim = null;
153 FileListEditorForm::OnInitializing(void)
155 AppLogDebug("ENTER");
156 Header* pHeader = GetHeader();
157 TryReturn(pHeader != null, E_FAILURE, "[%s] fail to get the header.", GetErrorMessage(GetLastResult()));
159 SetOrientation(ORIENTATION_AUTOMATIC);
160 AddOrientationEventListener(*this);
162 __pPresentationModel = FileListPresentationModel::GetInstance();
163 __pPresentationModel->ClearThumbnailRequests();
165 pHeader->SetStyle(HEADER_STYLE_TITLE);
166 pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT"));
168 if ((__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK
169 && __pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_SINGLE) == false)
171 Bitmap* pNormalBitmap = ResourceManager::GetBitmapN(IDB_ICON_SELECT_ALL);
172 Bitmap* pPressBitmap = ResourceManager::GetBitmapN(IDB_ICON_SELECT_ALL_PRESS);
173 ButtonItem selectAll;
174 selectAll.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FILE_LIST_SELECT_ALL);
175 selectAll.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pNormalBitmap);
176 selectAll.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pPressBitmap);
177 pHeader->SetButton(BUTTON_POSITION_LEFT, selectAll);
178 delete pNormalBitmap;
182 pHeader->AddActionEventListener(*this);
185 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
191 FileListEditorForm::InitializeFooter(void)
193 AppLogDebug("ENTER");
194 Footer* pFooter = GetFooter();
195 TryReturn(pFooter != null, E_FAILURE, "[%s] fail to get the footer.", GetErrorMessage(GetLastResult()));
196 pFooter->RemoveAllItems();
198 result r = E_SUCCESS;
200 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
202 if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
204 pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
206 FooterItem footerConfirm;
207 footerConfirm.Construct(IDA_FOOTER_CONFIRM);
208 footerConfirm.SetText(ResourceManager::GetString(L"IDS_COM_SK_DONE"));
209 pFooter->AddItem(footerConfirm);
210 pFooter->SetItemEnabled(0, false);
211 pFooter->SetShowState(true);
212 pFooter->Invalidate(true);
216 pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_TEXT);
217 pFooter->SetShowState(false);
218 pFooter->Invalidate(true);
221 SetFormBackEventListener(this);
226 pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
227 SetFormMenuEventListener(this);
229 FooterItem footerShare;
230 r = footerShare.Construct(IDA_FOOTER_SHARE);
231 TryReturn(r == E_SUCCESS, r, "[%s] Unable to construct footer item", GetErrorMessage(r));
232 Bitmap* pBitmapShare = ResourceManager::GetBitmapN(IDB_CONTROLBAR_SHARE);
233 Bitmap* pBitmapShareDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_SHARE_DIM);
235 if (pBitmapShare != null && pBitmapShareDim != null)
237 footerShare.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmapShare);
238 footerShare.SetIcon(FOOTER_ITEM_STATUS_DISABLED, pBitmapShareDim);
241 r = pFooter->AddItem(footerShare);
243 delete pBitmapShareDim;
244 TryReturn(r == E_SUCCESS, r, "[%s] Unable to add item", GetErrorMessage(r));
246 FooterItem footerDelete;
247 r = footerDelete.Construct(IDA_FOOTER_DELETE);
248 TryReturn(r == E_SUCCESS, r, "[%s] Unable to construct footer item", GetErrorMessage(r));
249 Bitmap* pBitmapDelete = ResourceManager::GetBitmapN(IDB_CONTROLBAR_DELETE);
250 Bitmap* pBitmapDeleteDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_DELETE_DIM);
252 if (pBitmapDelete != null && pBitmapDeleteDim != null)
254 footerDelete.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmapDelete);
255 footerDelete.SetIcon(FOOTER_ITEM_STATUS_DISABLED, pBitmapDeleteDim);
258 r = pFooter->AddItem(footerDelete);
259 delete pBitmapDelete;
260 delete pBitmapDeleteDim;
261 TryReturn(r == E_SUCCESS, r, "[%s] Unable to add item", GetErrorMessage(r));
263 SetFormBackEventListener(this);
265 SceneManager* pSceneManager = SceneManager::GetInstance();
266 int checkedCount = 0;
268 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
270 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
271 if (pEditorPanel != null)
273 checkedCount = pEditorPanel->GetItemCheckedCount();
276 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
278 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
279 if (pSelectionPanel != null)
281 checkedCount = pSelectionPanel->GetItemCheckedCount();
285 AppLogDebug("GetItemCheckedCount(%d)", checkedCount);
287 if (__pOptionMenu != null)
289 delete __pOptionMenu;
290 __pOptionMenu = null;
293 __pOptionMenu = new (std::nothrow) OptionMenu();
294 __pOptionMenu->Construct();
295 __pOptionMenu->AddActionEventListener(*this);
297 if (__pContentDirectoryNameList != null)
299 __pContentDirectoryNameList->RemoveAll(true);
300 delete __pContentDirectoryNameList;
301 __pContentDirectoryNameList = null;
307 pFooter->AddActionEventListener(*this);
308 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
314 FileListEditorForm::GetDirecotyNameFromFullPath(const String& fullPath)const
316 AppLogDebug("ENTER");
317 if (fullPath == null)
319 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
323 String delim(DIRECTORY_SEPARATOR);
324 StringTokenizer st(fullPath,delim);
326 while (st.HasMoreTokens())
328 st.GetNextToken(token);
330 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
336 FileListEditorForm::OnTerminating(void)
338 AppLogDebug("ENTER");
339 __pPresentationModel->RemoveContentEventListener(this);
341 if (__pOptionMenu != null)
343 __pOptionMenu->RemoveActionEventListener(*this);
344 delete __pOptionMenu;
345 __pOptionMenu = null;
348 if (__pShareContextMenu != null)
350 __pShareContextMenu->RemoveActionEventListener(*this);
351 delete __pShareContextMenu;
352 __pShareContextMenu = null;
355 if (__pDeletePopup != null)
357 delete __pDeletePopup;
358 __pDeletePopup = null;
361 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
367 FileListEditorForm::OnActionPerformed(const Control& source, int actionId)
369 AppLogDebug("ENTER(actionId=%d)", actionId);
370 SceneManager* pSceneManager = SceneManager::GetInstance();
371 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
375 case IDA_FILE_LIST_SELECT_ALL:
379 case IDA_FOOTER_SHARE:
381 if (__pShareContextMenu != NULL)
383 delete __pShareContextMenu;
384 __pShareContextMenu = null;
387 Bitmap* pBitmapEmailContextItem = null;
388 Bitmap* pBitmapMessageContextItem = null;
389 pBitmapEmailContextItem = ResourceManager::GetBitmapN(IDB_IMAGE_CONTEXT_EMAIL_ICON);
390 pBitmapMessageContextItem = ResourceManager::GetBitmapN(IDB_IMAGE_CONTEXT_MESSAGE_ICON);
392 __pShareContextMenu = new (std::nothrow) ContextMenu();
393 __pShareContextMenu->Construct(Point(GetClientAreaBounds().width/3 + 15, GetClientAreaBounds().height),
394 CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD);
396 if ( pBitmapMessageContextItem != null)
398 __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MESSAGE"),
399 IDA_CONTEXT_MENU_SHARE_MESSAGE, *pBitmapMessageContextItem, null, null);
400 delete pBitmapMessageContextItem;
403 if ( pBitmapEmailContextItem != null)
405 __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"),
406 IDA_CONTEXT_MENU_SHARE_EMAIL, *pBitmapEmailContextItem, null, null);
407 delete pBitmapEmailContextItem;
409 __pShareContextMenu->SetFocusable(true);
410 __pShareContextMenu->AddActionEventListener(*this);
413 Rectangle rect = source.GetBounds();
415 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
417 __pShareContextMenu->SetAnchorPosition(Point(rect.width / 8 * 3, rect.y));
421 __pShareContextMenu->SetAnchorPosition(Point(rect.width / 8 * 3, rect.y - H_TOAST_LABEL));
424 __pShareContextMenu->SetShowState(true);
425 __pShareContextMenu->Show();
430 case IDA_FOOTER_DELETE:
432 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
434 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
435 if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0)
437 __pDeletePopup->SetShowState(true);
438 __pDeletePopup->Show();
442 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
444 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
445 if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0)
447 __pDeletePopup->SetShowState(true);
448 __pDeletePopup->Show();
452 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
454 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
455 if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0)
457 __pDeletePopup->SetShowState(true);
458 __pDeletePopup->Show();
462 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
464 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
465 (pSceneManager->GetCurrentScene()->GetPanel());
466 if (pSelectionPanel != null && pSelectionPanel->GetItemCheckedCount() > 0)
468 __pDeletePopup->SetShowState(true);
469 __pDeletePopup->Show();
476 case IDA_CONTEXT_MENU_MORE_EDIT:
481 case IDA_CONTEXT_MENU_MORE_ADD_TAG:
486 case IDA_CONTEXT_MENU_MORE_COPY:
488 case IDA_CONTEXT_MENU_MORE_MOVE:
490 if (actionId == IDA_CONTEXT_MENU_MORE_MOVE)
492 __isCopyOperation = false;
494 else if (actionId == IDA_CONTEXT_MENU_MORE_COPY)
496 __isCopyOperation = true;
501 __pOptionMenu->SetShowState(true);
502 __pOptionMenu->Show();
508 case IDA_CONTEXT_MENU_MORE_SLIDE_SHOW:
510 if (__pPopUp != NULL)
515 __pPopUp = new (std::nothrow) SlideShowPopUp();
517 if (__pPopUp != null)
519 __pPopUp->Initialize();
520 __pPopUp->SetEventListner(this);
521 __pPopUp->SetShowState(true);
527 case IDA_CONTEXT_MENU_SHARE_MESSAGE:
529 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
531 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
532 if (pEditorPanel != null)
534 pEditorPanel->OnRequestMessage();
537 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
539 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
540 if (pSelectionPanel != null)
542 pSelectionPanel->OnRequestMessage();
548 case IDA_CONTEXT_MENU_SHARE_EMAIL:
550 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
552 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
553 if (pEditorPanel != null)
555 pEditorPanel->OnRequestEmail();
558 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
560 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
561 if (pSelectionPanel != null)
563 pSelectionPanel->OnRequestEmail();
569 case IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM:
571 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
573 AllListEditorPanel* pListEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
574 if (pListEditorPanel)
576 IList* pList = pListEditorPanel->GetItemCheckedIndexListN();
577 pList->InsertAt(new (std::nothrow) Integer(ALBUM_CREATE), ALBUM_FIRST_ELEMENT);
578 if (__isCopyOperation)
580 pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_COPY), ALBUM_SECOND_ELEMENT);
584 pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_MOVE), ALBUM_SECOND_ELEMENT);
586 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pList);
592 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
594 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
595 (pSceneManager->GetCurrentScene()->GetPanel());
597 if (pSelectionPanel != null)
599 IList* pList = pSelectionPanel->GetItemCheckedIndexListN();
600 pList->InsertAt(new (std::nothrow) Integer(ALBUM_CREATE), ALBUM_FIRST_ELEMENT);
601 if (__isCopyOperation)
603 pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_COPY), ALBUM_SECOND_ELEMENT);
607 pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_MOVE), ALBUM_SECOND_ELEMENT);
609 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pList);
616 case IDA_DELETE_POPUP_DEL:
619 __pDeletePopup->SetShowState(false);
620 __pDeletePopup->Invalidate(true);
622 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
624 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
625 if (pEditorPanel != null)
627 result r = pEditorPanel->OnRequestDelete();
630 AppLogDebug("OnRequestDelete failed with %s", GetErrorMessage(r));
634 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
636 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
637 (pSceneManager->GetCurrentScene()->GetPanel());
639 if (pSelectionPanel != null)
641 result r = pSelectionPanel->OnRequestDelete();
644 AppLogDebug("OnRequestDelete failed with %s", GetErrorMessage(r));
651 case IDA_DELETE_POPUP_CANCEL:
654 __pDeletePopup->SetShowState(false);
655 __pDeletePopup->Invalidate(true);
659 case IDA_CONTEXT_MENU_ROTATE_LEFT:
661 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
663 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
664 if (pEditorPanel != null)
666 RotateMode rotateMode = ROTATE_MODE_LEFT;
667 pEditorPanel->OnRequestRotate(rotateMode);
670 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
672 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
673 (pSceneManager->GetCurrentScene()->GetPanel());
675 if (pSelectionPanel != null)
677 RotateMode rotateMode = ROTATE_MODE_LEFT;
678 pSelectionPanel->OnRotateRequested(rotateMode);
684 case IDA_CONTEXT_MENU_ROTATE_RIGHT:
686 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
688 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
689 if (pEditorPanel != null)
691 RotateMode rotateMode = ROTATE_MODE_RIGHT;
692 pEditorPanel->OnRequestRotate(rotateMode);
695 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
698 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
699 (pSceneManager->GetCurrentScene()->GetPanel());
701 if (pSelectionPanel != null)
703 RotateMode rotateMode = ROTATE_MODE_RIGHT;
704 pSelectionPanel->OnRotateRequested(rotateMode);
710 case IDA_FOOTER_CONFIRM:
712 if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
714 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
715 if (pEditorPanel != null)
717 pEditorPanel->OnRequestAppExitWithMultipleSelectionAppControlResult();
720 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
722 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
723 if (pEditorPanel != null)
725 pEditorPanel->OnRequestAppExitWithMultipleSelectionAppControlResult();
733 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
735 if ((IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START <= actionId) &&
736 (actionId <= IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM + 1000))
738 if (__pContentDirectoryList == null)
742 if (__pContentDirectoryList->GetCount() > actionId - IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START)
744 String* pDirectory = static_cast<String*>
745 (__pContentDirectoryList->GetAt(actionId - IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START));
747 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>
748 (pSceneManager->GetCurrentScene()->GetPanel());
750 if (pEditorPanel != null)
753 IList* pItemIndexList = pEditorPanel->GetItemCheckedIndexListN();
754 __pFileMove = new (std::nothrow) FileMoveTimer(*pDirectory, pItemIndexList, __pPresentationModel, this);
755 if (__isCopyOperation)
757 __pFileMove->SetCopy();
760 result r = __pFileMove->StartTimer();
765 __isCopyOperation = false;
775 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
777 if ((IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START <= actionId) &&
778 (actionId <= IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM + 1000))
780 if (__pContentDirectoryList == null)
785 if (__pContentDirectoryList->GetCount() > actionId - IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START)
787 String* pDirectory = static_cast<String*>
788 (__pContentDirectoryList->GetAt(actionId - IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START));
790 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
791 (pSceneManager->GetCurrentScene()->GetPanel());
793 if (pSelectionPanel != null)
796 IList* pItemIndexList = pSelectionPanel->GetItemCheckedIndexListN();
797 __pFileMove = new (std::nothrow) FileMoveTimer(*pDirectory, pItemIndexList, __pPresentationModel, this);
798 if (__isCopyOperation)
800 __pFileMove->SetCopy();
802 result r = __pFileMove->StartTimer();
807 __isCopyOperation = false;
820 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
824 FileListEditorForm::OnFileOpInvalidate(enum FileActionMode actionId)
831 FileListEditorForm::OnScanDirStart()
833 AppLogDebug("ENTER");
834 GetHeader()->SetButtonEnabled(BUTTON_POSITION_RIGHT, false);
835 __isScanProgress = true;
840 FileListEditorForm::OnScanDirComplete()
842 AppLogDebug("ENTER");
843 GetHeader()->SetButtonEnabled(BUTTON_POSITION_RIGHT, true);
844 __isScanProgress = false;
851 FileListEditorForm::GetOverlayStatus(void) const
857 FileListEditorForm::OnFileOpComplete(enum FileActionMode actionId, enum FileActionCompleteRes res)
859 AppLogDebug("ENTER");
861 __pPresentationModel->SetUpdateProgressStatus(false);
862 if (res != COMPLETE_SUCCESS)
864 MessageBox messageBox;
865 messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_OPERATION_FAILED"), MSGBOX_STYLE_OK, 3000);
868 messageBox.ShowAndWait(modalResult);
870 SceneManager* pSceneManager = SceneManager::GetInstance();
871 AppAssert(pSceneManager);
872 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST));
878 FileListEditorForm::OnContentUpdated()
880 AppLogDebug("ENTER");
882 SceneManager* pSceneManager = SceneManager::GetInstance();
884 if(__pDeletePopup != null)
886 if(__pDeletePopup->IsVisible() == true)
888 __pDeletePopup->Destroy();
889 __pDeletePopup = null;
895 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
897 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
898 if (pEditorPanel != null)
900 pEditorPanel->CancelUpdateProgress();
903 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
905 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
906 if (pSelectionPanel != null)
908 pSelectionPanel->CancelUpdateProgress();
912 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK
913 && pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
915 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
916 SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY));
919 else if (_overlayMsg == false)
921 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
922 SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY));
925 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
929 FileListEditorForm::SetUpPopup(void)
931 AppLogDebug("ENTER");
932 result r = E_SUCCESS;
934 if (__pDeletePopup != null)
936 delete __pDeletePopup;
937 __pDeletePopup = null;
940 __pDeletePopup = new (std::nothrow) Popup();
941 __pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP));
942 __pDeletePopup->SetPropagatedKeyEventListener(this);
944 Rectangle popupClientBounds = __pDeletePopup->GetClientAreaBounds();
946 Label* pLabelText = new (std::nothrow) Label();
947 pLabelText->Construct(Rectangle(0, Y_DELETE_LABEL, popupClientBounds.width, H_DELETE_LABEL),
948 ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q"));
949 pLabelText->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
950 pLabelText->SetTextConfig(34,LABEL_TEXT_STYLE_BOLD);
951 __pDeletePopup->AddControl(pLabelText);
953 Button* pDeleteButton = new (std::nothrow) Button();
954 pDeleteButton->Construct(Rectangle(popupClientBounds.width / 2 + GAP_W_POPUP_ITEM, Y_DELETE_BUTTON, W_DELETE_BUTTON, H_DELETE_BUTTON),
955 ResourceManager::GetString(L"IDS_COM_BODY_DELETE"));
956 pDeleteButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_DELETE_BUTTON_NORMAL);
957 pDeleteButton->SetColor(BUTTON_STATUS_PRESSED, COLOR_DELETE_BUTTON_PRESSED);
958 pDeleteButton->SetTextColor(COLOR_DELETE_BUTTON_TEXT);
959 pDeleteButton->SetActionId(IDA_DELETE_POPUP_DEL);
960 pDeleteButton->AddActionEventListener(*this);
961 __pDeletePopup->AddControl(pDeleteButton);
963 Button* pButtonCancel = new (std::nothrow) Button();
964 pButtonCancel->Construct(Rectangle(16, Y_DELETE_BUTTON, W_DELETE_BUTTON, H_DELETE_BUTTON),
965 ResourceManager::GetString(L"IDS_COM_POP_CANCEL"));
966 pButtonCancel->SetActionId(IDA_DELETE_POPUP_CANCEL);
967 pButtonCancel->AddActionEventListener(*this);
968 __pDeletePopup->AddControl(pButtonCancel);
969 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
975 FileListEditorForm::SetTitleText(const String& titleText)
977 AppLogDebug("ENTER");
978 Header* pHeader = GetHeader();
979 TryReturnVoid(pHeader != null, "[%s] fail to get the header.", GetErrorMessage(GetLastResult()));
980 pHeader->SetTitleText(titleText);
981 pHeader->Invalidate(true);
982 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
986 FileListEditorForm::RefreshFolderList(void)
988 AppLogDebug("ENTER");
989 ContentDirectory contentDirectory;
990 IListT<ContentType>* pContentTypeList = new (std::nothrow) ArrayListT<ContentType>();
991 pContentTypeList->Add(CONTENT_TYPE_IMAGE);
992 pContentTypeList->Add(CONTENT_TYPE_VIDEO);
993 result r = contentDirectory.Construct(*pContentTypeList);
996 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
999 delete pContentTypeList;
1001 if (__pContentDirectoryList != null)
1003 __pContentDirectoryList->RemoveAll(true);
1004 delete __pContentDirectoryList;
1005 __pContentDirectoryList = null;
1007 __pContentDirectoryList = contentDirectory.GetContentDirectoryPathListN(SORT_ORDER_NONE);
1009 if (__pContentDirectoryNameList != NULL)
1011 __pContentDirectoryNameList->RemoveAll(true);
1012 delete __pContentDirectoryNameList;
1013 __pContentDirectoryNameList = null;
1016 __pContentDirectoryNameList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1017 String* pDirPath = null;
1018 String* pDirName = null;
1019 String mediaPath = RESERVED_MEDIA_PATH;
1020 int length = mediaPath.GetLength();
1021 mediaPath.Remove(length-1,1);
1023 int loopCount = __pContentDirectoryList->GetCount();
1024 for (int i = 0; i < loopCount; ++i)
1026 pDirPath = static_cast<String*>(__pContentDirectoryList->GetAt(i));
1027 pDirName = new (std::nothrow) String(GetDirecotyNameFromFullPath(*pDirPath));
1029 if (*pDirPath == mediaPath)
1031 *pDirName = ResourceManager::GetString(L"IDS_MEDIABR_POP_NO_NAME");
1032 __pContentDirectoryNameList->Add(pDirName);
1036 __pContentDirectoryNameList->Add(pDirName);
1040 __pOptionMenu->RemoveAllItems();
1041 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_CREATE_ALBUM"),
1042 IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM);
1044 loopCount = __pContentDirectoryNameList->GetCount();
1046 String dirAllAlbums = L"All albums";
1048 for (int i = 0; i < loopCount; ++i)
1050 pDirName = static_cast<String*>(__pContentDirectoryNameList->GetAt(i));
1052 if (*pDirName != __pPresentationModel->GetCurrentAlbumName() || *pDirName == dirAllAlbums)
1054 __pOptionMenu->AddItem(*(new (std::nothrow) String(*pDirName)),
1055 IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START + i);
1060 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1064 FileListEditorForm::OnFormBackRequested(Form& source)
1066 AppLogDebug("ENTER");
1068 if(__isScanProgress)
1070 AppLog (" Skip the call");
1074 SceneManager* pSceneManager = SceneManager::GetInstance();
1075 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
1077 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
1079 if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
1081 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALBUM_LIST));
1083 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
1085 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALBUM_LIST));
1090 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1092 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALL_LIST));
1094 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
1096 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_IMAGE_LIST));
1098 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
1100 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_VIDEO_LIST));
1102 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1104 if (__pShareContextMenu != null && __pShareContextMenu->GetShowState() == true)
1106 __pShareContextMenu->SetShowState(false);
1110 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
1111 (pSceneManager->GetCurrentScene()->GetPanel());
1112 if (pSelectionPanel != null)
1114 IList* pList = pSelectionPanel->GetItemCheckedIndexListN();
1117 pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1120 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST_EDITOR, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
1121 SCENE_HISTORY_OPTION_ADD_HISTORY, SCENE_DESTROY_OPTION_DESTROY), pList);
1127 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALL_LIST));
1130 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1134 FileListEditorForm::SetFooterButtonsState(const bool enableState)
1136 AppLogDebug("ENTER");
1137 Footer* pFooter = GetFooter();
1138 TryReturnVoid(pFooter != null, "[%s] fail to get the footer.", GetErrorMessage(GetLastResult()));
1140 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
1142 if (enableState == true)
1144 pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
1145 pFooter->SetItemEnabled(0, true);
1149 pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
1150 pFooter->SetItemEnabled(0, false);
1155 if (enableState == true)
1157 pFooter->SetItemEnabled(0, true);
1158 pFooter->SetItemEnabled(1, true);
1162 pFooter->SetItemEnabled(0, false);
1163 pFooter->SetItemEnabled(1, false);
1166 pFooter->RequestRedraw(true);
1167 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1171 FileListEditorForm::OnOrientationChanged(const Tizen::Ui::Control &source, Tizen::Ui::OrientationStatus orientationStatus)
1173 AppLogDebug("ENTER");
1174 SceneManager* pSceneManager = SceneManager::GetInstance();
1175 pSceneManager->GetCurrentScene();
1177 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1179 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1180 if (pEditorPanel != null)
1182 pEditorPanel->ChangeOrientation();
1185 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
1187 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1188 if (pEditorPanel != null)
1190 pEditorPanel->ChangeOrientation();
1193 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
1195 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1196 if (pEditorPanel != null)
1198 pEditorPanel->ChangeOrientation();
1201 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1203 AllListSelectionPanel* pEditorPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1204 if (pEditorPanel != null)
1206 pEditorPanel->ChangeOrientation();
1210 if (_pProgressAnim != null)
1212 _pProgressAnim->ChangeOrientation(Form::GetBounds());
1213 _pProgressAnim->Invalidate(true);
1216 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1220 FileListEditorForm::OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo)
1222 AppLogDebug("ENTER");
1224 if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
1226 _overlayMsg = false;
1227 __pDeletePopup->SetShowState(false);
1228 __pDeletePopup->Invalidate(true);
1230 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1236 FileListEditorForm::MoveToAlbum(const String& destDirectory)
1238 AppLogDebug("ENTER");
1239 result r = E_FAILURE;
1240 String albumName = __pPresentationModel->ConvertToAlbumName(destDirectory);
1241 if (albumName != EMPTY_SPACE)
1243 IList* pDirectoryList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1244 pDirectoryList->Add(new (std::nothrow) String(destDirectory));
1245 __pPresentationModel->SetCurrentAlbumInfo(albumName, *pDirectoryList);
1246 __pPresentationModel->SetCurrentAlbumContentType(CONTENT_TYPE_ALL);
1247 delete pDirectoryList;
1249 SceneManager* pSceneManager = SceneManager::GetInstance();
1250 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST));
1253 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1259 FileListEditorForm::SelectAllPressed(void)
1261 SceneManager* pSceneManager = SceneManager::GetInstance();
1262 pSceneManager->GetCurrentScene();
1264 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1266 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1267 if (pEditorPanel != null)
1269 pEditorPanel->OnSelectAllPressed();
1272 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
1274 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1275 if (pEditorPanel != null)
1277 pEditorPanel->OnSelectAllPressed();
1280 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
1282 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1283 if (pEditorPanel != null)
1285 pEditorPanel->OnSelectAllPressed();
1288 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1290 AllListSelectionPanel* pEditorPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1291 if (pEditorPanel != null)
1293 pEditorPanel->OnSelectAllPressed();
1299 FileListEditorForm::OnSlideSettingPopUpItemSelected(int index)
1301 if (__pPopUp != NULL)
1303 __pPopUp->SetShowState(false);
1306 SceneManager* pSceneManager = SceneManager::GetInstance();
1310 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1312 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1313 if (pEditorPanel != null)
1315 pEditorPanel->OnRequestSlideShow();
1318 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1320 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
1321 (pSceneManager->GetCurrentScene()->GetPanel());
1323 if (pSelectionPanel != null)
1325 pSelectionPanel->OnRequestSlideShow();
1329 else if (index == 1)
1331 SceneManager* pSceneManager = SceneManager::GetInstance();
1332 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager", GetErrorMessage(GetLastResult()));
1334 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SETTING_MAIN));
1339 FileListEditorForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
1341 AppLogDebug("ENTER");
1342 __pPresentationModel->RemoveContentEventListener(this);
1343 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1347 FileListEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
1349 AppLogDebug("ENTER");
1350 __pPresentationModel->AddContentEventListener(this);
1351 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1355 FileListEditorForm::OnFormMenuRequested (Tizen::Ui::Controls::Form &source)
1357 if(__isScanProgress)
1362 SceneManager* pSceneManager = SceneManager::GetInstance();
1363 int checkedCount = 0;
1365 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1367 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1368 if (pEditorPanel != null)
1370 checkedCount = pEditorPanel->GetItemCheckedCount();
1373 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1375 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1376 if (pSelectionPanel != null)
1378 checkedCount = pSelectionPanel->GetItemCheckedCount();
1382 if (__pShareContextMenu != null && __pShareContextMenu->GetShowState() == true)
1384 __pShareContextMenu->SetShowState(false);
1387 if (checkedCount < 2 && __pPresentationModel->GetCurrentAlbumName() == ALL_ALBUMS_REAL_NAME )
1389 return; // no option Menu items in this case
1392 if (checkedCount > 0)
1394 if (__pOptionMenu == null)
1399 __pOptionMenu->RemoveAllItems();
1401 if ( __pPresentationModel->GetCurrentAlbumName() != ALL_ALBUMS_REAL_NAME )
1403 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MOVE"),
1404 IDA_CONTEXT_MENU_MORE_MOVE);
1405 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_COPY"),
1406 IDA_CONTEXT_MENU_MORE_COPY);
1409 if (checkedCount > 1)
1411 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"),
1412 IDA_CONTEXT_MENU_MORE_SLIDE_SHOW);
1415 if ( __pPresentationModel->GetCurrentAlbumName() != ALL_ALBUMS_REAL_NAME )
1417 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"),IDA_CONTEXT_MENU_ROTATE_LEFT);
1418 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"),IDA_CONTEXT_MENU_ROTATE_RIGHT);
1421 __pOptionMenu->SetShowState(true);
1422 __pOptionMenu->Show();
1427 FileListEditorForm::SetProgressState(const bool progressState)
1429 __isScanProgress = progressState;