2 #include "MfCategorySearch.h"
3 #include "MfBasePresentationModel.h"
4 #include "MfMyFilesApp.h"
7 using namespace Tizen::Base;
8 using namespace Tizen::Base::Collection;
9 using namespace Tizen::App;
10 using namespace Tizen::Graphics;
11 using namespace Tizen::Io;
12 using namespace Tizen::Ui;
13 using namespace Tizen::Ui::Controls;
14 using namespace Tizen::Ui::Scenes;
15 using namespace Tizen::System;
16 using namespace Tizen::Base::Utility;
18 CategorySearch::CategorySearch(void)
23 __currentFileType = FILE_TYPE_OTHER_TYPE;
27 CategorySearch::~CategorySearch(void)
29 DeviceManager::RemoveDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this);
31 if (__pHomeButton != null)
36 if (__pUpButton != null)
43 CategorySearch::Initialize(void)
45 Form::Construct(L"IDL_CATEGORY_SEARCH");
50 CategorySearch::OnInitializing(void)
53 CreateItemSource createitemsource = CREATE_ITEM_SOURCE_CATEGORY_SEARCH_FORM;
54 int sourceForm = THUMBNAIL_PROVIDER_SOURCEID_CATEGORY_SEARCH_FORM;
57 String rootParentPath;
60 String extensionVisibility;
61 String currentDirectoryPath = BasePresentationModel::GetMediaPath();
63 Bitmap* pBitmapHomeButton = null;
64 Bitmap* pBitmapUpButton = null;
65 Bitmap* pBitmapHomeButtonPress = null;
66 Bitmap* pBitmapUpButtonPress = null;
67 AppResource* pAppResource = null;
69 if (_pFolderEntryPM == null)
71 _pFolderEntryPM = new (std::nothrow) FolderEntryPresentationModel();
72 AppAssert(_pFolderEntryPM != null);
73 r = _pFolderEntryPM->Construct();
74 AppAssert(r==E_SUCCESS);
75 _pFolderEntryPM->SetSourceForm(createitemsource);
78 _pBaseItemProvider = new (std::nothrow) BaseItemProvider();
79 TryCatch(_pBaseItemProvider != null, , "Failed to allocate base itemprovider");
80 _pBaseItemProvider->Construct();
81 _pBaseItemProvider->SetSourceForm(createitemsource);
82 _pBaseItemProvider->SetFolderEntryProvider(this);
83 _pBaseItemProvider->SetFooterItemStateChangeListener(this);
85 _pListView = static_cast<ListView *>(GetControl(L"IDC_LISTVIEW_CATEGORY_SEARCH"));
86 TryCatch(_pListView != null, , "__pListView is Null");
87 _pListView->AddListViewItemEventListener(*this);
88 _pListView->SetItemProvider(*this);
89 _pListView->SetItemProvider(*_pBaseItemProvider);
91 ((MyFilesApp*) Application::GetInstance())->SetCurrentView(this);
93 pAppResource = UiApp::App::GetInstance()->GetAppResource();
94 TryCatch(pAppResource != null, , "Resource manager not found!");
96 pAppResource->GetString(L"IDS_MF_BUTTON_HOME", buttonHome);
97 pAppResource->GetString(L"IDS_MF_TAB_UP", buttonUp);
98 pAppResource->GetString(L"IDS_MF_OPT_SHOW_FILE_EXTENSION", _showExtension);
99 pAppResource->GetString(L"IDS_MF_OPT_HIDE_FILE_EXTENSION_ABB", _hideExtension);
100 pBitmapHomeButton = pAppResource->GetBitmapN(IDB_HOME_BUTTON_ICON, BITMAP_PIXEL_FORMAT_ARGB8888);
101 pBitmapUpButton = pAppResource->GetBitmapN(IDB_UP_BUTTON_ICON, BITMAP_PIXEL_FORMAT_ARGB8888);
102 pBitmapHomeButtonPress = pAppResource->GetBitmapN(IDB_HOME_BUTTON_ICON_PRESS, BITMAP_PIXEL_FORMAT_ARGB8888);
103 pBitmapUpButtonPress = pAppResource->GetBitmapN(IDB_UP_BUTTON_ICON_PRESS, BITMAP_PIXEL_FORMAT_ARGB8888);
104 extensionVisibility = fileExtenstionKeyName;
106 __pHeader = GetHeader();
107 _extensionKeyName.Append(extensionVisibility);
109 createitemsource = CREATE_ITEM_SOURCE_CATEGORY_SEARCH_FORM;
111 //Initialize the itemprovider class for the listview inside the popup
112 if (_pCustomListViewForPopup == null)
114 _pCustomListViewForPopup = new (std::nothrow) CustomListViewForPopup();
116 TryCatch(_pCustomListViewForPopup != null, , "MfMyFilesApp::ListView For Popup not created!");
118 _pCustomListViewForPopup->SetEventListener(this);
121 if (_pThumbnailItemProvider == null)
123 _pThumbnailItemProvider = new (std::nothrow) ThumbnailItemProviderAndListener(currentDirectoryPath, sourceForm);
124 _pThumbnailItemProvider->SetFolderEntryProvider(this);
126 TryCatch(_pThumbnailItemProvider != null, , "Failed to allocate Memory to __pSubFolderThumbnailsProvider");
128 _pThumbnailItemProvider->SetFooterItemStateChangeListener(this);
130 _pIconListView = static_cast< IconListView* >(GetControl("IDC_ICONLISTVIEW_CATEGORY_SEARCH"));
131 TryCatch(_pIconListView != null, , "__pIconListviewSubThumbnails is Null");
132 _pIconListView->SetItemProvider(*_pThumbnailItemProvider);
133 _pIconListView->AddIconListViewItemEventListener(*this);
134 _pIconListView->AddTouchEventListener(*this);
135 _pIconListView->SetShowState(false);
137 _pLongPressGestureDetector = new (std::nothrow) TouchLongPressGestureDetector();
138 _pLongPressGestureDetector->Construct();
140 delete pBitmapHomeButton;
141 delete pBitmapUpButton;
142 delete pBitmapHomeButtonPress;
143 delete pBitmapUpButtonPress;
145 CreateFooterControls();
146 //Set FormBackEvent Listener
147 SetFormBackEventListener(this);
148 _pFileManager = FolderEntryEditorPresentationModel::GetInstance();
150 AppLogDebug("EXIT: r = %s", GetErrorMessage(r));
154 AppLogDebug("caught exception");
155 if (__pHomeButton != null)
157 delete __pHomeButton;
158 __pHomeButton = null;
161 if (__pUpButton != null)
167 if (_pCustomListViewForPopup != null)
169 delete _pCustomListViewForPopup;
170 _pCustomListViewForPopup = null;
173 if (pBitmapHomeButton != null)
175 delete pBitmapHomeButton;
176 pBitmapHomeButton = null;
179 if (pBitmapUpButton != null)
181 delete pBitmapUpButton;
182 pBitmapUpButton = null;
184 if (pBitmapHomeButtonPress != null)
186 delete pBitmapHomeButtonPress;
187 pBitmapHomeButtonPress = null;
189 if (pBitmapUpButtonPress != null)
191 delete pBitmapUpButtonPress;
192 pBitmapUpButtonPress = null;
198 CategorySearch::OnTerminating(void)
200 result r = E_SUCCESS;
201 //((MfMyFilesApp*)Application::GetInstance())->SetCurrentView(null);
203 _pFooter = GetFooter();
204 if (_pFooter != null)
206 _pFooter->RemoveAllButtons();
207 _pFooter->RemoveAllItems();
210 __pHeader = GetHeader();
211 if (__pHeader != null)
213 __pHeader->RemoveAllButtons();
214 __pHeader->RemoveAllItems();
223 CategorySearch::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status)
225 AppLogDebug("Entry");
227 DirectoryEntry* pCheckedEntry = null;
231 result r = E_SUCCESS;
232 MemoryType currentMemoryType = MEMORY_TYPE_PHONE;
233 ArrayList* pArgs = null;
234 SceneManager* pSceneManager = null;
235 AppResource* pAppResource = null;
236 CustomAppControl* pCustomAppControl = CustomAppControl::GetInstance();
237 pAppResource = UiApp::GetInstance()->GetAppResource();
238 pSceneManager = SceneManager::GetInstance();
239 if (pAppResource != null)
241 pAppResource->GetString(L"IDS_COM_BODY_SELECTED", selected);
243 pCheckedEntry = static_cast< DirectoryEntry* >(_pFilenames->GetAt(index));
245 if (pCheckedEntry == null)
250 _indexTracker = index;
251 // if (elementId == CONTENT_LIST_ITEM_TYPE_RENAME || elementId == DETAILED_LIST_ELEMENTS_RENAME)
252 if (status == LIST_ITEM_STATUS_MORE/* || elementId == DETAILED_LIST_ELEMENTS_RENAME*/)
256 pArgs = new (std::nothrow) ArrayList();
260 fullPath = pCheckedEntry->GetFullFilePath();
261 GetParentFolderPath(&fullPath);
262 FolderNavigationPresentationModel::SetCurrentFilePath(fullPath);
264 if (fullPath.StartsWith(BasePresentationModel::GetMediaPath(),0))
266 currentMemoryType = MEMORY_TYPE_PHONE;
267 FolderNavigationPresentationModel::SetStorageType(currentMemoryType);
269 else if(fullPath.StartsWith(BasePresentationModel::GetSdCardPath(),0))
271 currentMemoryType = MEMORY_TYPE_SD_CARD;
272 FolderNavigationPresentationModel::SetStorageType(currentMemoryType);
275 GetFileName(&fullPath);
276 pArgs->Add(fullPath);
277 r = pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SUB_DIRECTORY_FORM, SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), pArgs);
281 if (_pFileEventManager != null)
283 _pFileEventManager->RemovePath(_pathOfSelectedFile);
284 delete _pFileEventManager;
285 _pFileEventManager = null;
287 _pathOfSelectedFile = pCheckedEntry->GetFullFilePath();
288 AppLogDebug("Selected File path : %S", _pathOfSelectedFile.GetPointer());
290 _pFileEventManager = new (std::nothrow)FileEventManager();
291 _pFileEventManager->Construct(*this);
293 String FileName = pCheckedEntry->GetFileName() + "." + pCheckedEntry->GetFileExtension();
294 String parentDirectoryOfSelectedFile = L"";
295 _pathOfSelectedFile.SubString(0, _pathOfSelectedFile.GetLength() - FileName.GetLength() , parentDirectoryOfSelectedFile);
297 _pFileEventManager->AddPath(parentDirectoryOfSelectedFile, FILE_EVENT_TYPE_CREATE | FILE_EVENT_TYPE_DELETE | FILE_EVENT_TYPE_MOVED_TO | FILE_EVENT_TYPE_MOVED_FROM);
299 if (pCustomAppControl != null)
302 pCustomAppControl->SetAppControlListener(null);
303 AppControl* pAppControlInUse = pCustomAppControl->LaunchAppControl(_pathOfSelectedFile);
304 if (pAppControlInUse != null)
305 CustomAppControl::SetAppControlInUse(pAppControlInUse);
309 // ISceneEventListener
311 CategorySearch::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
314 AppLogDebug("Enter");
317 String* headerTitleText;
318 AppRegistry* pAppRegistry = null;
319 String viewStyleKeyName(L"ListDisplayType");
320 int listViewDisplayType = VIEW_TYPE_AS_NORMAL_LIST;
322 pAppRegistry = UiApp::App::GetInstance()->GetAppRegistry();
324 pAppRegistry->Get(viewStyleKeyName, listViewDisplayType);
325 _flagViewAsStatus = listViewDisplayType;
327 SceneManager::GetInstance()->AddSceneManagerEventListener(*this);
329 SetCurrentDirectoryFlag(false);
333 fileType = static_cast< Integer* >(pArgs->GetAt(0));
334 currentType = fileType->ToInt();
335 headerTitleText = static_cast< String* >(pArgs->GetAt(1));
336 if (headerTitleText != null)
338 __currentHeaderText = *headerTitleText;
339 __pHeader->SetTitleText(__currentHeaderText);
344 case FILE_TYPE_IMAGE_TYPE:
346 AppLogDebug("File type is image");
347 __currentFileType = FILE_TYPE_IMAGE_TYPE;
351 case FILE_TYPE_VIDEO_TYPE:
353 __currentFileType = FILE_TYPE_VIDEO_TYPE;
357 case FILE_TYPE_AUDIO_TYPE:
359 __currentFileType = FILE_TYPE_AUDIO_TYPE;
363 case FILE_TYPE_DOCUMENT_TYPE:
365 __currentFileType = FILE_TYPE_DOCUMENT_TYPE;
369 case FILE_TYPE_OTHER_TYPE:
371 __currentFileType = FILE_TYPE_OTHER_TYPE;
380 if (_pFileManager != null)
382 _pFileManager->SetFileManagingListener(this);
387 pArgs->RemoveAll(true);
392 DeviceManager::AddDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this);
394 DeviceManager::AddDeviceEventListener(DEVICE_TYPE_USB_CLIENT, *this);
400 CategorySearch::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
402 if(_pFileEventManager != null)
403 _pFileEventManager->RemovePath(_pathOfSelectedFile);
405 DeviceManager::RemoveAllDeviceEventListeners();
407 if (_pIconListView != null)
409 _pIconListView->RemoveGestureDetector(*_pLongPressGestureDetector);
415 CategorySearch::OnSceneTransitionCompleted (const Tizen::Ui::Scenes::SceneId &previousSceneId, const Tizen::Ui::Scenes::SceneId ¤tSceneId)
417 AppLogDebug("Enter");
418 String mediaPath = BasePresentationModel::GetMediaPath();
419 SceneManager::GetInstance()->RemoveSceneManagerEventListener(*this);
420 CreateItemSource sourceForm = CREATE_ITEM_SOURCE_CATEGORY_SEARCH_FORM;
421 ((MyFilesApp*) Application::GetInstance())->SetCurrentView(this);
423 if (_pFolderEntryPM != null)
425 _pFolderEntryPM->SetFolderEntryType(__currentFileType);
426 _pFolderEntryPM->SetSourceForm(sourceForm);
427 _pFolderEntryPM->CreateStack();
428 _pFolderEntryPM->CreateTraversalTree();
429 _pFolderEntryPM->SortFolderEntries();
430 _pFilenames = _pFolderEntryPM->GetFolderEntryList();
435 if (_pFilenames != null)
437 if (_pFilenames->GetCount() == 0)
439 _bIsDirectoryEmpty = true;
441 SetFooterItemsVisibility(DISABLE_FOOTER_ITEM);
445 _bIsDirectoryEmpty = false;
447 SetFooterItemsVisibility(ENABLE_FOOTER_ITEM);
449 if (_pIconListView != null && _pIconListView->IsVisible())
451 _pIconListView->AddGestureDetector(*_pLongPressGestureDetector);
456 if (_pFolderEntryPM != null)
458 _pFolderEntryPM->InitThumbnailManager();
464 CategorySearch::OnSceneTransitionStarted (const Tizen::Ui::Scenes::SceneId ¤tSceneId, const Tizen::Ui::Scenes::SceneId &nextSceneId)
466 //Empty Implementation
470 CategorySearch::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
472 SceneManager* pSceneManager = SceneManager::GetInstance();
473 result r = E_SUCCESS;
474 r = pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_TOP_LEVEL_DIRECTORY_FORM, SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
478 CategorySearch::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
480 AppLogDebug("ENTER");
482 result r = E_SUCCESS;
487 case IDA_CONTEXT_MENU_HIDE_EXTENSION:
489 //__currentDirectoryPath.Clear();
490 //__currentDirectoryPath = FolderNavigationPresentationModel::GetCurrentPath();
496 case IDA_CONTEXT_MENU_SHOW_EXTENSION:
498 //__currentDirectoryPath.Clear();
499 //__currentDirectoryPath = FolderNavigationPresentationModel::GetCurrentPath();
507 SubBaseOnActionPerformed(source, actionId);
511 AppLogDebug("EXIT: r = %s", GetErrorMessage(r));
514 CategorySearch::GetParentFolderPath(Tizen::Base::String* filePath)
519 StringTokenizer tokenizer(*filePath, delim);
521 while (tokenizer.HasMoreTokens())
523 if (tokenizer.GetTokenCount() != 1)
525 filePath->Append(L"/");
526 tokenizer.GetNextToken(token);
527 filePath->Append(token);
534 filePath->Append(L"/");
537 CategorySearch::GetFileName(Tizen::Base::String* fileName)
542 if (fileName->StartsWith(BasePresentationModel::GetMediaPath(),0))
544 fileName->Replace(BasePresentationModel::GetMediaPath(),"Phone/",0);
546 else if(fileName->StartsWith(BasePresentationModel::GetSdCardPath(),0))
548 fileName->Replace(BasePresentationModel::GetSdCardPath(),"Memory Card/",0);
550 StringTokenizer tokenizer(*fileName, delim);
552 while (tokenizer.HasMoreTokens())
554 if (tokenizer.GetTokenCount() != 1)
556 tokenizer.GetNextToken(token);
560 tokenizer.GetNextToken(token);
561 fileName->Append(token);
567 CategorySearch::OnFileEventOccured(const unsigned long events,const Tizen::Base::String & path, const unsigned int eventId)
569 AppLogDebug("TopMostFolderFileListForm::OnFileEventOccured:%S", path.GetPointer());
573 HashMap* pCacheList = null;
574 DirectoryEntry* pCurrentEntry = null;
575 bool cacheKeyStatus = false;
578 AppLogDebug("ContentManager::ScanFile:%S", path.GetPointer());
580 if ((events & FILE_EVENT_TYPE_CREATE) || (events & FILE_EVENT_TYPE_DELETE) || (events & FILE_EVENT_TYPE_MOVED_FROM) || (events & FILE_EVENT_TYPE_MOVED_TO ))
582 _bBackFromAppControl = true;
583 if ( (events & FILE_EVENT_TYPE_DELETE) || (events & FILE_EVENT_TYPE_MOVED_FROM))
585 AppLogDebug("Items to delete: %d", _indexTracker);
586 pCacheList = CacheManager::GetInstance()->GetCacheHashMap();
587 if (pCacheList != null)
589 pCurrentEntry = static_cast<DirectoryEntry*>(_pFilenames->GetAt(_indexTracker));
591 if (pCurrentEntry != null)
593 cachePath = pCurrentEntry->GetFullFilePath();
595 cacheKeyStatus = pCacheList->ContainsKey(cachePath);
598 CacheManager::GetInstance()->RemoveCacheEntry(cachePath);
602 if (_pFolderEntryPM!=null)
604 _pFolderEntryPM->RefreshFolderEntries();
611 CategorySearch::OnNotificationReceived(Tizen::Base::Collection::ArrayList* pArgs)
613 AppLogDebug("Enter");
614 HashMap* pCacheList = null;
615 DirectoryEntry* pCurrentEntry = null;
616 bool cacheKeyStatus = false;
618 Integer* pFileProcessingResult = null;
619 TryCatch(pArgs != null, , "Argument list received is invalid!");
620 pFileProcessingResult = (Integer*) pArgs->GetAt(0);
622 TryCatch(pFileProcessingResult != null, , "FileProcessing Result list is invalid!");
624 switch (pFileProcessingResult->ToInt())
626 case FILE_MANAGING_RESULT_DELETING_SUCCESS:
628 if (_pFilenames != null)
630 pCacheList = CacheManager::GetInstance()->GetCacheHashMap();
632 if (pCacheList != null)
634 pCurrentEntry = static_cast<DirectoryEntry*>(_pFilenames->GetAt(_indexTracker));
636 if (pCurrentEntry != null)
638 cachePath = pCurrentEntry->GetFullFilePath();
641 cacheKeyStatus = pCacheList->ContainsKey(cachePath);
645 CacheManager::GetInstance()->RemoveCacheEntry(cachePath);
648 _pFilenames->RemoveAt(_indexTracker, true);
649 //r = __pListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_REMOVE);
650 if (_pListView != null)
652 //_pListView->UpdateList();
653 _pListView->RefreshList(_indexTracker, LIST_REFRESH_TYPE_ITEM_REMOVE);
655 if (_pIconListView != null && _pIconListView->IsVisible())
657 _pIconListView->RefreshList(_indexTracker, LIST_REFRESH_TYPE_ITEM_REMOVE);
660 HideFileProgressingPopup();
664 case FILE_MANAGING_RESULT_DELETING_FAILED:
666 HideFileProgressingPopup();
669 case FILE_MANAGING_RESULT_THREAD_STOP:
671 HideFileProgressingPopup();
681 if (_pFilenames->GetCount() == 0)
683 SetFooterItemsVisibility(DISABLE_FOOTER_ITEM);
689 pArgs->RemoveAll(true);
696 CategorySearch::SetFooterItemsVisibility(int mode)
698 AppLogDebug("ENTRY mode = %d",mode);
699 _pFooter = GetFooter();
703 _pFooter->SetItemEnabled(0, false);
704 _pFooter->SetItemEnabled(1, false);
705 _pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, false);
709 _pFooter->SetItemEnabled(0, true);
710 _pFooter->SetItemEnabled(1, true);
711 _pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, true);
713 _pFooter->Invalidate(true);
716 CategorySearch::OnIconListViewOverlayBitmapSelected (Tizen::Ui::Controls::IconListView &iconListView, int index, int overlayBitmapId)
718 result r = E_SUCCESS;
720 ArrayList* pArgs = null;
723 DirectoryEntry* pCheckedEntry = null;
725 SceneManager* pSceneManager = null;
727 MemoryType currentMemoryType = MEMORY_TYPE_PHONE;
729 pSceneManager = SceneManager::GetInstance();
731 pCheckedEntry = static_cast< DirectoryEntry* >(_pFilenames->GetAt(index));
732 if (pCheckedEntry == null)
739 pArgs = new (std::nothrow) ArrayList();
743 fullPath = pCheckedEntry->GetFullFilePath();
744 GetParentFolderPath(&fullPath);
745 FolderNavigationPresentationModel::SetCurrentFilePath(fullPath);
747 if (fullPath.StartsWith(BasePresentationModel::GetMediaPath(),0))
749 currentMemoryType = MEMORY_TYPE_PHONE;
750 FolderNavigationPresentationModel::SetStorageType(currentMemoryType);
752 else if(fullPath.StartsWith(BasePresentationModel::GetSdCardPath(),0))
754 currentMemoryType = MEMORY_TYPE_SD_CARD;
755 FolderNavigationPresentationModel::SetStorageType(currentMemoryType);
758 GetFileName(&fullPath);
759 pArgs->Add(fullPath);
760 r = pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SUB_DIRECTORY_FORM, SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), pArgs);
766 CategorySearch::OnIconListViewItemStateChanged(Tizen::Ui::Controls::IconListView& iconListView, int index, Tizen::Ui::Controls::IconListViewItemStatus status)
768 AppLogDebug("ENTER");
769 //If the source of the event is from the RootForm's IconListView, Changes the Scene to the SubFolderFileListForm. Else just refreshes the source IconListView.
771 DirectoryEntry* pDirStr = null;
772 CustomAppControl* pCustomAppControl = null;
774 //Get the directory structure at this index from the filenames arraylist
775 if (_pFilenames != null)
777 pDirStr = static_cast< DirectoryEntry* >(_pFilenames->GetAt(index));
780 //Get the filename of the specified index if pDirStr not null.
783 _pathOfSelectedFile = pDirStr->GetFullFilePath();
785 pCustomAppControl = CustomAppControl::GetInstance();
787 if (pCustomAppControl != null)
791 pCustomAppControl->SetAppControlListener(null);
793 AppControl* pAppControlInUse = pCustomAppControl->LaunchAppControl(_pathOfSelectedFile);
794 if (pAppControlInUse != null)
795 CustomAppControl::SetAppControlInUse(pAppControlInUse);
799 AppLogDebug("EXIT: r = %s", GetErrorMessage(GetLastResult()));
804 CategorySearch::OnDeviceStateChanged(Tizen::System::DeviceType deviceType, const Tizen::Base::String& state)
807 ComponentType currentDeviceType;
812 currentDeviceType = COMPONENT_TYPE_STORAGE_CARD;
818 currentDeviceType = COMPONENT_TYPE_USB;
828 OnDeviceChange(currentDeviceType, state);
832 CategorySearch::OnDeviceChange(ComponentType deviceType, const Tizen::Base::String& state)
834 if (_pFolderEntryPM != null)
836 _pFolderEntryPM->CreateTraversalTree();
837 _pFilenames = _pFolderEntryPM->GetFolderEntryList();
840 if (_pFilenames != null)
842 if (_pFilenames->GetCount() == 0)
844 SetFooterItemsVisibility(DISABLE_FOOTER_ITEM);
848 SetFooterItemsVisibility(ENABLE_FOOTER_ITEM);
852 if (_pListView != null && _pListView->IsVisible())
854 _pListView->UpdateList();
855 _pListView->Invalidate(true);
858 if (_pFolderEntryPM != null)
860 _pFolderEntryPM->InitThumbnailManager();
864 CategorySearch::OnAppControlCompleted(void)
866 SubBaseFolderEntryForm::OnAppControlCompleted();