void
CategorySearch::OnAppControlCompleted(void)
{
+ if (_pFilenames != null)
+ {
+ if (_pFilenames->GetCount() == 0)
+ {
+ SetFooterItemsVisibility(DISABLE_FOOTER_ITEM);
+ }
+ else
+ {
+ SetFooterItemsVisibility(ENABLE_FOOTER_ITEM);
+ }
+ }
SubBaseFolderEntryForm::OnAppControlCompleted();
}
messageBox.ShowAndWait(modalResult);
- switch (modalResult)
- {
- case MSGBOX_RESULT_YES:
- {
- if (__pEditFieldFolderName != null)
- {
- __pEditFieldFolderName->ShowKeypad();
- }
- }
- break;
-
- case MSGBOX_RESULT_NO:
+ if (__pEditFieldFolderName != null)
{
- TransitionScene();
- }
- break;
-
- default:
- break;
+ __pEditFieldFolderName->ShowKeypad();
}
}
}
messageBox.ShowAndWait(modalResult);
- switch (modalResult)
- {
- case MSGBOX_RESULT_YES:
+ if (__pEditFieldFolderName != null)
{
__pEditFieldFolderName->ShowKeypad();
}
- break;
-
- case MSGBOX_RESULT_NO:
- {
- TransitionScene();
- }
- break;
-
- default:
- {
- //Empty Implementation.
- }
- break;
- }
}
}
}
if (__threadRunningState != THREAD_RUNNING_STATE_ALIVE)
{
File::Remove(destPath);
- return E_SUCCESS;
+ return E_THREAD_CANCEL;
}
if (!IsFailed(GetLastResult()))
{
- r = destFile.Write(byteToWrite, count);
- TryCatch(r == E_SUCCESS,,"copy file failed");
- //if(!__isRenamingActive)
- //{
- percentage = percentage + count;
- percentageComplete = (percentage * 100) / (toatalsize);
-
- AppLogDebug("precentage result %lld %lld",percentageComplete,percentage);
+ r = destFile.Write(byteToWrite, count);
+ TryCatch(r == E_SUCCESS,,"copy file failed");
+
+ percentage = percentage + count;
+ percentageComplete = (percentage * 100) / (toatalsize);
+
+ AppLogDebug("precentage result %lld %lld",percentageComplete,percentage);
+
+ __fileManagingingResult = FILE_MANAGING_RESULT_CURRENT_STATUS;
+ pArg = new (std::nothrow) ArrayList();
+ pArg->Construct();
+ pFileManagingResult = new (std::nothrow) Integer(__fileManagingingResult);
+ pFileManagedCounter = new (std::nothrow) Integer(__fileManagedCounter);
+ pTotalFileCount = new (std::nothrow) Integer(__pListOfFiles->GetCount());
+ pPercentageCompletion = new (std::nothrow)Integer(percentageComplete);
+ pArg->Add(pFileManagingResult);
+ pArg->Add(pFileManagedCounter);
+ pArg->Add(pTotalFileCount);
+ pArg->Add(pPercentageCompletion);
+ Application::GetInstance()->SendUserEvent(ID_COPY_COMPLETE, pArg);
- __fileManagingingResult = FILE_MANAGING_RESULT_CURRENT_STATUS;
- pArg = new (std::nothrow) ArrayList();
- pArg->Construct();
- pFileManagingResult = new (std::nothrow) Integer(__fileManagingingResult);
- pFileManagedCounter = new (std::nothrow) Integer(__fileManagedCounter);
- pTotalFileCount = new (std::nothrow) Integer(__pListOfFiles->GetCount());
- pPercentageCompletion = new (std::nothrow)Integer(percentageComplete);
- pArg->Add(pFileManagingResult);
- pArg->Add(pFileManagedCounter);
- pArg->Add(pTotalFileCount);
- pArg->Add(pPercentageCompletion);
- Application::GetInstance()->SendUserEvent(ID_COPY_COMPLETE, pArg);
- //}
count = sourceFIle.Read(byteToWrite, BUFFER_SIZE_MAX);
}
}
__pSearchBar->SetEnabled(false);
__pSearchBar->SetMode(__searchBarMode);
- //Show Popup
- __pFolderLabel->SetText(folderToSearch);
- __pSearchPopup->SetShowState(true);
- __pSearchPopup->Show();
+ //Show Popup if Application is in FOREGROUND
+ if ( Application::GetInstance()->GetAppUiState() == APP_UI_STATE_FOREGROUND)
+ {
+ __pFolderLabel->SetText(folderToSearch);
+ __pSearchPopup->SetShowState(true);
+ __pSearchPopup->Show();
+ }
///Set Application Notification Listener to current form
((MyFilesApp*) Application::GetInstance())->SetNotifyListener(this);
// _pFolderEntryPM->GetFolderEntryCount(FolderNavigationPresentationModel::GetCurrentPath(),folderCount, fileCount);
// SetFooterVisibility(ENABLE_FOOTER_ITEM);
- SetFooterVisibility();
+
+ if (_pFolderEntryPM!=null)
+ {
+ if (_pFolderEntryPM->GetSourceForm() != CREATE_ITEM_SOURCE_CATEGORY_SEARCH_FORM)
+ {
+ SetFooterVisibility();
+ }
+ }
if( !_bBackFromAppControl )
return;
}
+ if (_pFilenames->GetCount() == 0)
+ {
+ _bIsDirectoryEmpty = true;
+ }
+ else
+ {
+ _bIsDirectoryEmpty = false;
+ }
SetFooterVisibility();
//Get the files in the parent path of the current view
__pFileEventManager = new (std::nothrow)FileEventManager();
__pFileEventManager->Construct(*this);
- r = __pFileEventManager->AddPath(_rootMediaPath, FILE_EVENT_TYPE_ATTRIBUTE | FILE_EVENT_TYPE_MOVED_TO | FILE_EVENT_TYPE_DELETE | FILE_EVENT_TYPE_CREATE );
+ r = __pFileEventManager->AddPath(_rootMediaPath, FILE_EVENT_TYPE_MOVED_FROM | FILE_EVENT_TYPE_MOVED_TO | FILE_EVENT_TYPE_DELETE | FILE_EVENT_TYPE_CREATE );
AppLogDebug("Result is %s",GetErrorMessage(r));
#if 0
{
AppLogDebug("SubFolderSelection::OnFileEventOccured:%S", path.GetPointer());
- if ((events & FILE_EVENT_TYPE_ATTRIBUTE) || (events & FILE_EVENT_TYPE_DELETE) || (events & FILE_EVENT_TYPE_MOVED_TO ) || (events & FILE_EVENT_TYPE_CREATE))
+ if ((events & FILE_EVENT_TYPE_MOVED_FROM) || (events & FILE_EVENT_TYPE_DELETE) || (events & FILE_EVENT_TYPE_MOVED_TO ) || (events & FILE_EVENT_TYPE_CREATE))
{
if (_pFolderEntryPM!=null)
{
if (_pFolderEntryPM!=null)
{
- AppLogDebug("inside file event");
_pFolderEntryPM->InitThumbnailManager();
}
}