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 __pPresentationModel = FileListPresentationModel::GetInstance();
124 __pPresentationModel->ClearThumbnailRequests();
126 pHeader->SetStyle(HEADER_STYLE_TITLE);
127 pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT"));
129 if ((__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK
130 && __pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_SINGLE) == false)
132 Bitmap* pNormalBitmap = ResourceManager::GetBitmapN(IDB_ICON_SELECT_ALL);
133 Bitmap* pPressBitmap = ResourceManager::GetBitmapN(IDB_ICON_SELECT_ALL_PRESS);
134 ButtonItem selectAll;
135 selectAll.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FILE_LIST_SELECT_ALL);
136 selectAll.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pNormalBitmap);
137 selectAll.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pPressBitmap);
138 pHeader->SetButton(BUTTON_POSITION_LEFT, selectAll);
139 delete pNormalBitmap;
143 pHeader->AddActionEventListener(*this);
146 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
152 FileListEditorForm::InitializeFooter(void)
154 AppLogDebug("ENTER");
155 Footer* pFooter = GetFooter();
156 TryReturn(pFooter != null, E_FAILURE, "[%s] fail to get the footer.", GetErrorMessage(GetLastResult()));
157 pFooter->RemoveAllItems();
159 result r = E_SUCCESS;
161 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
163 if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
165 pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
167 FooterItem footerConfirm;
168 footerConfirm.Construct(IDA_FOOTER_CONFIRM);
169 footerConfirm.SetText(ResourceManager::GetString(L"IDS_COM_SK_DONE"));
170 pFooter->AddItem(footerConfirm);
171 pFooter->SetItemEnabled(0, false);
172 pFooter->SetShowState(true);
173 pFooter->Invalidate(true);
177 pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_TEXT);
178 pFooter->SetShowState(false);
179 pFooter->Invalidate(true);
182 SetFormBackEventListener(this);
187 pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
188 SetFormMenuEventListener(this);
190 FooterItem footerShare;
191 r = footerShare.Construct(IDA_FOOTER_SHARE);
192 TryReturn(r == E_SUCCESS, r, "[%s] Unable to construct footer item", GetErrorMessage(r));
193 Bitmap* pBitmapShare = ResourceManager::GetBitmapN(IDB_CONTROLBAR_SHARE);
194 Bitmap* pBitmapShareDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_SHARE_DIM);
196 if (pBitmapShare != null && pBitmapShareDim != null)
198 footerShare.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmapShare);
199 footerShare.SetIcon(FOOTER_ITEM_STATUS_DISABLED, pBitmapShareDim);
202 r = pFooter->AddItem(footerShare);
204 delete pBitmapShareDim;
205 TryReturn(r == E_SUCCESS, r, "[%s] Unable to add item", GetErrorMessage(r));
207 FooterItem footerDelete;
208 r = footerDelete.Construct(IDA_FOOTER_DELETE);
209 TryReturn(r == E_SUCCESS, r, "[%s] Unable to construct footer item", GetErrorMessage(r));
210 Bitmap* pBitmapDelete = ResourceManager::GetBitmapN(IDB_CONTROLBAR_DELETE);
211 Bitmap* pBitmapDeleteDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_DELETE_DIM);
213 if (pBitmapDelete != null && pBitmapDeleteDim != null)
215 footerDelete.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmapDelete);
216 footerDelete.SetIcon(FOOTER_ITEM_STATUS_DISABLED, pBitmapDeleteDim);
219 r = pFooter->AddItem(footerDelete);
220 delete pBitmapDelete;
221 delete pBitmapDeleteDim;
222 TryReturn(r == E_SUCCESS, r, "[%s] Unable to add item", GetErrorMessage(r));
224 SetFormBackEventListener(this);
226 SceneManager* pSceneManager = SceneManager::GetInstance();
227 int checkedCount = 0;
229 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
231 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
232 if (pEditorPanel != null)
234 checkedCount = pEditorPanel->GetItemCheckedCount();
237 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
239 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
240 if (pSelectionPanel != null)
242 checkedCount = pSelectionPanel->GetItemCheckedCount();
246 AppLogDebug("GetItemCheckedCount(%d)", checkedCount);
248 if (__pOptionMenu != null)
250 delete __pOptionMenu;
251 __pOptionMenu = null;
254 __pOptionMenu = new (std::nothrow) OptionMenu();
255 __pOptionMenu->Construct();
256 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MOVE"),
257 IDA_CONTEXT_MENU_MORE_MOVE);
258 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_COPY"),
259 IDA_CONTEXT_MENU_MORE_COPY);
261 if (checkedCount > 1)
263 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"),
264 IDA_CONTEXT_MENU_MORE_SLIDE_SHOW);
267 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"),IDA_CONTEXT_MENU_ROTATE_LEFT);
268 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"),IDA_CONTEXT_MENU_ROTATE_RIGHT);
270 __pOptionMenu->AddActionEventListener(*this);
272 if (__pContentDirectoryNameList != null)
274 __pContentDirectoryNameList->RemoveAll(true);
275 delete __pContentDirectoryNameList;
276 __pContentDirectoryNameList = null;
282 pFooter->AddActionEventListener(*this);
283 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
289 FileListEditorForm::GetDirecotyNameFromFullPath(const String& fullPath)const
291 AppLogDebug("ENTER");
292 if (fullPath == null)
294 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
298 String delim(DIRECTORY_SEPARATOR);
299 StringTokenizer st(fullPath,delim);
301 while (st.HasMoreTokens())
303 st.GetNextToken(token);
305 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
311 FileListEditorForm::OnTerminating(void)
313 AppLogDebug("ENTER");
314 __pPresentationModel->RemoveContentEventListener(this);
316 if (__pOptionMenu != null)
318 __pOptionMenu->RemoveActionEventListener(*this);
319 delete __pOptionMenu;
320 __pOptionMenu = null;
323 if (__pShareContextMenu != null)
325 __pShareContextMenu->RemoveActionEventListener(*this);
326 delete __pShareContextMenu;
327 __pShareContextMenu = null;
330 if (__pDeletePopup != null)
332 delete __pDeletePopup;
333 __pDeletePopup = null;
336 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
342 FileListEditorForm::OnActionPerformed(const Control& source, int actionId)
344 AppLogDebug("ENTER(actionId=%d)", actionId);
345 SceneManager* pSceneManager = SceneManager::GetInstance();
346 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
350 case IDA_FILE_LIST_SELECT_ALL:
354 case IDA_FOOTER_SHARE:
356 if (__pShareContextMenu != NULL)
358 delete __pShareContextMenu;
359 __pShareContextMenu = null;
362 Bitmap* pBitmapEmailContextItem = null;
363 Bitmap* pBitmapMessageContextItem = null;
364 pBitmapEmailContextItem = ResourceManager::GetBitmapN(IDB_IMAGE_CONTEXT_EMAIL_ICON);
365 pBitmapMessageContextItem = ResourceManager::GetBitmapN(IDB_IMAGE_CONTEXT_MESSAGE_ICON);
367 __pShareContextMenu = new (std::nothrow) ContextMenu();
368 __pShareContextMenu->Construct(Point(GetClientAreaBounds().width/3 + 15, GetClientAreaBounds().height),
369 CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD);
371 if ( pBitmapMessageContextItem != null)
373 __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MESSAGE"),
374 IDA_CONTEXT_MENU_SHARE_MESSAGE, *pBitmapMessageContextItem, null, null);
375 delete pBitmapMessageContextItem;
378 if ( pBitmapEmailContextItem != null)
380 __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"),
381 IDA_CONTEXT_MENU_SHARE_EMAIL, *pBitmapEmailContextItem, null, null);
382 delete pBitmapEmailContextItem;
384 __pShareContextMenu->SetFocusable(true);
385 __pShareContextMenu->AddActionEventListener(*this);
388 Rectangle rect = source.GetBounds();
390 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
392 __pShareContextMenu->SetAnchorPosition(Point(rect.width / 8 * 3, rect.y));
396 __pShareContextMenu->SetAnchorPosition(Point(rect.width / 8 * 3, rect.y - H_TOAST_LABEL));
399 __pShareContextMenu->SetShowState(true);
400 __pShareContextMenu->Show();
405 case IDA_FOOTER_DELETE:
407 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
409 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
410 if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0)
412 __pDeletePopup->SetShowState(true);
413 __pDeletePopup->Show();
417 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
419 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
420 if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0)
422 __pDeletePopup->SetShowState(true);
423 __pDeletePopup->Show();
427 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
429 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
430 if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0)
432 __pDeletePopup->SetShowState(true);
433 __pDeletePopup->Show();
437 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
439 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
440 (pSceneManager->GetCurrentScene()->GetPanel());
441 if (pSelectionPanel != null && pSelectionPanel->GetItemCheckedCount() > 0)
443 __pDeletePopup->SetShowState(true);
444 __pDeletePopup->Show();
451 case IDA_CONTEXT_MENU_MORE_EDIT:
456 case IDA_CONTEXT_MENU_MORE_ADD_TAG:
461 case IDA_CONTEXT_MENU_MORE_COPY:
463 case IDA_CONTEXT_MENU_MORE_MOVE:
465 if (actionId == IDA_CONTEXT_MENU_MORE_MOVE)
467 __isCopyOperation = false;
469 else if (actionId == IDA_CONTEXT_MENU_MORE_COPY)
471 __isCopyOperation = true;
476 __pOptionMenu->SetShowState(true);
477 __pOptionMenu->Show();
483 case IDA_CONTEXT_MENU_MORE_SLIDE_SHOW:
485 if (__pPopUp != NULL)
490 __pPopUp = new (std::nothrow) SlideShowPopUp();
492 if (__pPopUp != null)
494 __pPopUp->Initialize();
495 __pPopUp->SetEventListner(this);
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();