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 "GlResourceManager.h"
29 #include "GlSlideSettingListener.h"
30 #include "GlSlideShowPopUp.h"
32 #include "GlVideoListEditorPanel.h"
33 #include "GlFileMoveTimer.h"
35 using namespace Tizen::App;
36 using namespace Tizen::Base;
37 using namespace Tizen::Base::Collection;
38 using namespace Tizen::Content;
39 using namespace Tizen::Graphics;
40 using namespace Tizen::System;
41 using namespace Tizen::Ui;
42 using namespace Tizen::Ui::Controls;
43 using namespace Tizen::Ui::Scenes;
44 using namespace Tizen::Base::Utility;
46 static const int GAP_W_POPUP_ITEM = 5;
47 static const int W_DELETE_POPUP = 620;
48 static const int H_DELETE_POPUP = 300;
49 static const int H_DELETE_LABEL = 180;
50 static const int Y_DELETE_BUTTON = 180;
51 static const int H_DELETE_BUTTON = 80;
52 static const int H_TOAST_LABEL = 48;
54 static const unsigned int COLOR_DELETE_BUTTON_NORMAL = Color32<208, 82, 82>::Value;
55 static const unsigned int COLOR_DELETE_BUTTON_PRESSED = Color32<194, 71, 71>::Value;
56 static const unsigned int COLOR_DELETE_BUTTON_TEXT = Color32<248, 246, 239>::Value;
58 static const String RESERVED_MEDIA_PATH = Environment::GetMediaPath();
60 FileListEditorForm::FileListEditorForm(void)
61 : __pShareContextMenu(null)
63 , __pDeletePopup(null)
64 , __morePosition(Point(0, 0))
65 , __pContentDirectoryList(null)
66 , __pContentDirectoryNameList(null)
69 , __isCopyOperation(false)
70 , __pPresentationModel(null)
74 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
77 FileListEditorForm::~FileListEditorForm(void)
80 if (__pContentDirectoryList != null)
82 __pContentDirectoryList->RemoveAll(true);
83 delete __pContentDirectoryList;
84 __pContentDirectoryList = null;
93 if (__pContentDirectoryNameList != null)
95 __pContentDirectoryNameList->RemoveAll(true);
96 delete __pContentDirectoryNameList;
97 __pContentDirectoryNameList = null;
100 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
104 FileListEditorForm::Initialize(void)
106 AppLogDebug("ENTER");
107 result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
108 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
114 FileListEditorForm::OnInitializing(void)
116 AppLogDebug("ENTER");
117 Header* pHeader = GetHeader();
118 TryReturn(pHeader != null, E_FAILURE, "[%s] fail to get the header.", GetErrorMessage(GetLastResult()));
120 SetOrientation(ORIENTATION_AUTOMATIC);
121 AddOrientationEventListener(*this);
123 __pPopUp = new (std::nothrow) SlideShowPopUp();
125 if (__pPopUp != null)
127 __pPopUp->Initialize();
128 __pPopUp->SetEventListner(this);
129 AddControl(__pPopUp);
132 __pPresentationModel = FileListPresentationModel::GetInstance();
133 __pPresentationModel->ClearThumbnailRequests();
135 pHeader->SetStyle(HEADER_STYLE_TITLE);
136 pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT"));
138 if ((__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK
139 && __pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_SINGLE) == false)
141 Bitmap* pNormalBitmap = ResourceManager::GetBitmapN(IDB_ICON_SELECT_ALL);
142 Bitmap* pPressBitmap = ResourceManager::GetBitmapN(IDB_ICON_SELECT_ALL_PRESS);
143 ButtonItem selectAll;
144 selectAll.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FILE_LIST_SELECT_ALL);
145 selectAll.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pNormalBitmap);
146 selectAll.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pPressBitmap);
147 pHeader->SetButton(BUTTON_POSITION_LEFT, selectAll);
148 delete pNormalBitmap;
152 pHeader->AddActionEventListener(*this);
155 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
161 FileListEditorForm::InitializeFooter(void)
163 AppLogDebug("ENTER");
164 Footer* pFooter = GetFooter();
165 TryReturn(pFooter != null, E_FAILURE, "[%s] fail to get the footer.", GetErrorMessage(GetLastResult()));
166 pFooter->RemoveAllItems();
168 result r = E_SUCCESS;
170 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
172 if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
174 pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
176 FooterItem footerConfirm;
177 footerConfirm.Construct(IDA_FOOTER_CONFIRM);
178 footerConfirm.SetText(ResourceManager::GetString(L"IDS_COM_SK_DONE"));
179 pFooter->AddItem(footerConfirm);
180 pFooter->SetItemEnabled(0, false);
181 pFooter->SetShowState(true);
182 pFooter->Invalidate(true);
186 pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_TEXT);
187 pFooter->SetShowState(false);
188 pFooter->Invalidate(true);
191 SetFormBackEventListener(this);
196 pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
197 SetFormMenuEventListener(this);
199 FooterItem footerShare;
200 r = footerShare.Construct(IDA_FOOTER_SHARE);
201 TryReturn(r == E_SUCCESS, r, "[%s] Unable to construct footer item", GetErrorMessage(r));
202 Bitmap* pBitmapShare = ResourceManager::GetBitmapN(IDB_CONTROLBAR_SHARE);
203 Bitmap* pBitmapShareDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_SHARE_DIM);
205 if (pBitmapShare != null && pBitmapShareDim != null)
207 footerShare.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmapShare);
208 footerShare.SetIcon(FOOTER_ITEM_STATUS_DISABLED, pBitmapShareDim);
211 r = pFooter->AddItem(footerShare);
213 delete pBitmapShareDim;
214 TryReturn(r == E_SUCCESS, r, "[%s] Unable to add item", GetErrorMessage(r));
216 FooterItem footerDelete;
217 r = footerDelete.Construct(IDA_FOOTER_DELETE);
218 TryReturn(r == E_SUCCESS, r, "[%s] Unable to construct footer item", GetErrorMessage(r));
219 Bitmap* pBitmapDelete = ResourceManager::GetBitmapN(IDB_CONTROLBAR_DELETE);
220 Bitmap* pBitmapDeleteDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_DELETE_DIM);
222 if (pBitmapDelete != null && pBitmapDeleteDim != null)
224 footerDelete.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmapDelete);
225 footerDelete.SetIcon(FOOTER_ITEM_STATUS_DISABLED, pBitmapDeleteDim);
228 r = pFooter->AddItem(footerDelete);
229 delete pBitmapDelete;
230 delete pBitmapDeleteDim;
231 TryReturn(r == E_SUCCESS, r, "[%s] Unable to add item", GetErrorMessage(r));
233 SetFormBackEventListener(this);
235 SceneManager* pSceneManager = SceneManager::GetInstance();
236 int checkedCount = 0;
238 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
240 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
241 if (pEditorPanel != null)
243 checkedCount = pEditorPanel->GetItemCheckedCount();
246 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
248 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
249 if (pSelectionPanel != null)
251 checkedCount = pSelectionPanel->GetItemCheckedCount();
255 AppLogDebug("GetItemCheckedCount(%d)", checkedCount);
257 if (__pOptionMenu != null)
259 delete __pOptionMenu;
260 __pOptionMenu = null;
263 __pOptionMenu = new (std::nothrow) OptionMenu();
264 __pOptionMenu->Construct();
265 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MOVE"),
266 IDA_CONTEXT_MENU_MORE_MOVE);
267 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_COPY"),
268 IDA_CONTEXT_MENU_MORE_COPY);
270 if (checkedCount > 1)
272 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"),
273 IDA_CONTEXT_MENU_MORE_SLIDE_SHOW);
276 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"),IDA_CONTEXT_MENU_ROTATE_LEFT);
277 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"),IDA_CONTEXT_MENU_ROTATE_RIGHT);
279 __pOptionMenu->AddActionEventListener(*this);
281 if (__pContentDirectoryNameList != null)
283 __pContentDirectoryNameList->RemoveAll(true);
284 delete __pContentDirectoryNameList;
285 __pContentDirectoryNameList = null;
291 pFooter->AddActionEventListener(*this);
292 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
298 FileListEditorForm::GetDirecotyNameFromFullPath(const String& fullPath)const
300 AppLogDebug("ENTER");
301 if (fullPath == null)
303 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
307 String delim(DIRECTORY_SEPARATOR);
308 StringTokenizer st(fullPath,delim);
310 while (st.HasMoreTokens())
312 st.GetNextToken(token);
314 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
320 FileListEditorForm::OnTerminating(void)
322 AppLogDebug("ENTER");
323 __pPresentationModel->RemoveContentEventListener(this);
325 if (__pOptionMenu != null)
327 __pOptionMenu->RemoveActionEventListener(*this);
328 delete __pOptionMenu;
329 __pOptionMenu = null;
332 if (__pShareContextMenu != null)
334 __pShareContextMenu->RemoveActionEventListener(*this);
335 delete __pShareContextMenu;
336 __pShareContextMenu = null;
339 if (__pDeletePopup != null)
341 delete __pDeletePopup;
342 __pDeletePopup = null;
345 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
351 FileListEditorForm::OnActionPerformed(const Control& source, int actionId)
353 AppLogDebug("ENTER(actionId=%d)", actionId);
354 SceneManager* pSceneManager = SceneManager::GetInstance();
355 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
359 case IDA_FILE_LIST_SELECT_ALL:
363 case IDA_FOOTER_SHARE:
365 if (__pShareContextMenu != NULL)
367 delete __pShareContextMenu;
368 __pShareContextMenu = null;
371 Bitmap* pBitmapEmailContextItem = null;
372 Bitmap* pBitmapMessageContextItem = null;
373 pBitmapEmailContextItem = ResourceManager::GetBitmapN(IDB_IMAGE_CONTEXT_EMAIL_ICON);
374 pBitmapMessageContextItem = ResourceManager::GetBitmapN(IDB_IMAGE_CONTEXT_MESSAGE_ICON);
376 __pShareContextMenu = new (std::nothrow) ContextMenu();
377 __pShareContextMenu->Construct(Point(GetClientAreaBounds().width/3 + 15, GetClientAreaBounds().height),
378 CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD);
380 if ( pBitmapMessageContextItem != null)
382 __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MESSAGE"),
383 IDA_CONTEXT_MENU_SHARE_MESSAGE, *pBitmapMessageContextItem, null, null);
384 delete pBitmapMessageContextItem;
387 if ( pBitmapEmailContextItem != null)
389 __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"),
390 IDA_CONTEXT_MENU_SHARE_EMAIL, *pBitmapEmailContextItem, null, null);
391 delete pBitmapEmailContextItem;
393 __pShareContextMenu->SetFocusable(true);
394 __pShareContextMenu->AddActionEventListener(*this);
397 Rectangle rect = source.GetBounds();
399 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
401 __pShareContextMenu->SetAnchorPosition(Point(rect.width / 8 * 3, rect.y));
405 __pShareContextMenu->SetAnchorPosition(Point(rect.width / 8 * 3, rect.y - H_TOAST_LABEL));
408 __pShareContextMenu->SetShowState(true);
409 __pShareContextMenu->Show();
414 case IDA_FOOTER_DELETE:
416 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
418 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
419 if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0)
421 __pDeletePopup->SetShowState(true);
422 __pDeletePopup->Show();
426 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
428 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
429 if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0)
431 __pDeletePopup->SetShowState(true);
432 __pDeletePopup->Show();
436 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
438 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
439 if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0)
441 __pDeletePopup->SetShowState(true);
442 __pDeletePopup->Show();
446 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
448 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
449 (pSceneManager->GetCurrentScene()->GetPanel());
450 if (pSelectionPanel != null && pSelectionPanel->GetItemCheckedCount() > 0)
452 __pDeletePopup->SetShowState(true);
453 __pDeletePopup->Show();
460 case IDA_CONTEXT_MENU_MORE_EDIT:
465 case IDA_CONTEXT_MENU_MORE_ADD_TAG:
470 case IDA_CONTEXT_MENU_MORE_COPY:
472 case IDA_CONTEXT_MENU_MORE_MOVE:
474 if (actionId == IDA_CONTEXT_MENU_MORE_MOVE)
476 __isCopyOperation = false;
478 else if (actionId == IDA_CONTEXT_MENU_MORE_COPY)
480 __isCopyOperation = true;
485 __pOptionMenu->SetShowState(true);
486 __pOptionMenu->Show();
492 case IDA_CONTEXT_MENU_MORE_SLIDE_SHOW:
494 if (__pPopUp != null)
496 __pPopUp->SetShowState(true);
502 case IDA_CONTEXT_MENU_SHARE_MESSAGE:
504 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
506 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
507 if (pEditorPanel != null)
509 pEditorPanel->OnRequestMessage();
512 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
514 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
515 if (pSelectionPanel != null)
517 pSelectionPanel->OnRequestMessage();
523 case IDA_CONTEXT_MENU_SHARE_EMAIL:
525 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
527 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
528 if (pEditorPanel != null)
530 pEditorPanel->OnRequestEmail();
533 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
535 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
536 if (pSelectionPanel != null)
538 pSelectionPanel->OnRequestEmail();
544 case IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM:
546 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
548 AllListEditorPanel* pListEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
549 if (pListEditorPanel)
551 IList* pList = pListEditorPanel->GetItemCheckedIndexListN();
552 pList->InsertAt(new (std::nothrow) Integer(ALBUM_CREATE), ALBUM_FIRST_ELEMENT);
553 if (__isCopyOperation)
555 pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_COPY), ALBUM_SECOND_ELEMENT);
559 pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_MOVE), ALBUM_SECOND_ELEMENT);
561 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pList);
567 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
569 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
570 (pSceneManager->GetCurrentScene()->GetPanel());
572 if (pSelectionPanel != null)
574 IList* pList = pSelectionPanel->GetItemCheckedIndexListN();
575 pList->InsertAt(new (std::nothrow) Integer(ALBUM_CREATE), ALBUM_FIRST_ELEMENT);
576 if (__isCopyOperation)
578 pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_COPY), ALBUM_SECOND_ELEMENT);
582 pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_MOVE), ALBUM_SECOND_ELEMENT);
584 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pList);
591 case IDA_DELETE_POPUP_DEL:
594 __pDeletePopup->SetShowState(false);
595 __pDeletePopup->Invalidate(true);
597 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
599 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
600 if (pEditorPanel != null)
602 result r = pEditorPanel->OnRequestDelete();
605 AppLogDebug("OnRequestDelete failed with %s", GetErrorMessage(r));
609 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
611 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
612 (pSceneManager->GetCurrentScene()->GetPanel());
614 if (pSelectionPanel != null)
616 result r = pSelectionPanel->OnRequestDelete();
619 AppLogDebug("OnRequestDelete failed with %s", GetErrorMessage(r));
626 case IDA_DELETE_POPUP_CANCEL:
629 __pDeletePopup->SetShowState(false);
630 __pDeletePopup->Invalidate(true);
634 case IDA_CONTEXT_MENU_ROTATE_LEFT:
636 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
638 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
639 if (pEditorPanel != null)
641 RotateMode rotateMode = ROTATE_MODE_LEFT;
642 pEditorPanel->OnRequestRotate(rotateMode);
645 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
647 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
648 (pSceneManager->GetCurrentScene()->GetPanel());
650 if (pSelectionPanel != null)
652 RotateMode rotateMode = ROTATE_MODE_LEFT;
653 pSelectionPanel->OnRotateRequested(rotateMode);
659 case IDA_CONTEXT_MENU_ROTATE_RIGHT:
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_RIGHT;
667 pEditorPanel->OnRequestRotate(rotateMode);
670 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
673 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
674 (pSceneManager->GetCurrentScene()->GetPanel());
676 if (pSelectionPanel != null)
678 RotateMode rotateMode = ROTATE_MODE_RIGHT;
679 pSelectionPanel->OnRotateRequested(rotateMode);
685 case IDA_FOOTER_CONFIRM:
687 if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
689 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
690 if (pEditorPanel != null)
692 pEditorPanel->OnRequestAppExitWithMultipleSelectionAppControlResult();
695 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
697 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
698 if (pEditorPanel != null)
700 pEditorPanel->OnRequestAppExitWithMultipleSelectionAppControlResult();
708 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
710 if ((IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START <= actionId) &&
711 (actionId <= IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM + 1000))
713 if (__pContentDirectoryList == null)
717 if (__pContentDirectoryList->GetCount() > actionId - IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START)
719 String* pDirectory = static_cast<String*>
720 (__pContentDirectoryList->GetAt(actionId - IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START));
722 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>
723 (pSceneManager->GetCurrentScene()->GetPanel());
725 if (pEditorPanel != null)
728 IList* pItemIndexList = pEditorPanel->GetItemCheckedIndexListN();
729 GetMoveFileIndexList(*pDirectory, pItemIndexList, __pPresentationModel);
730 __pFileMove = new (std::nothrow) FileMoveTimer(*pDirectory, pItemIndexList, __pPresentationModel, this);
731 if (__isCopyOperation)
733 AppLogDebug("Rash: Setting to Copy in FileListEditorForm");
734 __pFileMove->SetCopy();
737 result r = __pFileMove->StartTimer();
742 __isCopyOperation = false;
752 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
754 if ((IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START <= actionId) &&
755 (actionId <= IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM + 1000))
757 if (__pContentDirectoryList == null)
762 if (__pContentDirectoryList->GetCount() > actionId - IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START)
764 String* pDirectory = static_cast<String*>
765 (__pContentDirectoryList->GetAt(actionId - IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START));
767 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
768 (pSceneManager->GetCurrentScene()->GetPanel());
770 if (pSelectionPanel != null)
773 IList* pItemIndexList = pSelectionPanel->GetItemCheckedIndexListN();
774 GetMoveFileIndexList(*pDirectory, pItemIndexList, __pPresentationModel);
775 __pFileMove = new (std::nothrow) FileMoveTimer(*pDirectory, pItemIndexList, __pPresentationModel, this);
776 if (__isCopyOperation)
778 AppLogDebug("Rash: Setting to Copy in FileListEditorForm");
779 __pFileMove->SetCopy();
781 result r = __pFileMove->StartTimer();
786 __isCopyOperation = false;
799 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
803 FileListEditorForm::OnFileOpInvalidate(enum FileActionMode actionId)
809 FileListEditorForm::GetOverlayStatus(void) const
815 FileListEditorForm::OnFileOpComplete(enum FileActionMode actionId, enum FileActionCompleteRes res)
818 __pPresentationModel->SetUpdateProgressStatus(false);
819 if (res != COMPLETE_SUCCESS)
821 MessageBox messageBox;
822 messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_OPERATION_FAILED"), MSGBOX_STYLE_OK, 3000);
825 messageBox.ShowAndWait(modalResult);
827 SceneManager* pSceneManager = SceneManager::GetInstance();
828 AppAssert(pSceneManager);
829 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST));
834 FileListEditorForm::OnContentUpdated()
836 AppLogDebug("ENTER");
838 SceneManager* pSceneManager = SceneManager::GetInstance();
840 if(__pDeletePopup != null)
842 if(__pDeletePopup->IsVisible() == true)
844 __pDeletePopup->Destroy();
845 __pDeletePopup = null;
851 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
853 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
854 if (pEditorPanel != null)
856 pEditorPanel->CancelUpdateProgress();
859 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
861 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
862 if (pSelectionPanel != null)
864 pSelectionPanel->CancelUpdateProgress();
868 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK
869 && pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
871 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
872 SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY));
875 else if (_overlayMsg == false)
877 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
878 SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY));
881 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
885 FileListEditorForm::SetUpPopup(void)
887 AppLogDebug("ENTER");
888 result r = E_SUCCESS;
890 if (__pDeletePopup != null)
892 delete __pDeletePopup;
893 __pDeletePopup = null;
896 __pDeletePopup = new (std::nothrow) Popup();
897 __pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP));
898 __pDeletePopup->SetPropagatedKeyEventListener(this);
900 Rectangle popupClientBounds = __pDeletePopup->GetClientAreaBounds();
902 Label* pLabelText = new (std::nothrow) Label();
903 pLabelText->Construct(Rectangle(0, 0, popupClientBounds.width, H_DELETE_LABEL),
904 ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q"));
905 pLabelText->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
906 pLabelText->SetTextConfig(34,LABEL_TEXT_STYLE_BOLD);
907 __pDeletePopup->AddControl(pLabelText);
909 Button* pDeleteButton = new (std::nothrow) Button();
910 pDeleteButton->Construct(Rectangle(popupClientBounds.width / 2 + GAP_W_POPUP_ITEM, Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM -10, H_DELETE_BUTTON),
911 ResourceManager::GetString(L"IDS_COM_BODY_DELETE"));
912 pDeleteButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_DELETE_BUTTON_NORMAL);
913 pDeleteButton->SetColor(BUTTON_STATUS_PRESSED, COLOR_DELETE_BUTTON_PRESSED);
914 pDeleteButton->SetTextColor(COLOR_DELETE_BUTTON_TEXT);
915 pDeleteButton->SetActionId(IDA_DELETE_POPUP_DEL);
916 pDeleteButton->AddActionEventListener(*this);
917 __pDeletePopup->AddControl(pDeleteButton);
919 Button* pButtonCancel = new (std::nothrow) Button();
920 pButtonCancel->Construct(Rectangle(10, Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM -10, H_DELETE_BUTTON),
921 ResourceManager::GetString(L"IDS_COM_POP_CANCEL"));
922 pButtonCancel->SetActionId(IDA_DELETE_POPUP_CANCEL);
923 pButtonCancel->AddActionEventListener(*this);
924 __pDeletePopup->AddControl(pButtonCancel);
925 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
931 FileListEditorForm::SetTitleText(const String& titleText)
933 AppLogDebug("ENTER");
934 Header* pHeader = GetHeader();
935 TryReturnVoid(pHeader != null, "[%s] fail to get the header.", GetErrorMessage(GetLastResult()));
936 pHeader->SetTitleText(titleText);
937 pHeader->Invalidate(true);
938 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
942 FileListEditorForm::RefreshFolderList(void)
944 AppLogDebug("ENTER");
945 ContentDirectory contentDirectory;
946 IListT<ContentType>* pContentTypeList = new (std::nothrow) ArrayListT<ContentType>();
947 pContentTypeList->Add(CONTENT_TYPE_IMAGE);
948 pContentTypeList->Add(CONTENT_TYPE_VIDEO);
949 result r = contentDirectory.Construct(*pContentTypeList);
952 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
955 delete pContentTypeList;
957 if (__pContentDirectoryList != null)
959 __pContentDirectoryList->RemoveAll(true);
960 delete __pContentDirectoryList;
961 __pContentDirectoryList = null;
963 __pContentDirectoryList = contentDirectory.GetContentDirectoryPathListN(SORT_ORDER_NONE);
965 if (__pContentDirectoryNameList != NULL)
967 __pContentDirectoryNameList->RemoveAll(true);
968 delete __pContentDirectoryNameList;
969 __pContentDirectoryNameList = null;
972 __pContentDirectoryNameList = new (std::nothrow) ArrayList(SingleObjectDeleter);
973 String* pDirPath = null;
974 String* pDirName = null;
975 String mediaPath = RESERVED_MEDIA_PATH;
976 int length = mediaPath.GetLength();
977 mediaPath.Remove(length-1,1);
979 int loopCount = __pContentDirectoryList->GetCount();
980 for (int i = 0; i < loopCount; ++i)
982 pDirPath = static_cast<String*>(__pContentDirectoryList->GetAt(i));
983 pDirName = new (std::nothrow) String(GetDirecotyNameFromFullPath(*pDirPath));
985 if (*pDirPath == mediaPath)
987 *pDirName = ResourceManager::GetString(L"IDS_MEDIABR_POP_NO_NAME");
988 __pContentDirectoryNameList->Add(pDirName);
992 __pContentDirectoryNameList->Add(pDirName);
996 __pOptionMenu->RemoveAllItems();
997 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_CREATE_ALBUM"),
998 IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM);
1000 loopCount = __pContentDirectoryNameList->GetCount();
1002 String dirAllAlbums = L"All albums";
1004 for (int i = 0; i < loopCount; ++i)
1006 pDirName = static_cast<String*>(__pContentDirectoryNameList->GetAt(i));
1008 if (*pDirName != __pPresentationModel->GetCurrentAlbumName() || *pDirName == dirAllAlbums)
1010 __pOptionMenu->AddItem(*(new (std::nothrow) String(*pDirName)),
1011 IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START + i);
1016 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1020 FileListEditorForm::OnFormBackRequested(Form& source)
1022 AppLogDebug("ENTER");
1024 SceneManager* pSceneManager = SceneManager::GetInstance();
1025 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
1027 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
1029 if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
1031 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALBUM_LIST));
1033 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
1035 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALBUM_LIST));
1040 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1042 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALL_LIST));
1044 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
1046 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_IMAGE_LIST));
1048 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
1050 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_VIDEO_LIST));
1052 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1054 if (__pShareContextMenu != null && __pShareContextMenu->GetShowState() == true)
1056 __pShareContextMenu->SetShowState(false);
1060 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
1061 (pSceneManager->GetCurrentScene()->GetPanel());
1062 if (pSelectionPanel != null)
1064 IList* pList = pSelectionPanel->GetItemCheckedIndexListN();
1067 pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1070 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST_EDITOR, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
1071 SCENE_HISTORY_OPTION_ADD_HISTORY, SCENE_DESTROY_OPTION_DESTROY), pList);
1077 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALL_LIST));
1080 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1084 FileListEditorForm::SetFooterButtonsState(const bool enableState)
1086 AppLogDebug("ENTER");
1087 Footer* pFooter = GetFooter();
1088 TryReturnVoid(pFooter != null, "[%s] fail to get the footer.", GetErrorMessage(GetLastResult()));
1090 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
1092 if (enableState == true)
1094 pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
1095 pFooter->SetItemEnabled(0, true);
1099 pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
1100 pFooter->SetItemEnabled(0, false);
1105 if (enableState == true)
1107 pFooter->SetItemEnabled(0, true);
1108 pFooter->SetItemEnabled(1, true);
1112 pFooter->SetItemEnabled(0, false);
1113 pFooter->SetItemEnabled(1, false);
1116 pFooter->RequestRedraw(true);
1117 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1121 FileListEditorForm::OnOrientationChanged(const Tizen::Ui::Control &source, Tizen::Ui::OrientationStatus orientationStatus)
1123 AppLogDebug("ENTER");
1124 SceneManager* pSceneManager = SceneManager::GetInstance();
1125 pSceneManager->GetCurrentScene();
1127 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1129 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1130 if (pEditorPanel != null)
1132 pEditorPanel->ChangeOrientation();
1135 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
1137 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1138 if (pEditorPanel != null)
1140 pEditorPanel->ChangeOrientation();
1143 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
1145 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1146 if (pEditorPanel != null)
1148 pEditorPanel->ChangeOrientation();
1151 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1153 AllListSelectionPanel* pEditorPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1154 if (pEditorPanel != null)
1156 pEditorPanel->ChangeOrientation();
1159 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1163 FileListEditorForm::OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo)
1165 AppLogDebug("ENTER");
1167 if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
1169 _overlayMsg = false;
1170 __pDeletePopup->SetShowState(false);
1171 __pDeletePopup->Invalidate(true);
1173 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1179 FileListEditorForm::MoveToAlbum(const String& destDirectory)
1181 AppLogDebug("ENTER");
1182 result r = E_FAILURE;
1183 String albumName = __pPresentationModel->ConvertToAlbumName(destDirectory);
1184 if (albumName != EMPTY_SPACE)
1186 IList* pDirectoryList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1187 pDirectoryList->Add(new (std::nothrow) String(destDirectory));
1188 __pPresentationModel->SetCurrentAlbumInfo(albumName, *pDirectoryList);
1189 __pPresentationModel->SetCurrentAlbumContentType(CONTENT_TYPE_ALL);
1190 delete pDirectoryList;
1192 SceneManager* pSceneManager = SceneManager::GetInstance();
1193 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST));
1196 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1202 FileListEditorForm::SelectAllPressed(void)
1204 SceneManager* pSceneManager = SceneManager::GetInstance();
1205 pSceneManager->GetCurrentScene();
1207 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1209 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1210 if (pEditorPanel != null)
1212 pEditorPanel->OnSelectAllPressed();
1215 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
1217 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1218 if (pEditorPanel != null)
1220 pEditorPanel->OnSelectAllPressed();
1223 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
1225 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1226 if (pEditorPanel != null)
1228 pEditorPanel->OnSelectAllPressed();
1231 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1233 AllListSelectionPanel* pEditorPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1234 if (pEditorPanel != null)
1236 pEditorPanel->OnSelectAllPressed();
1242 FileListEditorForm::OnSlideSettingPopUpItemSelected(int index)
1244 if (__pPopUp != NULL)
1246 __pPopUp->SetShowState(false);
1249 SceneManager* pSceneManager = SceneManager::GetInstance();
1253 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1255 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1256 if (pEditorPanel != null)
1258 pEditorPanel->OnRequestSlideShow();
1261 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1263 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
1264 (pSceneManager->GetCurrentScene()->GetPanel());
1266 if (pSelectionPanel != null)
1268 pSelectionPanel->OnRequestSlideShow();
1272 else if (index == 1)
1274 SceneManager* pSceneManager = SceneManager::GetInstance();
1275 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager", GetErrorMessage(GetLastResult()));
1277 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SETTING_MAIN));
1282 FileListEditorForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
1284 AppLogDebug("ENTER");
1285 __pPresentationModel->RemoveContentEventListener(this);
1286 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1290 FileListEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
1292 AppLogDebug("ENTER");
1293 __pPresentationModel->AddContentEventListener(this);
1294 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1298 FileListEditorForm::OnFormMenuRequested (Tizen::Ui::Controls::Form &source)
1301 SceneManager* pSceneManager = SceneManager::GetInstance();
1302 int checkedCount = 0;
1304 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1306 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1307 if (pEditorPanel != null)
1309 checkedCount = pEditorPanel->GetItemCheckedCount();
1312 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1314 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1315 if (pSelectionPanel != null)
1317 checkedCount = pSelectionPanel->GetItemCheckedCount();
1321 if (__pShareContextMenu != null && __pShareContextMenu->GetShowState() == true)
1323 __pShareContextMenu->SetShowState(false);
1326 if (checkedCount > 0)
1328 if (__pOptionMenu == null)
1333 __pOptionMenu->RemoveAllItems();
1334 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MOVE"),
1335 IDA_CONTEXT_MENU_MORE_MOVE);
1336 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_COPY"),
1337 IDA_CONTEXT_MENU_MORE_COPY);
1339 if (checkedCount > 1)
1341 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"),
1342 IDA_CONTEXT_MENU_MORE_SLIDE_SHOW);
1345 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"),IDA_CONTEXT_MENU_ROTATE_LEFT);
1346 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"),IDA_CONTEXT_MENU_ROTATE_RIGHT);
1348 __pOptionMenu->SetShowState(true);
1349 __pOptionMenu->Show();