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 GlAllListSelectionPanel.cpp
19 * @brief This is the implementation file for AllListSelectionPanel class.
22 #include "GlAllListSelectionPanel.h"
23 #include "GlCommonUtil.h"
24 #include "GlFileListEditorForm.h"
25 #include "GlFileListPresentationModel.h"
26 #include "GlResourceManager.h"
28 #include "GlFileUpdateTimer.h"
30 using namespace Tizen::App;
31 using namespace Tizen::Base;
32 using namespace Tizen::Base::Collection;
33 using namespace Tizen::Base::Utility;
34 using namespace Tizen::Content;
35 using namespace Tizen::Graphics;
36 using namespace Tizen::Media;
37 using namespace Tizen::Ui::Controls;
38 using namespace Tizen::Ui::Scenes;
40 static const int LENGTH_COUNT_LABEL = 256;
41 static const int H_CONTENT_MARGIN = 9;
42 static const int W_CONTENT_MARGIN = 6;
43 static const int W_CONTENT_SPACE = 6;
44 static const int H_CONTENT_SPACE = 6;
45 static const Color COLOR_THUMBNAIL_DIM (Color::GetColor(COLOR_ID_BLACK));
46 static const int ALPHA_THUMBNAIL_DIM = 70;
48 static const Rectangle RECT_INITIAL (0, 0, 10, 10);
50 AllListSelectionPanel::AllListSelectionPanel(void)
52 , __pContentIconListView(null)
53 , __pSeletedIndexList(null)
54 , __pFileListEditorForm(null)
55 , __pFileUpdateTimer(null)
56 , __pPresentationModel(null)
59 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
62 AllListSelectionPanel::~AllListSelectionPanel(void)
65 delete __pFileUpdateTimer;
66 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
70 AllListSelectionPanel::Initialize(void)
73 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
75 return Construct(RECT_INITIAL); // Should be set proper area at OnInitializing()
79 AllListSelectionPanel::OnInitializing(void)
82 const Form* pForm = dynamic_cast<Form*>(GetParent());
83 TryReturn(pForm != null, E_FAILURE, "[%s] fail to get the form.", GetErrorMessage(GetLastResult()));
85 __pPresentationModel = FileListPresentationModel::GetInstance();
86 __pPresentationModel->ClearThumbnailRequests();
87 __pPresentationModel->AddPresentationModelListener(this);
89 Rectangle clientAreaBounds = pForm->GetClientAreaBounds();
90 clientAreaBounds.x = clientAreaBounds.y = 0;
91 result r = SetBounds(clientAreaBounds);
93 __pContentIconListView = new (std::nothrow) IconListView();
94 __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width, clientAreaBounds.height),
95 DIMENSION_DEFAULT_THUMBNAIL, ICON_LIST_VIEW_STYLE_MARK, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL);
96 Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
97 if (pBitmapEmpty != null)
99 __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
102 __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
103 __pContentIconListView->SetMargin(MARGIN_TYPE_LEFT, W_CONTENT_MARGIN);
104 __pContentIconListView->SetMargin(MARGIN_TYPE_RIGHT, W_CONTENT_MARGIN);
105 __pContentIconListView->SetMargin(MARGIN_TYPE_TOP, H_CONTENT_MARGIN);
106 __pContentIconListView->SetItemSpacing(W_CONTENT_SPACE, H_CONTENT_SPACE);
107 __pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE);
108 __pContentIconListView->SetItemProvider(*this);
109 __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT);
110 __pContentIconListView->AddIconListViewItemEventListener(*this);
111 __pContentIconListView->SetTouchAnimationEnabled(false);
112 AddControl(__pContentIconListView);
113 __pContentIconListView->SetShowState(true);
116 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
122 AllListSelectionPanel::OnTerminating(void)
124 AppLogDebug("ENTER");
125 result r = E_SUCCESS;
126 __pPresentationModel->RemovePresentationModelListener(*this);
127 if (__pSeletedIndexList != null)
129 delete __pSeletedIndexList;
130 __pSeletedIndexList = null;
132 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
138 AllListSelectionPanel::GetItemCount(void)
140 AppLogDebug("ENTER");
141 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
147 AllListSelectionPanel::CreateItem(int index)
149 AppLogDebug("ENTER : index(%d)", index);
150 IconListViewItem* pIconListviewItem;
151 Bitmap* pBitmap = null;
152 String* pItemText = null;
154 int realIndex = GetRealindexFromVirtualIndex(index);
155 result r = __pPresentationModel->GetThumbnailInSyncCacheN(realIndex, pItemText, pBitmap);
156 if (pBitmap == null || r == E_FAILURE)
158 __pPresentationModel->RequestThumbnail(realIndex);
159 pBitmap = CommonUtil::GetEmptyThumbnailN();
162 if (pItemText == null)
164 pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE"));
166 else if ((*pItemText) != ResourceManager::GetString(L"EMPTY_SPACE"))
169 pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE"));
172 if (__pContentIconListView->IsItemChecked(index) == true)
176 BufferInfo bufferInfo;
177 pBitmap->Lock(bufferInfo, INFINITE);
180 Color dimColor(COLOR_THUMBNAIL_DIM);
181 dimColor.SetAlpha(ALPHA_THUMBNAIL_DIM);
184 canvas.Construct(bufferInfo);
185 canvas.FillRectangle(dimColor, canvas.GetBounds());
187 Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap();
188 pSelectedBitmap->Construct(canvas, canvas.GetBounds());
189 pIconListviewItem = new (std::nothrow) IconListViewItem();
190 pIconListviewItem->Construct(*pBitmap, pItemText, pSelectedBitmap);
191 delete pSelectedBitmap;
195 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
203 pIconListviewItem = new (std::nothrow) IconListViewItem();
204 pIconListviewItem->Construct(*pBitmap, pItemText);
211 if (pItemText != null)
215 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
217 return pIconListviewItem;
221 AllListSelectionPanel::DeleteItem(int index, IconListViewItem* pItem)
223 AppLogDebug("ENTER");
225 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
231 AllListSelectionPanel::OnIconListViewItemStateChanged(IconListView& view, int index, IconListViewItemStatus status)
233 AppLogDebug("ENTER");
234 if (status == ICON_LIST_VIEW_ITEM_CHECKED || status == ICON_LIST_VIEW_ITEM_UNCHECKED)
236 SceneManager* pSceneManager = SceneManager::GetInstance();
237 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
240 strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
241 ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), GetItemCheckedCount());
242 __pFileListEditorForm->SetTitleText(strTmp);
243 __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
247 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
251 AllListSelectionPanel::OnFileInfoChanged(const ContentType contentType)
253 AppLogDebug("ENTER");
254 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
258 AllListSelectionPanel::OnThumbnailDecoded(const int index)
260 AppLogDebug("ENTER : index(%d)", index);
263 int virtualIndex = -1;
264 int loopCount = __pSeletedIndexList->GetCount();
265 for (int i = 0; i < loopCount; ++i)
267 virtualIndex = GetVirtualIndexFromRealIndex(index);
268 if (virtualIndex >= 0)
270 __pContentIconListView->RefreshList(virtualIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
275 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
279 AllListSelectionPanel::OnSceneActivatedN(const SceneId& previousSceneId,
280 const SceneId& currentSceneId, IList* pArgs)
282 AppLogDebug("ENTER");
283 __pPresentationModel = FileListPresentationModel::GetInstance();
285 SceneManager* pSceneManager = SceneManager::GetInstance();
286 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
288 __pFileListEditorForm = dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
289 TryReturnVoid(__pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.", GetErrorMessage(GetLastResult()));
290 __pPresentationModel->AddContentEventListener(__pFileListEditorForm);
292 if (previousSceneId == IDSCN_ALL_LIST_EDITOR)
296 __pSeletedIndexList = pArgs;
299 int loopCount = __pSeletedIndexList->GetCount();
300 for (int i = 0; i < loopCount; ++i)
302 __pContentIconListView->SetItemChecked(i, true);
303 __pContentIconListView->RequestRedraw(true);
308 if (pArgs != null && pArgs->GetCount() > 0)
310 String* pDirectory = static_cast<String*>(pArgs->GetAt(0));
311 if (pDirectory != null && pDirectory->GetLength() > 0)
313 __pFileListEditorForm->MoveToAlbum(*pDirectory);
316 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
320 AllListSelectionPanel::OnSceneDeactivated(const SceneId& currentSceneId,
321 const SceneId& nextSceneId)
323 AppLogDebug("ENTER");
324 __pPresentationModel->RemoveContentEventListener(__pFileListEditorForm);
325 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
329 AllListSelectionPanel::GetItemCheckedCount(void) const
331 AppLogDebug("ENTER");
333 if (__pContentIconListView != null && __pSeletedIndexList != null)
335 int loopCount = __pSeletedIndexList->GetCount();
336 for (int i = 0; i < loopCount; ++i)
338 if (__pContentIconListView->IsItemChecked(i))
344 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
350 AllListSelectionPanel::GetItemCheckedIndexListN(void) const
352 AppLogDebug("ENTER");
353 IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
354 Integer* pIndex = null;
356 if (__pContentIconListView!=null)
359 int loopCount = __pSeletedIndexList->GetCount();
360 for (int i = 0; i < loopCount; ++i)
362 if (__pContentIconListView->IsItemChecked(i))
364 realIndex = GetRealindexFromVirtualIndex(i);
365 pIndex = new (std::nothrow) Integer(realIndex);
370 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
376 AllListSelectionPanel::GetRealindexFromVirtualIndex(const int virtualIndex) const
378 if (__pSeletedIndexList == null || __pSeletedIndexList->GetCount() == 0)
380 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
385 Integer* pRealIndex = static_cast<Integer*>(__pSeletedIndexList->GetAt(virtualIndex));
387 if (pRealIndex != null)
389 realIndex = pRealIndex->ToInt();
391 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
397 AllListSelectionPanel::GetVirtualIndexFromRealIndex(const int realIndex) const
399 int returnValue = -1;
400 int loopCount = __pSeletedIndexList->GetCount();
401 for (int i = 0; i < loopCount; ++i)
403 Integer* pRealIndex = static_cast<Integer*>(__pSeletedIndexList->GetAt(i));
405 if (pRealIndex != null)
407 index = pRealIndex->ToInt();
410 if (index == realIndex)
416 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
422 AllListSelectionPanel::OnRequestDelete(void)
424 AppLogDebug("ENTER");
425 IList* pIndexList = GetItemCheckedIndexListN();
426 if (pIndexList->GetCount() <= 0)
428 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
433 delete __pFileUpdateTimer;
434 __pFileUpdateTimer = new (std::nothrow) FileUpdateTimer(pIndexList, __pPresentationModel, this, FILE_ACTION_DELETE);
435 result r = __pFileUpdateTimer->StartTimer();
439 delete __pFileUpdateTimer;
440 __pFileUpdateTimer = null;
445 __pPresentationModel->SetUpdateProgressStatus(true);
451 void AllListSelectionPanel::OnFileOpInvalidate(enum FileActionMode actionId)
453 __pFileListEditorForm->Invalidate(true);
456 void AllListSelectionPanel::OnFileOpComplete(enum FileActionMode actionId, enum FileActionCompleteRes res)
458 __pPresentationModel->SetUpdateProgressStatus(false);
459 SceneManager* pSceneManager = SceneManager::GetInstance();
460 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.",
461 GetErrorMessage(GetLastResult()));
464 String selectString = ResourceManager::GetString(L"IDS_COM_BODY_SELECTED");
465 strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", selectString.GetPointer(), 0);
466 __pFileListEditorForm->SetTitleText(strTmp);
468 __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL);
469 __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
470 __pContentIconListView->UpdateList();
472 if (GetItemCount() > 0)
474 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST));
478 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
480 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
484 AllListSelectionPanel::OnRequestMessage(void)
486 AppLogDebug("ENTER");
487 result r = E_SUCCESS;
488 IList* pIndexList = GetItemCheckedIndexListN();
489 if (pIndexList == null || pIndexList->GetCount() <= 0)
491 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
496 Integer* pIndex = null;
498 ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
499 pArrayList->Construct();
500 int loopCount = pIndexList->GetCount();
502 for (int i = 0; i < loopCount; ++i)
504 pIndex = static_cast<Integer*>(pIndexList->GetAt(i));
507 checkedIndex = pIndex->ToInt();
508 pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(checkedIndex)));
512 HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
513 pDataList->Construct();
514 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_MESSAGE_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
515 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
517 r = __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE, null,
518 null, pDataList, null);
519 if (r == E_MAX_EXCEEDED)
521 MessageBox messageBox;
522 messageBox.Construct(L"", ResourceManager::GetString(L"IDS_RCS_BODY_MAXIMUM_NUMBER_OF_FILES_EXCEEDED"),
523 MSGBOX_STYLE_NONE, 3000);
525 messageBox.ShowAndWait(modalResult);
528 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
534 AllListSelectionPanel::OnRequestEmail(void)
536 AppLogDebug("ENTER");
537 result r = E_SUCCESS;
539 IList* pIndexList = GetItemCheckedIndexListN();
540 if (pIndexList == null || pIndexList->GetCount() <= 0)
542 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
547 Integer* pIndex = null;
549 ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
550 pArrayList->Construct();
551 int loopCount = pIndexList->GetCount();
553 for (int i = 0; i < loopCount; ++i)
555 pIndex = static_cast<Integer*>(pIndexList->GetAt(i));
558 checkedIndex = pIndex->ToInt();
559 pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(checkedIndex)));
563 HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
564 pDataList->Construct();
565 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
567 r = __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE,
568 new (std::nothrow) String(APPCONTROL_URI_MAIL_TO), null, pDataList, null);
570 if (r == E_MAX_EXCEEDED)
572 MessageBox messageBox;
573 messageBox.Construct(L"", ResourceManager::GetString(L"IDS_RCS_BODY_MAXIMUM_NUMBER_OF_FILES_EXCEEDED"),
574 MSGBOX_STYLE_NONE, 3000);
576 messageBox.ShowAndWait(modalResult);
579 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
585 AllListSelectionPanel::OnRequestSlideShow(void)
587 AppLogDebug("ENTER");
588 result r = E_SUCCESS;
589 IList* pIndexList = GetItemCheckedIndexListN();
590 if (pIndexList == null)
592 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
596 Integer* pRealIndex = null;
598 ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
599 pArrayList->Construct();
600 int loopCount = pIndexList->GetCount();
602 for (int i = 0; i < loopCount; ++i)
604 pRealIndex = static_cast<Integer*>(pIndexList->GetAt(i));
605 if (pRealIndex != null)
607 realIndex = pRealIndex->ToInt();
608 pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(realIndex)));
612 HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
613 pDataList->Construct();
614 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
615 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
617 r = __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, null,
618 new (std::nothrow) String(APPCONTROL_MIME_IMAGE_ALL), pDataList, null);
620 if (r == E_MAX_EXCEEDED)
622 MessageBox messageBox;
623 messageBox.Construct(L"", ResourceManager::GetString(L"IDS_RCS_BODY_MAXIMUM_NUMBER_OF_FILES_EXCEEDED"),
624 MSGBOX_STYLE_NONE, 3000);
626 messageBox.ShowAndWait(modalResult);
629 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
635 AllListSelectionPanel::ResetSelection(void)
637 AppLogDebug("ENTER");
638 __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL);
639 if (__pSeletedIndexList == null)
645 __itemCount = __pSeletedIndexList->GetCount();
648 SceneManager* pSceneManager = SceneManager::GetInstance();
649 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
652 String bodyText = ResourceManager::GetString(L"IDS_COM_BODY_SELECTED");
653 strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", bodyText.GetPointer(), __itemCount);
654 __pFileListEditorForm->SetTitleText(strTmp);
657 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
661 AllListSelectionPanel::SetButtonState(void)
663 AppLogDebug("ENTER");
664 SceneManager* pSceneManager = SceneManager::GetInstance();
665 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
667 if (GetItemCheckedCount() > 0)
669 AppLogDebug("BUTTONSTATE : Request Enable");
670 __pFileListEditorForm->SetFooterButtonsState(true);
674 AppLogDebug("BUTTONSTATE : Request disable");
675 __pFileListEditorForm->SetFooterButtonsState(false);
677 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
681 AllListSelectionPanel::OnSelectAllPressed(void)
683 bool needToSelectAll = true;
684 int checkedCount = GetItemCheckedCount();
685 if (checkedCount == __itemCount)
687 needToSelectAll = false;
690 if (needToSelectAll == true)
692 for (int i = 0; i < __itemCount; ++i)
694 if (__pContentIconListView->IsItemChecked(i) == false)
696 __pContentIconListView->SetItemChecked(i, true);
697 __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
703 for (int i = 0; i < __itemCount; ++i)
705 if (__pContentIconListView->IsItemChecked(i) == true)
707 __pContentIconListView->SetItemChecked(i, false);
708 __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
713 SceneManager* pSceneManager = SceneManager::GetInstance();
714 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
717 if (needToSelectAll == true)
719 tempString.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
720 ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), __itemCount);
724 tempString.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
725 ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0);
727 __pFileListEditorForm->SetTitleText(tempString);
733 AllListSelectionPanel::OnRotateRequested(RotateMode rotateMode)
735 AppLogDebug("ENTER");
736 IList* pIndexList = GetItemCheckedIndexListN();
737 if (pIndexList == null)
739 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
742 else if (pIndexList->GetCount() <= 0)
745 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
750 delete __pFileUpdateTimer;
751 __pFileUpdateTimer = new (std::nothrow) FileUpdateTimer(pIndexList, __pPresentationModel, this, FILE_ACTION_ROTATE, rotateMode);
752 result r = __pFileUpdateTimer->StartTimer();
756 delete __pFileUpdateTimer;
757 __pFileUpdateTimer = null;
762 __pPresentationModel->SetUpdateProgressStatus(true);
767 void AllListSelectionPanel::CancelUpdateProgress(void)
769 if( __pFileUpdateTimer!= null && __pFileUpdateTimer->IsStarted())
771 __pFileUpdateTimer->Cancel();
772 delete __pFileUpdateTimer;
773 __pFileUpdateTimer = null;