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 | FORM_STYLE_INDICATOR_AUTO_HIDE);
109 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
115 FileListEditorForm::OnInitializing(void)
117 AppLogDebug("ENTER");
118 Header* pHeader = GetHeader();
119 TryReturn(pHeader != null, E_FAILURE, "[%s] fail to get the header.", GetErrorMessage(GetLastResult()));
121 SetOrientation(ORIENTATION_AUTOMATIC);
122 AddOrientationEventListener(*this);
124 __pPresentationModel = FileListPresentationModel::GetInstance();
125 __pPresentationModel->ClearThumbnailRequests();
127 pHeader->SetStyle(HEADER_STYLE_TITLE);
128 pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT"));
130 if ((__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK
131 && __pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_SINGLE) == false)
133 Bitmap* pNormalBitmap = ResourceManager::GetBitmapN(IDB_ICON_SELECT_ALL);
134 Bitmap* pPressBitmap = ResourceManager::GetBitmapN(IDB_ICON_SELECT_ALL_PRESS);
135 ButtonItem selectAll;
136 selectAll.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FILE_LIST_SELECT_ALL);
137 selectAll.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pNormalBitmap);
138 selectAll.SetIcon(BUTTON_ITEM_STATUS_PRESSED, pPressBitmap);
139 pHeader->SetButton(BUTTON_POSITION_LEFT, selectAll);
140 delete pNormalBitmap;
144 pHeader->AddActionEventListener(*this);
147 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
153 FileListEditorForm::InitializeFooter(void)
155 AppLogDebug("ENTER");
156 Footer* pFooter = GetFooter();
157 TryReturn(pFooter != null, E_FAILURE, "[%s] fail to get the footer.", GetErrorMessage(GetLastResult()));
158 pFooter->RemoveAllItems();
160 result r = E_SUCCESS;
162 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
164 if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
166 pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
168 FooterItem footerConfirm;
169 footerConfirm.Construct(IDA_FOOTER_CONFIRM);
170 footerConfirm.SetText(ResourceManager::GetString(L"IDS_COM_SK_DONE"));
171 pFooter->AddItem(footerConfirm);
172 pFooter->SetItemEnabled(0, false);
173 pFooter->SetShowState(true);
174 pFooter->Invalidate(true);
178 pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_TEXT);
179 pFooter->SetShowState(false);
180 pFooter->Invalidate(true);
183 SetFormBackEventListener(this);
188 pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT);
189 SetFormMenuEventListener(this);
191 FooterItem footerShare;
192 r = footerShare.Construct(IDA_FOOTER_SHARE);
193 TryReturn(r == E_SUCCESS, r, "[%s] Unable to construct footer item", GetErrorMessage(r));
194 Bitmap* pBitmapShare = ResourceManager::GetBitmapN(IDB_CONTROLBAR_SHARE);
195 Bitmap* pBitmapShareDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_SHARE_DIM);
197 if (pBitmapShare != null && pBitmapShareDim != null)
199 footerShare.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmapShare);
200 footerShare.SetIcon(FOOTER_ITEM_STATUS_DISABLED, pBitmapShareDim);
203 r = pFooter->AddItem(footerShare);
205 delete pBitmapShareDim;
206 TryReturn(r == E_SUCCESS, r, "[%s] Unable to add item", GetErrorMessage(r));
208 FooterItem footerDelete;
209 r = footerDelete.Construct(IDA_FOOTER_DELETE);
210 TryReturn(r == E_SUCCESS, r, "[%s] Unable to construct footer item", GetErrorMessage(r));
211 Bitmap* pBitmapDelete = ResourceManager::GetBitmapN(IDB_CONTROLBAR_DELETE);
212 Bitmap* pBitmapDeleteDim = ResourceManager::GetBitmapN(IDB_CONTROLBAR_DELETE_DIM);
214 if (pBitmapDelete != null && pBitmapDeleteDim != null)
216 footerDelete.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmapDelete);
217 footerDelete.SetIcon(FOOTER_ITEM_STATUS_DISABLED, pBitmapDeleteDim);
220 r = pFooter->AddItem(footerDelete);
221 delete pBitmapDelete;
222 delete pBitmapDeleteDim;
223 TryReturn(r == E_SUCCESS, r, "[%s] Unable to add item", GetErrorMessage(r));
225 SetFormBackEventListener(this);
227 SceneManager* pSceneManager = SceneManager::GetInstance();
228 int checkedCount = 0;
230 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
232 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
233 if (pEditorPanel != null)
235 checkedCount = pEditorPanel->GetItemCheckedCount();
238 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
240 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
241 if (pSelectionPanel != null)
243 checkedCount = pSelectionPanel->GetItemCheckedCount();
247 AppLogDebug("GetItemCheckedCount(%d)", checkedCount);
249 if (__pOptionMenu != null)
251 delete __pOptionMenu;
252 __pOptionMenu = null;
255 __pOptionMenu = new (std::nothrow) OptionMenu();
256 __pOptionMenu->Construct();
257 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MOVE"),
258 IDA_CONTEXT_MENU_MORE_MOVE);
259 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_COPY"),
260 IDA_CONTEXT_MENU_MORE_COPY);
262 if (checkedCount > 1)
264 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"),
265 IDA_CONTEXT_MENU_MORE_SLIDE_SHOW);
268 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"),IDA_CONTEXT_MENU_ROTATE_LEFT);
269 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"),IDA_CONTEXT_MENU_ROTATE_RIGHT);
271 __pOptionMenu->AddActionEventListener(*this);
273 if (__pContentDirectoryNameList != null)
275 __pContentDirectoryNameList->RemoveAll(true);
276 delete __pContentDirectoryNameList;
277 __pContentDirectoryNameList = null;
283 pFooter->AddActionEventListener(*this);
284 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
290 FileListEditorForm::GetDirecotyNameFromFullPath(const String& fullPath)const
292 AppLogDebug("ENTER");
293 if (fullPath == null)
295 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
299 String delim(DIRECTORY_SEPARATOR);
300 StringTokenizer st(fullPath,delim);
302 while (st.HasMoreTokens())
304 st.GetNextToken(token);
306 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
312 FileListEditorForm::OnTerminating(void)
314 AppLogDebug("ENTER");
315 __pPresentationModel->RemoveContentEventListener(this);
317 if (__pOptionMenu != null)
319 __pOptionMenu->RemoveActionEventListener(*this);
320 delete __pOptionMenu;
321 __pOptionMenu = null;
324 if (__pShareContextMenu != null)
326 __pShareContextMenu->RemoveActionEventListener(*this);
327 delete __pShareContextMenu;
328 __pShareContextMenu = null;
331 if (__pDeletePopup != null)
333 delete __pDeletePopup;
334 __pDeletePopup = null;
337 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
343 FileListEditorForm::OnActionPerformed(const Control& source, int actionId)
345 AppLogDebug("ENTER(actionId=%d)", actionId);
346 SceneManager* pSceneManager = SceneManager::GetInstance();
347 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
351 case IDA_FILE_LIST_SELECT_ALL:
355 case IDA_FOOTER_SHARE:
357 if (__pShareContextMenu != NULL)
359 delete __pShareContextMenu;
360 __pShareContextMenu = null;
363 Bitmap* pBitmapEmailContextItem = null;
364 Bitmap* pBitmapMessageContextItem = null;
365 pBitmapEmailContextItem = ResourceManager::GetBitmapN(IDB_IMAGE_CONTEXT_EMAIL_ICON);
366 pBitmapMessageContextItem = ResourceManager::GetBitmapN(IDB_IMAGE_CONTEXT_MESSAGE_ICON);
368 __pShareContextMenu = new (std::nothrow) ContextMenu();
369 __pShareContextMenu->Construct(Point(GetClientAreaBounds().width/3 + 15, GetClientAreaBounds().height),
370 CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD);
372 if ( pBitmapMessageContextItem != null)
374 __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MESSAGE"),
375 IDA_CONTEXT_MENU_SHARE_MESSAGE, *pBitmapMessageContextItem, null, null);
376 delete pBitmapMessageContextItem;
379 if ( pBitmapEmailContextItem != null)
381 __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"),
382 IDA_CONTEXT_MENU_SHARE_EMAIL, *pBitmapEmailContextItem, null, null);
383 delete pBitmapEmailContextItem;
385 __pShareContextMenu->SetFocusable(true);
386 __pShareContextMenu->AddActionEventListener(*this);
389 Rectangle rect = source.GetBounds();
391 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
393 __pShareContextMenu->SetAnchorPosition(Point(rect.width / 8 * 3, rect.y));
397 __pShareContextMenu->SetAnchorPosition(Point(rect.width / 8 * 3, rect.y - H_TOAST_LABEL));
400 __pShareContextMenu->SetShowState(true);
401 __pShareContextMenu->Show();
406 case IDA_FOOTER_DELETE:
408 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
410 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
411 if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0)
413 __pDeletePopup->SetShowState(true);
414 __pDeletePopup->Show();
418 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
420 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
421 if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0)
423 __pDeletePopup->SetShowState(true);
424 __pDeletePopup->Show();
428 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
430 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
431 if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0)
433 __pDeletePopup->SetShowState(true);
434 __pDeletePopup->Show();
438 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
440 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
441 (pSceneManager->GetCurrentScene()->GetPanel());
442 if (pSelectionPanel != null && pSelectionPanel->GetItemCheckedCount() > 0)
444 __pDeletePopup->SetShowState(true);
445 __pDeletePopup->Show();
452 case IDA_CONTEXT_MENU_MORE_EDIT:
457 case IDA_CONTEXT_MENU_MORE_ADD_TAG:
462 case IDA_CONTEXT_MENU_MORE_COPY:
464 case IDA_CONTEXT_MENU_MORE_MOVE:
466 if (actionId == IDA_CONTEXT_MENU_MORE_MOVE)
468 __isCopyOperation = false;
470 else if (actionId == IDA_CONTEXT_MENU_MORE_COPY)
472 __isCopyOperation = true;
477 __pOptionMenu->SetShowState(true);
478 __pOptionMenu->Show();
484 case IDA_CONTEXT_MENU_MORE_SLIDE_SHOW:
486 if (__pPopUp != NULL)
491 __pPopUp = new (std::nothrow) SlideShowPopUp();
493 if (__pPopUp != null)
495 __pPopUp->Initialize();
496 __pPopUp->SetEventListner(this);
497 __pPopUp->SetShowState(true);
503 case IDA_CONTEXT_MENU_SHARE_MESSAGE:
505 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
507 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
508 if (pEditorPanel != null)
510 pEditorPanel->OnRequestMessage();
513 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
515 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
516 if (pSelectionPanel != null)
518 pSelectionPanel->OnRequestMessage();
524 case IDA_CONTEXT_MENU_SHARE_EMAIL:
526 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
528 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
529 if (pEditorPanel != null)
531 pEditorPanel->OnRequestEmail();
534 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
536 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
537 if (pSelectionPanel != null)
539 pSelectionPanel->OnRequestEmail();
545 case IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM:
547 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
549 AllListEditorPanel* pListEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
550 if (pListEditorPanel)
552 IList* pList = pListEditorPanel->GetItemCheckedIndexListN();
553 pList->InsertAt(new (std::nothrow) Integer(ALBUM_CREATE), ALBUM_FIRST_ELEMENT);
554 if (__isCopyOperation)
556 pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_COPY), ALBUM_SECOND_ELEMENT);
560 pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_MOVE), ALBUM_SECOND_ELEMENT);
562 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pList);
568 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
570 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
571 (pSceneManager->GetCurrentScene()->GetPanel());
573 if (pSelectionPanel != null)
575 IList* pList = pSelectionPanel->GetItemCheckedIndexListN();
576 pList->InsertAt(new (std::nothrow) Integer(ALBUM_CREATE), ALBUM_FIRST_ELEMENT);
577 if (__isCopyOperation)
579 pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_COPY), ALBUM_SECOND_ELEMENT);
583 pList->InsertAt(new (std::nothrow) Integer(FILE_ACTION_MOVE), ALBUM_SECOND_ELEMENT);
585 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pList);
592 case IDA_DELETE_POPUP_DEL:
595 __pDeletePopup->SetShowState(false);
596 __pDeletePopup->Invalidate(true);
598 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
600 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
601 if (pEditorPanel != null)
603 result r = pEditorPanel->OnRequestDelete();
606 AppLogDebug("OnRequestDelete failed with %s", GetErrorMessage(r));
610 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
612 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
613 (pSceneManager->GetCurrentScene()->GetPanel());
615 if (pSelectionPanel != null)
617 result r = pSelectionPanel->OnRequestDelete();
620 AppLogDebug("OnRequestDelete failed with %s", GetErrorMessage(r));
627 case IDA_DELETE_POPUP_CANCEL:
630 __pDeletePopup->SetShowState(false);
631 __pDeletePopup->Invalidate(true);
635 case IDA_CONTEXT_MENU_ROTATE_LEFT:
637 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
639 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
640 if (pEditorPanel != null)
642 RotateMode rotateMode = ROTATE_MODE_LEFT;
643 pEditorPanel->OnRequestRotate(rotateMode);
646 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
648 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
649 (pSceneManager->GetCurrentScene()->GetPanel());
651 if (pSelectionPanel != null)
653 RotateMode rotateMode = ROTATE_MODE_LEFT;
654 pSelectionPanel->OnRotateRequested(rotateMode);
660 case IDA_CONTEXT_MENU_ROTATE_RIGHT:
662 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
664 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
665 if (pEditorPanel != null)
667 RotateMode rotateMode = ROTATE_MODE_RIGHT;
668 pEditorPanel->OnRequestRotate(rotateMode);
671 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
674 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
675 (pSceneManager->GetCurrentScene()->GetPanel());
677 if (pSelectionPanel != null)
679 RotateMode rotateMode = ROTATE_MODE_RIGHT;
680 pSelectionPanel->OnRotateRequested(rotateMode);
686 case IDA_FOOTER_CONFIRM:
688 if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
690 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
691 if (pEditorPanel != null)
693 pEditorPanel->OnRequestAppExitWithMultipleSelectionAppControlResult();
696 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
698 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
699 if (pEditorPanel != null)
701 pEditorPanel->OnRequestAppExitWithMultipleSelectionAppControlResult();
709 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
711 if ((IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START <= actionId) &&
712 (actionId <= IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM + 1000))
714 if (__pContentDirectoryList == null)
718 if (__pContentDirectoryList->GetCount() > actionId - IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START)
720 String* pDirectory = static_cast<String*>
721 (__pContentDirectoryList->GetAt(actionId - IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START));
723 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>
724 (pSceneManager->GetCurrentScene()->GetPanel());
726 if (pEditorPanel != null)
729 IList* pItemIndexList = pEditorPanel->GetItemCheckedIndexListN();
730 GetMoveFileIndexList(*pDirectory, pItemIndexList, __pPresentationModel , __isCopyOperation);
731 __pFileMove = new (std::nothrow) FileMoveTimer(*pDirectory, pItemIndexList, __pPresentationModel, this);
732 if (__isCopyOperation)
734 AppLogDebug("Rash: Setting to Copy in FileListEditorForm");
735 __pFileMove->SetCopy();
738 result r = __pFileMove->StartTimer();
743 __isCopyOperation = false;
753 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
755 if ((IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START <= actionId) &&
756 (actionId <= IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM + 1000))
758 if (__pContentDirectoryList == null)
763 if (__pContentDirectoryList->GetCount() > actionId - IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START)
765 String* pDirectory = static_cast<String*>
766 (__pContentDirectoryList->GetAt(actionId - IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START));
768 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
769 (pSceneManager->GetCurrentScene()->GetPanel());
771 if (pSelectionPanel != null)
774 IList* pItemIndexList = pSelectionPanel->GetItemCheckedIndexListN();
775 GetMoveFileIndexList(*pDirectory, pItemIndexList, __pPresentationModel , __isCopyOperation);
776 __pFileMove = new (std::nothrow) FileMoveTimer(*pDirectory, pItemIndexList, __pPresentationModel, this);
777 if (__isCopyOperation)
779 AppLogDebug("Rash: Setting to Copy in FileListEditorForm");
780 __pFileMove->SetCopy();
782 result r = __pFileMove->StartTimer();
787 __isCopyOperation = false;
800 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
804 FileListEditorForm::OnFileOpInvalidate(enum FileActionMode actionId)
810 FileListEditorForm::GetOverlayStatus(void) const
816 FileListEditorForm::OnFileOpComplete(enum FileActionMode actionId, enum FileActionCompleteRes res)
819 __pPresentationModel->SetUpdateProgressStatus(false);
820 if (res != COMPLETE_SUCCESS)
822 MessageBox messageBox;
823 messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_BODY_OPERATION_FAILED"), MSGBOX_STYLE_OK, 3000);
826 messageBox.ShowAndWait(modalResult);
828 SceneManager* pSceneManager = SceneManager::GetInstance();
829 AppAssert(pSceneManager);
830 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST));
835 FileListEditorForm::OnContentUpdated()
837 AppLogDebug("ENTER");
839 SceneManager* pSceneManager = SceneManager::GetInstance();
841 if(__pDeletePopup != null)
843 if(__pDeletePopup->IsVisible() == true)
845 __pDeletePopup->Destroy();
846 __pDeletePopup = null;
852 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
854 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
855 if (pEditorPanel != null)
857 pEditorPanel->CancelUpdateProgress();
860 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
862 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
863 if (pSelectionPanel != null)
865 pSelectionPanel->CancelUpdateProgress();
869 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK
870 && pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
872 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
873 SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY));
876 else if (_overlayMsg == false)
878 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
879 SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY));
882 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
886 FileListEditorForm::SetUpPopup(void)
888 AppLogDebug("ENTER");
889 result r = E_SUCCESS;
891 if (__pDeletePopup != null)
893 delete __pDeletePopup;
894 __pDeletePopup = null;
897 __pDeletePopup = new (std::nothrow) Popup();
898 __pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP));
899 __pDeletePopup->SetPropagatedKeyEventListener(this);
901 Rectangle popupClientBounds = __pDeletePopup->GetClientAreaBounds();
903 Label* pLabelText = new (std::nothrow) Label();
904 pLabelText->Construct(Rectangle(0, 0, popupClientBounds.width, H_DELETE_LABEL),
905 ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q"));
906 pLabelText->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
907 pLabelText->SetTextConfig(34,LABEL_TEXT_STYLE_BOLD);
908 __pDeletePopup->AddControl(pLabelText);
910 Button* pDeleteButton = new (std::nothrow) Button();
911 pDeleteButton->Construct(Rectangle(popupClientBounds.width / 2 + GAP_W_POPUP_ITEM, Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM -10, H_DELETE_BUTTON),
912 ResourceManager::GetString(L"IDS_COM_BODY_DELETE"));
913 pDeleteButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_DELETE_BUTTON_NORMAL);
914 pDeleteButton->SetColor(BUTTON_STATUS_PRESSED, COLOR_DELETE_BUTTON_PRESSED);
915 pDeleteButton->SetTextColor(COLOR_DELETE_BUTTON_TEXT);
916 pDeleteButton->SetActionId(IDA_DELETE_POPUP_DEL);
917 pDeleteButton->AddActionEventListener(*this);
918 __pDeletePopup->AddControl(pDeleteButton);
920 Button* pButtonCancel = new (std::nothrow) Button();
921 pButtonCancel->Construct(Rectangle(10, Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM -10, H_DELETE_BUTTON),
922 ResourceManager::GetString(L"IDS_COM_POP_CANCEL"));
923 pButtonCancel->SetActionId(IDA_DELETE_POPUP_CANCEL);
924 pButtonCancel->AddActionEventListener(*this);
925 __pDeletePopup->AddControl(pButtonCancel);
926 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
932 FileListEditorForm::SetTitleText(const String& titleText)
934 AppLogDebug("ENTER");
935 Header* pHeader = GetHeader();
936 TryReturnVoid(pHeader != null, "[%s] fail to get the header.", GetErrorMessage(GetLastResult()));
937 pHeader->SetTitleText(titleText);
938 pHeader->Invalidate(true);
939 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
943 FileListEditorForm::RefreshFolderList(void)
945 AppLogDebug("ENTER");
946 ContentDirectory contentDirectory;
947 IListT<ContentType>* pContentTypeList = new (std::nothrow) ArrayListT<ContentType>();
948 pContentTypeList->Add(CONTENT_TYPE_IMAGE);
949 pContentTypeList->Add(CONTENT_TYPE_VIDEO);
950 result r = contentDirectory.Construct(*pContentTypeList);
953 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
956 delete pContentTypeList;
958 if (__pContentDirectoryList != null)
960 __pContentDirectoryList->RemoveAll(true);
961 delete __pContentDirectoryList;
962 __pContentDirectoryList = null;
964 __pContentDirectoryList = contentDirectory.GetContentDirectoryPathListN(SORT_ORDER_NONE);
966 if (__pContentDirectoryNameList != NULL)
968 __pContentDirectoryNameList->RemoveAll(true);
969 delete __pContentDirectoryNameList;
970 __pContentDirectoryNameList = null;
973 __pContentDirectoryNameList = new (std::nothrow) ArrayList(SingleObjectDeleter);
974 String* pDirPath = null;
975 String* pDirName = null;
976 String mediaPath = RESERVED_MEDIA_PATH;
977 int length = mediaPath.GetLength();
978 mediaPath.Remove(length-1,1);
980 int loopCount = __pContentDirectoryList->GetCount();
981 for (int i = 0; i < loopCount; ++i)
983 pDirPath = static_cast<String*>(__pContentDirectoryList->GetAt(i));
984 pDirName = new (std::nothrow) String(GetDirecotyNameFromFullPath(*pDirPath));
986 if (*pDirPath == mediaPath)
988 *pDirName = ResourceManager::GetString(L"IDS_MEDIABR_POP_NO_NAME");
989 __pContentDirectoryNameList->Add(pDirName);
993 __pContentDirectoryNameList->Add(pDirName);
997 __pOptionMenu->RemoveAllItems();
998 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_CREATE_ALBUM"),
999 IDA_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM);
1001 loopCount = __pContentDirectoryNameList->GetCount();
1003 String dirAllAlbums = L"All albums";
1005 for (int i = 0; i < loopCount; ++i)
1007 pDirName = static_cast<String*>(__pContentDirectoryNameList->GetAt(i));
1009 if (*pDirName != __pPresentationModel->GetCurrentAlbumName() || *pDirName == dirAllAlbums)
1011 __pOptionMenu->AddItem(*(new (std::nothrow) String(*pDirName)),
1012 IDA_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START + i);
1017 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1021 FileListEditorForm::OnFormBackRequested(Form& source)
1023 AppLogDebug("ENTER");
1025 SceneManager* pSceneManager = SceneManager::GetInstance();
1026 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
1028 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
1030 if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
1032 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALBUM_LIST));
1034 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
1036 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALBUM_LIST));
1041 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1043 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALL_LIST));
1045 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
1047 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_IMAGE_LIST));
1049 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
1051 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_VIDEO_LIST));
1053 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1055 if (__pShareContextMenu != null && __pShareContextMenu->GetShowState() == true)
1057 __pShareContextMenu->SetShowState(false);
1061 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
1062 (pSceneManager->GetCurrentScene()->GetPanel());
1063 if (pSelectionPanel != null)
1065 IList* pList = pSelectionPanel->GetItemCheckedIndexListN();
1068 pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1071 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST_EDITOR, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
1072 SCENE_HISTORY_OPTION_ADD_HISTORY, SCENE_DESTROY_OPTION_DESTROY), pList);
1078 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALL_LIST));
1081 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1085 FileListEditorForm::SetFooterButtonsState(const bool enableState)
1087 AppLogDebug("ENTER");
1088 Footer* pFooter = GetFooter();
1089 TryReturnVoid(pFooter != null, "[%s] fail to get the footer.", GetErrorMessage(GetLastResult()));
1091 if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK)
1093 if (enableState == true)
1095 pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
1096 pFooter->SetItemEnabled(0, true);
1100 pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
1101 pFooter->SetItemEnabled(0, false);
1106 if (enableState == true)
1108 pFooter->SetItemEnabled(0, true);
1109 pFooter->SetItemEnabled(1, true);
1113 pFooter->SetItemEnabled(0, false);
1114 pFooter->SetItemEnabled(1, false);
1117 pFooter->RequestRedraw(true);
1118 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1122 FileListEditorForm::OnOrientationChanged(const Tizen::Ui::Control &source, Tizen::Ui::OrientationStatus orientationStatus)
1124 AppLogDebug("ENTER");
1125 SceneManager* pSceneManager = SceneManager::GetInstance();
1126 pSceneManager->GetCurrentScene();
1128 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1130 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1131 if (pEditorPanel != null)
1133 pEditorPanel->ChangeOrientation();
1136 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
1138 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1139 if (pEditorPanel != null)
1141 pEditorPanel->ChangeOrientation();
1144 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
1146 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1147 if (pEditorPanel != null)
1149 pEditorPanel->ChangeOrientation();
1152 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1154 AllListSelectionPanel* pEditorPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1155 if (pEditorPanel != null)
1157 pEditorPanel->ChangeOrientation();
1160 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1164 FileListEditorForm::OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo)
1166 AppLogDebug("ENTER");
1168 if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
1170 _overlayMsg = false;
1171 __pDeletePopup->SetShowState(false);
1172 __pDeletePopup->Invalidate(true);
1174 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1180 FileListEditorForm::MoveToAlbum(const String& destDirectory)
1182 AppLogDebug("ENTER");
1183 result r = E_FAILURE;
1184 String albumName = __pPresentationModel->ConvertToAlbumName(destDirectory);
1185 if (albumName != EMPTY_SPACE)
1187 IList* pDirectoryList = new (std::nothrow) ArrayList(SingleObjectDeleter);
1188 pDirectoryList->Add(new (std::nothrow) String(destDirectory));
1189 __pPresentationModel->SetCurrentAlbumInfo(albumName, *pDirectoryList);
1190 __pPresentationModel->SetCurrentAlbumContentType(CONTENT_TYPE_ALL);
1191 delete pDirectoryList;
1193 SceneManager* pSceneManager = SceneManager::GetInstance();
1194 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST));
1197 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1203 FileListEditorForm::SelectAllPressed(void)
1205 SceneManager* pSceneManager = SceneManager::GetInstance();
1206 pSceneManager->GetCurrentScene();
1208 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1210 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1211 if (pEditorPanel != null)
1213 pEditorPanel->OnSelectAllPressed();
1216 else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR)
1218 ImageListEditorPanel* pEditorPanel = dynamic_cast<ImageListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1219 if (pEditorPanel != null)
1221 pEditorPanel->OnSelectAllPressed();
1224 else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR)
1226 VideoListEditorPanel* pEditorPanel = dynamic_cast<VideoListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1227 if (pEditorPanel != null)
1229 pEditorPanel->OnSelectAllPressed();
1232 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1234 AllListSelectionPanel* pEditorPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1235 if (pEditorPanel != null)
1237 pEditorPanel->OnSelectAllPressed();
1243 FileListEditorForm::OnSlideSettingPopUpItemSelected(int index)
1245 if (__pPopUp != NULL)
1247 __pPopUp->SetShowState(false);
1250 SceneManager* pSceneManager = SceneManager::GetInstance();
1254 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1256 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1257 if (pEditorPanel != null)
1259 pEditorPanel->OnRequestSlideShow();
1262 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1264 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
1265 (pSceneManager->GetCurrentScene()->GetPanel());
1267 if (pSelectionPanel != null)
1269 pSelectionPanel->OnRequestSlideShow();
1273 else if (index == 1)
1275 SceneManager* pSceneManager = SceneManager::GetInstance();
1276 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager", GetErrorMessage(GetLastResult()));
1278 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SETTING_MAIN));
1283 FileListEditorForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
1285 AppLogDebug("ENTER");
1286 __pPresentationModel->RemoveContentEventListener(this);
1287 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1291 FileListEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
1293 AppLogDebug("ENTER");
1294 __pPresentationModel->AddContentEventListener(this);
1295 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
1299 FileListEditorForm::OnFormMenuRequested (Tizen::Ui::Controls::Form &source)
1302 SceneManager* pSceneManager = SceneManager::GetInstance();
1303 int checkedCount = 0;
1305 if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
1307 AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1308 if (pEditorPanel != null)
1310 checkedCount = pEditorPanel->GetItemCheckedCount();
1313 else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
1315 AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
1316 if (pSelectionPanel != null)
1318 checkedCount = pSelectionPanel->GetItemCheckedCount();
1322 if (__pShareContextMenu != null && __pShareContextMenu->GetShowState() == true)
1324 __pShareContextMenu->SetShowState(false);
1327 if (checkedCount > 0)
1329 if (__pOptionMenu == null)
1334 __pOptionMenu->RemoveAllItems();
1335 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MOVE"),
1336 IDA_CONTEXT_MENU_MORE_MOVE);
1337 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_COPY"),
1338 IDA_CONTEXT_MENU_MORE_COPY);
1340 if (checkedCount > 1)
1342 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDESHOW"),
1343 IDA_CONTEXT_MENU_MORE_SLIDE_SHOW);
1346 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"),IDA_CONTEXT_MENU_ROTATE_LEFT);
1347 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"),IDA_CONTEXT_MENU_ROTATE_RIGHT);
1349 __pOptionMenu->SetShowState(true);
1350 __pOptionMenu->Show();