From 599d3811285382f841004b8e82ae287ab9eb6cfe Mon Sep 17 00:00:00 2001 From: "chitta.rs" Date: Tue, 30 Apr 2013 18:34:10 +0530 Subject: [PATCH] NABI_SE issues fixed Change-Id: I8132b1eac3628d8f3a027540ae828671f5712f7a --- inc/MfSubBaseFolderEntryForm.h | 1 + src/MfBaseItemProvider.cpp | 10 +- src/MfCategorySearch.cpp | 52 +- src/MfCreateFolderForm.cpp | 2 +- src/MfFolderEntryDetailPresentationModel.cpp | 1156 +++++++++++++------------- src/MfSubBaseFileManageForm.cpp | 2 +- src/MfSubBaseFolderEntryForm.cpp | 2 +- src/MfSubBaseMoveCopy.cpp | 8 +- src/MfSubFolderFileListForm.cpp | 44 +- src/MfSubFolderMoveCopy.cpp | 8 +- 10 files changed, 647 insertions(+), 638 deletions(-) diff --git a/inc/MfSubBaseFolderEntryForm.h b/inc/MfSubBaseFolderEntryForm.h index 00bee66..9cf45cd 100644 --- a/inc/MfSubBaseFolderEntryForm.h +++ b/inc/MfSubBaseFolderEntryForm.h @@ -591,6 +591,7 @@ protected: bool _bIsDirectoryEmpty; bool _bBackFromAppControl; + Tizen::Base::String _fileEventPath; MemoryType _storageType; //FileEventManager diff --git a/src/MfBaseItemProvider.cpp b/src/MfBaseItemProvider.cpp index 3448f61..f288279 100644 --- a/src/MfBaseItemProvider.cpp +++ b/src/MfBaseItemProvider.cpp @@ -382,9 +382,10 @@ BaseItemProvider::CreateNormalListViewItem(int listItemIndex, int listItemWidth) { pCustomItem->SetDescColor(Color::GetColor(COLOR_ID_GREY)); } - contentType = ContentManagerUtil::CheckContentType(fullFilePath); + if (pFileDetails->GetBitmap() == null && pFileDetails->IsDummy()) { + contentType = ContentManagerUtil::CheckContentType(fullFilePath); AppLogDebug("Item Index : %d", listItemIndex); if (pCacheList != null && (contentType == CONTENT_TYPE_IMAGE || contentType == CONTENT_TYPE_VIDEO)) { @@ -411,6 +412,13 @@ BaseItemProvider::CreateNormalListViewItem(int listItemIndex, int listItemWidth) pCustomItem->SetThumbnail(__pDummyImage); } } + else + { + AppLogDebug("BITMAP FOUND NO : Content Type is Invalid Index[%d], Path [%S]", listItemIndex, pFileDetails->GetFullFilePath().GetPointer()); + pFileDetails->SetDummy(true); + pFileDetails->SetLoadBitmap(true); + pCustomItem->SetThumbnail(__pDummyImage); + } } else { diff --git a/src/MfCategorySearch.cpp b/src/MfCategorySearch.cpp index f1f482a..f403b2c 100644 --- a/src/MfCategorySearch.cpp +++ b/src/MfCategorySearch.cpp @@ -26,8 +26,6 @@ CategorySearch::CategorySearch(void) CategorySearch::~CategorySearch(void) { - DeviceManager::RemoveDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this); - if (__pHomeButton != null) { delete __pHomeButton; @@ -293,7 +291,7 @@ CategorySearch::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listVi String FileName = pCheckedEntry->GetFileName() + "." + pCheckedEntry->GetFileExtension(); String parentDirectoryOfSelectedFile = L""; _pathOfSelectedFile.SubString(0, _pathOfSelectedFile.GetLength() - FileName.GetLength() , parentDirectoryOfSelectedFile); - + _fileEventPath = parentDirectoryOfSelectedFile; _pFileEventManager->AddPath(parentDirectoryOfSelectedFile, FILE_EVENT_TYPE_CREATE | FILE_EVENT_TYPE_DELETE | FILE_EVENT_TYPE_MOVED_TO | FILE_EVENT_TYPE_MOVED_FROM); if (pCustomAppControl != null) @@ -402,8 +400,6 @@ CategorySearch::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentScen if(_pFileEventManager != null) _pFileEventManager->RemovePath(_pathOfSelectedFile); - DeviceManager::RemoveAllDeviceEventListeners(); - if (_pIconListView != null) { _pIconListView->RemoveGestureDetector(*_pLongPressGestureDetector); @@ -620,43 +616,41 @@ CategorySearch::OnNotificationReceived(Tizen::Base::Collection::ArrayList* pArgs pFileProcessingResult = (Integer*) pArgs->GetAt(0); TryCatch(pFileProcessingResult != null, , "FileProcessing Result list is invalid!"); + TryCatch(_pFilenames != null, , "_pFilenames is Null."); switch (pFileProcessingResult->ToInt()) { case FILE_MANAGING_RESULT_DELETING_SUCCESS: { - if (_pFilenames != null) + pCacheList = CacheManager::GetInstance()->GetCacheHashMap(); + + if (pCacheList != null) { - pCacheList = CacheManager::GetInstance()->GetCacheHashMap(); + pCurrentEntry = static_cast(_pFilenames->GetAt(_indexTracker)); - if (pCacheList != null) + if (pCurrentEntry != null) { - pCurrentEntry = static_cast(_pFilenames->GetAt(_indexTracker)); - - if (pCurrentEntry != null) - { - cachePath = pCurrentEntry->GetFullFilePath(); - } + cachePath = pCurrentEntry->GetFullFilePath(); + } - cacheKeyStatus = pCacheList->ContainsKey(cachePath); + cacheKeyStatus = pCacheList->ContainsKey(cachePath); - if (cacheKeyStatus) - { - CacheManager::GetInstance()->RemoveCacheEntry(cachePath); - } - } - _pFilenames->RemoveAt(_indexTracker, true); - //r = __pListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_REMOVE); - if (_pListView != null) - { - //_pListView->UpdateList(); - _pListView->RefreshList(_indexTracker, LIST_REFRESH_TYPE_ITEM_REMOVE); - } - if (_pIconListView != null && _pIconListView->IsVisible()) + if (cacheKeyStatus) { - _pIconListView->RefreshList(_indexTracker, LIST_REFRESH_TYPE_ITEM_REMOVE); + CacheManager::GetInstance()->RemoveCacheEntry(cachePath); } } + _pFilenames->RemoveAt(_indexTracker, true); + + if (_pListView != null) + { + _pListView->RefreshList(_indexTracker, LIST_REFRESH_TYPE_ITEM_REMOVE); + } + if (_pIconListView != null && _pIconListView->IsVisible()) + { + _pIconListView->RefreshList(_indexTracker, LIST_REFRESH_TYPE_ITEM_REMOVE); + } + HideFileProgressingPopup(); } break; diff --git a/src/MfCreateFolderForm.cpp b/src/MfCreateFolderForm.cpp index ea4cacb..7d320ef 100644 --- a/src/MfCreateFolderForm.cpp +++ b/src/MfCreateFolderForm.cpp @@ -1310,7 +1310,7 @@ CreateFolderForm::OnNotificationReceived(Tizen::Base::Collection::ArrayList* pAr TryReturn(pAppResource != null, , "Failed to fetch AppResource"); pAppResource->GetString(L"IDS_RENAME_FAILED", renameFailed); - messageBox.Construct(L"",renameFailed, MSGBOX_STYLE_NONE, 1000); + messageBox.Construct(L"",renameFailed, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); int modalResult = 0; messageBox.ShowAndWait(modalResult); diff --git a/src/MfFolderEntryDetailPresentationModel.cpp b/src/MfFolderEntryDetailPresentationModel.cpp index 8b50ce9..aaef8f1 100644 --- a/src/MfFolderEntryDetailPresentationModel.cpp +++ b/src/MfFolderEntryDetailPresentationModel.cpp @@ -1,576 +1,580 @@ -// -// Copyright (c) 2012 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.1 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/** - * @file: MfFolderEntryDetailPresentationModel.cpp - * @brief: This file contains the implementation of class FolderEntryDetailPresentationModel, - * which acts as a manager for providing file or folder specific information. - */ - -#include "MfFolderEntryDetailPresentationModel.h" - -using namespace Tizen::App; -using namespace Tizen::Base; -using namespace Tizen::Base::Utility; -using namespace Tizen::Content; -using namespace Tizen::Io; - -FolderEntryDetailPresentationModel::FolderEntryDetailPresentationModel(void) -{ - __noOfFiles = 0; - __noOfFolders = 0; - __directorySize = 0; -} - -FolderEntryDetailPresentationModel::~FolderEntryDetailPresentationModel(void) -{ - //empty Implementation -} - -FolderEntryDetailPresentationModel& -FolderEntryDetailPresentationModel::operator =(const FolderEntryDetailPresentationModel& mediaUtility) -{ - return *this; -} - -FolderEntryDetailPresentationModel::FolderEntryDetailPresentationModel(const FolderEntryDetailPresentationModel&) -{ - //empty Implementation -} - -MediaMetaData* -FolderEntryDetailPresentationModel::GetFolderEntryMetaDataN(Tizen::Base::String filePath, FileType fileType) -{ - AppLogDebug("Entry"); - result r = E_SUCCESS; - MediaMetaData* pMediaMetaData = null; - FolderMediaMetaData* pFolderMediaMetaData = null; - ImageMediaMetaData* pImageMediaMetaData = null; - AudioMediaMetaData* pAudioMediaMetaData = null; - VideoMediaMetaData* pVideoMediaMetaData = null; - OtherMediaMetaData* pOtherMediaMetaData = null; - - __directorySize = 0; - __noOfFiles = 0; - __noOfFolders = 0; - - TryCatch(filePath.GetLength() != 0, r=E_FAILURE,"Invalid file path"); - r = GetMetaData(filePath); - - __directorySize = GetFileSize(filePath); - if (r == E_SUCCESS) - { - if (fileType == FILE_TYPE_FOLDER_TYPE) - { - pFolderMediaMetaData = new (std::nothrow) FolderMediaMetaData(); - TryCatch(pFolderMediaMetaData != null, , "Failed to allocate Memory to pFolderMediaMetaData"); - pFolderMediaMetaData->SetFileName(GetFileName(filePath)); - pFolderMediaMetaData->SetFilePath(GetFileDisplayPath(filePath)); - pFolderMediaMetaData->SetFileCreationTime(GetFileCreationTime(filePath)); - pFolderMediaMetaData->SetFileSize(__directorySize); - pFolderMediaMetaData->SetNoOfFiles(__noOfFiles); - pFolderMediaMetaData->SetNoOfFolders(__noOfFolders); - pMediaMetaData = pFolderMediaMetaData; - } - else if (fileType == FILE_TYPE_IMAGE_TYPE) - { - pImageMediaMetaData = new (std::nothrow) ImageMediaMetaData(); - TryCatch(pImageMediaMetaData != null, , "Failed to allocate Memory to pImageMediaMetaData"); - pImageMediaMetaData->SetFileName(GetFileName(filePath)); - pImageMediaMetaData->SetFilePath(GetFileDisplayPath(filePath)); - pImageMediaMetaData->SetFileCreationTime(GetFileCreationTime(filePath)); - pImageMediaMetaData->SetFileSize(__directorySize); - pImageMediaMetaData->SetFileFormat(GetFileFormat(filePath)); - pImageMediaMetaData->SetFileResolution(GetFileResolution(filePath, fileType)); - pMediaMetaData = pImageMediaMetaData; - } - else if (fileType == FILE_TYPE_AUDIO_TYPE) - { - pAudioMediaMetaData = new (std::nothrow) AudioMediaMetaData(); - TryCatch(pAudioMediaMetaData != null, , "Failed to allocate Memory to pAudioMediaMetaData"); - pAudioMediaMetaData->SetFileName(GetFileName(filePath)); - pAudioMediaMetaData->SetFilePath(GetFileDisplayPath(filePath)); - pAudioMediaMetaData->SetFileCreationTime(GetFileCreationTime(filePath)); - pAudioMediaMetaData->SetFileSize(__directorySize); - pAudioMediaMetaData->SetFileFormat(GetFileFormat(filePath)); - pMediaMetaData = pAudioMediaMetaData; - } - else if (fileType == FILE_TYPE_VIDEO_TYPE) - { - pVideoMediaMetaData = new (std::nothrow) VideoMediaMetaData(); - TryCatch(pVideoMediaMetaData != null, , "Failed to allocate Memory to pVideoMediaMetaData"); - pVideoMediaMetaData->SetFileName(GetFileName(filePath)); - pVideoMediaMetaData->SetFilePath(GetFileDisplayPath(filePath)); - pVideoMediaMetaData->SetFileCreationTime(GetFileCreationTime(filePath)); - pVideoMediaMetaData->SetFileSize(__directorySize); - pVideoMediaMetaData->SetFileFormat(GetFileFormat(filePath)); - pVideoMediaMetaData->SetFileResolution(GetFileResolution(filePath, fileType)); - pMediaMetaData = pVideoMediaMetaData; - } - else if (fileType == FILE_TYPE_OTHER_TYPE) - { - pOtherMediaMetaData = new (std::nothrow) OtherMediaMetaData(); - TryCatch(pOtherMediaMetaData != null, , "Failed to allocate Memory to pOtherMediaMetaData"); - pOtherMediaMetaData->SetFileName(GetFileName(filePath)); - pOtherMediaMetaData->SetFilePath(GetFileDisplayPath(filePath)); - pOtherMediaMetaData->SetFileCreationTime(GetFileCreationTime(filePath)); - pOtherMediaMetaData->SetFileSize(__directorySize); - pOtherMediaMetaData->SetFileFormat(GetFileFormat(filePath)); - pMediaMetaData = pOtherMediaMetaData; - } - - AppLogDebug("Exit %s", GetErrorMessage(r)); - return pMediaMetaData; - } - else - { - AppLogDebug("Exit %s", GetErrorMessage(r)); - return null; - } - -CATCH: - - AppLogDebug("Exit %s", GetErrorMessage(GetLastResult())); - return null; -} - -Tizen::Base::String* -FolderEntryDetailPresentationModel::GetFileName(const Tizen::Base::String& filePath) -{ - AppLogDebug("Entry"); - String delim(L"/"); - String token; - String* pFileName = null; - StringTokenizer strTok(filePath, delim); - result r = E_SUCCESS; - - String displayPhone; - String displaySdCard; - String defMediaPath = BasePresentationModel::GetMediaPath(); - String defSdCardPath = BasePresentationModel::GetSdCardPath(); - - AppResource* pAppResource = null; - - pAppResource = UiApp::GetInstance()->GetAppResource(); - - if (pAppResource != null) - { - pAppResource->GetString(L"IDS_MF_TAB_PHONE", displayPhone); - pAppResource->GetString(L"IDS_MF_TAB_MEMORY_CARD", displaySdCard); - - displayPhone.Append("/"); - displaySdCard.Append("/"); - } - - if(filePath == defMediaPath) - { - token = displayPhone; - token.Remove(token.GetLength()-1,1); - } - else if(filePath == defSdCardPath) - { - token = displaySdCard; - token.Remove(token.GetLength()-1,1); - } - else - { - while (strTok.HasMoreTokens()) - { - strTok.GetNextToken(token); - } - } - - pFileName = new (std::nothrow) String; - pFileName->Append(token); - AppLogDebug("Exit %s", GetErrorMessage(r)); - return pFileName; -} - -String* -FolderEntryDetailPresentationModel::GetFileDisplayPath(const Tizen::Base::String& filePath) -{ - AppLogDebug("Entry"); - String previousParentPath(L""); - String fileDisplayPath; - String delim(L"/"); - String token(L""); - String *pParentPath; - - String displayPhone; - String displaySdCard; - String defMediaPath = BasePresentationModel::GetMediaPath(); - String defSdCardPath = BasePresentationModel::GetSdCardPath(); - - result r = E_SUCCESS; - FileAttributes fileAttrib; - - r = File::GetAttributes(filePath, fileAttrib); - - AppResource* pAppResource = null; - - pAppResource = UiApp::GetInstance()->GetAppResource(); - - if (pAppResource != null) - { - pAppResource->GetString(L"IDS_MF_TAB_PHONE", displayPhone); - pAppResource->GetString(L"IDS_MF_TAB_MEMORY_CARD", displaySdCard); - - - } - - if (filePath.Equals(BasePresentationModel::GetMediaPath(), false)) - { - AppLogDebug("path sent is root path hence return"); - pParentPath = new (std::nothrow) String(displayPhone); - return pParentPath; - } - else if(filePath.Equals(BasePresentationModel::GetSdCardPath(), false)) - { - pParentPath = new (std::nothrow) String(displaySdCard); - return pParentPath; - } - else - { - displayPhone.Append("/"); - displaySdCard.Append("/"); - - StringTokenizer strTok(filePath, delim); - while (strTok.HasMoreTokens()) - { - strTok.GetNextToken(token); - previousParentPath.Append(L"/"); - previousParentPath.Append(token); - - if (!fileAttrib.IsDirectory()) - { - if (strTok.GetTokenCount() == 1 || - token.Equals(BasePresentationModel::GetMediaPath(), false) || - token.Equals(BasePresentationModel::GetSdCardPath(), false) || - token.Equals(BasePresentationModel::GetUsbPath(), false)) - { - break; - } - } - /*if (strTok.GetTokenCount() == 1 || - token.Equals(BasePresentationModel::GetMediaPath(), false) || - token.Equals(BasePresentationModel::GetSdCardPath(), false) || - token.Equals(BasePresentationModel::GetUsbPath(), false)) - { - break; - }*/ - } - previousParentPath.Append(L"/"); - fileDisplayPath = previousParentPath; - - if (fileDisplayPath.IsEmpty() == false) - { - if (fileDisplayPath.StartsWith(defMediaPath, 0)) - { - fileDisplayPath.Replace(defMediaPath, displayPhone); - } - else if (fileDisplayPath.StartsWith(defSdCardPath, 0)) - { - fileDisplayPath.Replace(defSdCardPath, displaySdCard); - } - } - //previousParentPath.Append(L"/"); - AppLogDebug("Display path is %ls",fileDisplayPath.GetPointer()); - fileDisplayPath.Remove(fileDisplayPath.GetLength()-1,1); - pParentPath = new (std::nothrow) String(fileDisplayPath); - AppLogDebug("Exit %s", GetErrorMessage(GetLastResult())); - return pParentPath; - } -} - -long long int -FolderEntryDetailPresentationModel::GetFileSize(const Tizen::Base::String& filePath) -{ - AppLogDebug("Entry"); - result r = E_SUCCESS; - Directory* pDirectory = null; - DirEnumerator* pDirectoryEnum = null; - FileAttributes fileAttrib; - - TryCatch(filePath.GetLength() != 0, r=E_FAILURE,"Invalid file path"); - r = File::GetAttributes(filePath, fileAttrib); - TryCatch(r==E_SUCCESS,,"Failed to get folderentry attributes"); - - if (fileAttrib.IsDirectory()) - { - pDirectory = new (std::nothrow) Directory(); - TryCatch(pDirectory != null, , "Failed to allocate Memory to pDirectory"); - TryCatch(filePath.GetLength() != 0, , "Filepath is empty"); - - r = pDirectory->Construct(filePath); - - pDirectoryEnum = pDirectory->ReadN(); - - if (pDirectoryEnum != null) - { - while (pDirectoryEnum->MoveNext() == E_SUCCESS) - { - DirEntry entry = pDirectoryEnum->GetCurrentDirEntry(); - if (entry.GetName() != "." && entry.GetName() != ".." && entry.GetName() != ".emptydir" && entry.GetName() != ".tmp" && entry.GetName() != ".gitignore") - { - String str = entry.GetName(); - String fullpath = filePath + L"/" + str; - - r = File::GetAttributes(fullpath, fileAttrib); - TryCatch(r==E_SUCCESS,,"Failed to get folderEntry attributes"); - - __directorySize = __directorySize + fileAttrib.GetFileSize(); - - if (fileAttrib.IsDirectory()) - { - GetFileSize(fullpath); ///recursivley calling the function getMetaData - } - } - } - delete pDirectoryEnum; - pDirectoryEnum = null; - } - delete pDirectory; - pDirectory = null; - } - else - { - __directorySize = fileAttrib.GetFileSize(); - } - AppLogDebug("Exit %s", GetErrorMessage(r)); - return __directorySize; - -CATCH: - if (pDirectoryEnum != null) - { - delete pDirectoryEnum; - pDirectoryEnum = null; - } - if (pDirectory != null) - { - delete pDirectory; - pDirectory = null; - } - AppLogDebug("Exit %s", GetErrorMessage(r)); - return 0; - -} - -Tizen::Base::DateTime -FolderEntryDetailPresentationModel::GetFileCreationTime(const Tizen::Base::String& filePath) -{ - AppLogDebug("Entry"); - result r = E_SUCCESS; - ///create an instance of fileAttribute - DateTime fileCreationTime; - FileAttributes fileAttrib; - - TryCatch(filePath.GetLength() != 0, r=E_FAILURE,"Invalid file path"); - r = File::GetAttributes(filePath, fileAttrib); - TryCatch(r==E_SUCCESS,,"Failed to get folderentry attributes"); - - fileCreationTime = fileAttrib.GetDateTime(); - - AppLogDebug("Exit"); - -CATCH: - return fileCreationTime; -} - -int -FolderEntryDetailPresentationModel::GetFileCount(const Tizen::Base::String& filePath) -{ - return __noOfFiles; -} - -int -FolderEntryDetailPresentationModel::GetFolderCount(const Tizen::Base::String& filePath) -{ - return __noOfFolders; -} - -result -FolderEntryDetailPresentationModel::GetMetaData(const Tizen::Base::String filePath) -{ - AppLogDebug("Entry"); - result r = E_SUCCESS; - Directory* pDirectory = null; - FileAttributes fileAttrib; - - TryCatch(filePath.GetLength() != 0, r=E_FAILURE,"Invalid file path"); - r = File::GetAttributes(filePath, fileAttrib); - TryCatch(r==E_SUCCESS,,"Failed to get folderentry attributes"); - - if (fileAttrib.IsDirectory()) - { - pDirectory = new (std::nothrow) Directory(); - TryCatch(pDirectory != null, , "Failed to allocate Memory to pDirectory"); - - DirEnumerator* pDirectoryEnum = null; - - r = pDirectory->Construct(filePath); - - pDirectoryEnum = pDirectory->ReadN(); - - if (pDirectoryEnum != null) - { - while (pDirectoryEnum->MoveNext() == E_SUCCESS) - { - DirEntry entry = pDirectoryEnum->GetCurrentDirEntry(); - if (entry.GetName() != "." && entry.GetName() != ".." && entry.GetName() != ".emptydir" && entry.GetName() != ".tmp" && entry.GetName() != ".gitignore") - { - - String str = entry.GetName(); - String fullpath = filePath + L"/" + str; - - r = File::GetAttributes(fullpath, fileAttrib); - - //__directorySize = __directorySize + fileAttrib.GetFileSize(); - - if (fileAttrib.IsDirectory()) - { - __noOfFolders = __noOfFolders + 1; ///increase the number of folders if current file is a directory - } - else - { - - __noOfFiles++; - } - - } - } - - - //if (pDirectoryEnum != null) - //{ - delete pDirectoryEnum; - pDirectoryEnum = null; - //} - } - //if (pDirectory != null) - //{ - delete pDirectory; - pDirectory = null; - //} - } - /*else - { - __directorySize = fileAttrib.GetFileSize(); - }*/ - - AppLogDebug("Exit %s", GetErrorMessage(r)); - return r; - -CATCH: - AppLogDebug("Exit %s", GetErrorMessage(r)); - return r; -} - -Tizen::Base::String* -FolderEntryDetailPresentationModel::GetFileFormat(const Tizen::Base::String& filePath) -{ - AppLogDebug("Entry"); - String delim(L"."); - String* pFileName = null; - pFileName = GetFileName(filePath); - StringTokenizer strTok(*pFileName, delim); - delete pFileName; - String token; - String* pFileFormat; - pFileFormat = null; - if(strTok.GetTokenCount() != 1) - { - while (strTok.HasMoreTokens()) - { - strTok.GetNextToken(token); - - } - } - else - { - token.Clear(); - token.Append(L"Unknown"); - } - pFileFormat = new (std::nothrow) String(); - pFileFormat->Append(token); - AppLogDebug("Exit"); - return pFileFormat; -} - -Tizen::Base::String* -FolderEntryDetailPresentationModel::GetFileResolution(const Tizen::Base::String& filePath, FileType fileType) -{ - AppLogDebug("Entry"); - Tizen::Base::String contentPath = filePath; - String* pFileResolution = null; - ImageMetadata* pImgMeta = null; - VideoMetadata* pVideoMeta = null; - - pFileResolution = new (std::nothrow) String(); - TryCatch(pFileResolution != null, , "Failed to allocate Memory to pFileResolution"); - - switch (fileType) - { - case FILE_TYPE_IMAGE_TYPE: - { - int width; - int height; - pImgMeta = ContentManagerUtil::GetImageMetaN(contentPath); - TryCatch(pImgMeta != null, pFileResolution->Append(L"NOT FOUND"); - , "GetImageMetaN failed."); - - width = pImgMeta->GetWidth(); - height = pImgMeta->GetHeight(); - pFileResolution->Append(width); - pFileResolution->Append(L"x"); - pFileResolution->Append(height); - - delete pImgMeta; - //return pFileResolution; - - } - break; - - case FILE_TYPE_VIDEO_TYPE: - { - int width; - int height; - pVideoMeta = ContentManagerUtil::GetVideoMetaN(contentPath); - TryCatch(pVideoMeta != null, pFileResolution->Append(L"NOT FOUND"), "::GetImageMetaN failed."); - - width = pVideoMeta->GetWidth(); - height = pVideoMeta->GetHeight(); - pFileResolution->Append(width); - pFileResolution->Append(L"x"); - pFileResolution->Append(height); - - delete pVideoMeta; - //return pFileResolution; - } - break; - - default: - { - //do nothing - } - break; - } - AppLogDebug("Exit"); - return pFileResolution; - -CATCH: - AppLogDebug("Exit"); - return pFileResolution; -} +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file: MfFolderEntryDetailPresentationModel.cpp + * @brief: This file contains the implementation of class FolderEntryDetailPresentationModel, + * which acts as a manager for providing file or folder specific information. + */ + +#include "MfFolderEntryDetailPresentationModel.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Utility; +using namespace Tizen::Content; +using namespace Tizen::Io; + +FolderEntryDetailPresentationModel::FolderEntryDetailPresentationModel(void) +{ + __noOfFiles = 0; + __noOfFolders = 0; + __directorySize = 0; +} + +FolderEntryDetailPresentationModel::~FolderEntryDetailPresentationModel(void) +{ + //empty Implementation +} + +FolderEntryDetailPresentationModel& +FolderEntryDetailPresentationModel::operator =(const FolderEntryDetailPresentationModel& mediaUtility) +{ + return *this; +} + +FolderEntryDetailPresentationModel::FolderEntryDetailPresentationModel(const FolderEntryDetailPresentationModel&) +{ + //empty Implementation +} + +MediaMetaData* +FolderEntryDetailPresentationModel::GetFolderEntryMetaDataN(Tizen::Base::String filePath, FileType fileType) +{ + AppLogDebug("Entry"); + result r = E_SUCCESS; + MediaMetaData* pMediaMetaData = null; + FolderMediaMetaData* pFolderMediaMetaData = null; + ImageMediaMetaData* pImageMediaMetaData = null; + AudioMediaMetaData* pAudioMediaMetaData = null; + VideoMediaMetaData* pVideoMediaMetaData = null; + OtherMediaMetaData* pOtherMediaMetaData = null; + + __directorySize = 0; + __noOfFiles = 0; + __noOfFolders = 0; + + TryCatch(filePath.GetLength() != 0, r=E_FAILURE,"Invalid file path"); + r = GetMetaData(filePath); + + __directorySize = GetFileSize(filePath); + if (r == E_SUCCESS) + { + if (fileType == FILE_TYPE_FOLDER_TYPE) + { + pFolderMediaMetaData = new (std::nothrow) FolderMediaMetaData(); + TryCatch(pFolderMediaMetaData != null, , "Failed to allocate Memory to pFolderMediaMetaData"); + pFolderMediaMetaData->SetFileName(GetFileName(filePath)); + pFolderMediaMetaData->SetFilePath(GetFileDisplayPath(filePath)); + pFolderMediaMetaData->SetFileCreationTime(GetFileCreationTime(filePath)); + pFolderMediaMetaData->SetFileSize(__directorySize); + pFolderMediaMetaData->SetNoOfFiles(__noOfFiles); + pFolderMediaMetaData->SetNoOfFolders(__noOfFolders); + pMediaMetaData = pFolderMediaMetaData; + } + else if (fileType == FILE_TYPE_IMAGE_TYPE) + { + pImageMediaMetaData = new (std::nothrow) ImageMediaMetaData(); + TryCatch(pImageMediaMetaData != null, , "Failed to allocate Memory to pImageMediaMetaData"); + pImageMediaMetaData->SetFileName(GetFileName(filePath)); + pImageMediaMetaData->SetFilePath(GetFileDisplayPath(filePath)); + pImageMediaMetaData->SetFileCreationTime(GetFileCreationTime(filePath)); + pImageMediaMetaData->SetFileSize(__directorySize); + pImageMediaMetaData->SetFileFormat(GetFileFormat(filePath)); + pImageMediaMetaData->SetFileResolution(GetFileResolution(filePath, fileType)); + pMediaMetaData = pImageMediaMetaData; + } + else if (fileType == FILE_TYPE_AUDIO_TYPE) + { + pAudioMediaMetaData = new (std::nothrow) AudioMediaMetaData(); + TryCatch(pAudioMediaMetaData != null, , "Failed to allocate Memory to pAudioMediaMetaData"); + pAudioMediaMetaData->SetFileName(GetFileName(filePath)); + pAudioMediaMetaData->SetFilePath(GetFileDisplayPath(filePath)); + pAudioMediaMetaData->SetFileCreationTime(GetFileCreationTime(filePath)); + pAudioMediaMetaData->SetFileSize(__directorySize); + pAudioMediaMetaData->SetFileFormat(GetFileFormat(filePath)); + pMediaMetaData = pAudioMediaMetaData; + } + else if (fileType == FILE_TYPE_VIDEO_TYPE) + { + pVideoMediaMetaData = new (std::nothrow) VideoMediaMetaData(); + TryCatch(pVideoMediaMetaData != null, , "Failed to allocate Memory to pVideoMediaMetaData"); + pVideoMediaMetaData->SetFileName(GetFileName(filePath)); + pVideoMediaMetaData->SetFilePath(GetFileDisplayPath(filePath)); + pVideoMediaMetaData->SetFileCreationTime(GetFileCreationTime(filePath)); + pVideoMediaMetaData->SetFileSize(__directorySize); + pVideoMediaMetaData->SetFileFormat(GetFileFormat(filePath)); + pVideoMediaMetaData->SetFileResolution(GetFileResolution(filePath, fileType)); + pMediaMetaData = pVideoMediaMetaData; + } + else if (fileType == FILE_TYPE_OTHER_TYPE) + { + pOtherMediaMetaData = new (std::nothrow) OtherMediaMetaData(); + TryCatch(pOtherMediaMetaData != null, , "Failed to allocate Memory to pOtherMediaMetaData"); + pOtherMediaMetaData->SetFileName(GetFileName(filePath)); + pOtherMediaMetaData->SetFilePath(GetFileDisplayPath(filePath)); + pOtherMediaMetaData->SetFileCreationTime(GetFileCreationTime(filePath)); + pOtherMediaMetaData->SetFileSize(__directorySize); + pOtherMediaMetaData->SetFileFormat(GetFileFormat(filePath)); + pMediaMetaData = pOtherMediaMetaData; + } + + AppLogDebug("Exit %s", GetErrorMessage(r)); + return pMediaMetaData; + } + else + { + AppLogDebug("Exit %s", GetErrorMessage(r)); + return null; + } + +CATCH: + + AppLogDebug("Exit %s", GetErrorMessage(GetLastResult())); + return null; +} + +Tizen::Base::String* +FolderEntryDetailPresentationModel::GetFileName(const Tizen::Base::String& filePath) +{ + AppLogDebug("Entry"); + String delim(L"/"); + String token; + String* pFileName = null; + StringTokenizer strTok(filePath, delim); + result r = E_SUCCESS; + + String displayPhone; + String displaySdCard; + String defMediaPath = BasePresentationModel::GetMediaPath(); + String defSdCardPath = BasePresentationModel::GetSdCardPath(); + + AppResource* pAppResource = null; + + pAppResource = UiApp::GetInstance()->GetAppResource(); + + if (pAppResource != null) + { + pAppResource->GetString(L"IDS_MF_TAB_PHONE", displayPhone); + pAppResource->GetString(L"IDS_MF_TAB_MEMORY_CARD", displaySdCard); + + displayPhone.Append("/"); + displaySdCard.Append("/"); + } + + if(filePath == defMediaPath) + { + token = displayPhone; + token.Remove(token.GetLength()-1,1); + } + else if(filePath == defSdCardPath) + { + token = displaySdCard; + token.Remove(token.GetLength()-1,1); + } + else + { + while (strTok.HasMoreTokens()) + { + strTok.GetNextToken(token); + } + } + + pFileName = new (std::nothrow) String; + pFileName->Append(token); + AppLogDebug("Exit %s", GetErrorMessage(r)); + return pFileName; +} + +String* +FolderEntryDetailPresentationModel::GetFileDisplayPath(const Tizen::Base::String& filePath) +{ + AppLogDebug("Entry"); + String previousParentPath(L""); + String fileDisplayPath; + String delim(L"/"); + String token(L""); + String *pParentPath; + + String displayPhone; + String displaySdCard; + String defMediaPath = BasePresentationModel::GetMediaPath(); + String defSdCardPath = BasePresentationModel::GetSdCardPath(); + + result r = E_SUCCESS; + FileAttributes fileAttrib; + + r = File::GetAttributes(filePath, fileAttrib); + + AppResource* pAppResource = null; + + pAppResource = UiApp::GetInstance()->GetAppResource(); + + if (pAppResource != null) + { + pAppResource->GetString(L"IDS_MF_TAB_PHONE", displayPhone); + pAppResource->GetString(L"IDS_MF_TAB_MEMORY_CARD", displaySdCard); + + + } + + if (filePath.Equals(BasePresentationModel::GetMediaPath(), false)) + { + AppLogDebug("path sent is root path hence return"); + pParentPath = new (std::nothrow) String(displayPhone); + return pParentPath; + } + else if(filePath.Equals(BasePresentationModel::GetSdCardPath(), false)) + { + pParentPath = new (std::nothrow) String(displaySdCard); + return pParentPath; + } + else + { + displayPhone.Append("/"); + displaySdCard.Append("/"); + + StringTokenizer strTok(filePath, delim); + while (strTok.HasMoreTokens()) + { + strTok.GetNextToken(token); + previousParentPath.Append(L"/"); + previousParentPath.Append(token); + + if (!fileAttrib.IsDirectory()) + { + if (strTok.GetTokenCount() == 1 || + token.Equals(BasePresentationModel::GetMediaPath(), false) || + token.Equals(BasePresentationModel::GetSdCardPath(), false) || + token.Equals(BasePresentationModel::GetUsbPath(), false)) + { + break; + } + } + /*if (strTok.GetTokenCount() == 1 || + token.Equals(BasePresentationModel::GetMediaPath(), false) || + token.Equals(BasePresentationModel::GetSdCardPath(), false) || + token.Equals(BasePresentationModel::GetUsbPath(), false)) + { + break; + }*/ + } + previousParentPath.Append(L"/"); + fileDisplayPath = previousParentPath; + + if (fileDisplayPath.IsEmpty() == false) + { + if (fileDisplayPath.StartsWith(defMediaPath, 0)) + { + fileDisplayPath.Replace(defMediaPath, displayPhone); + } + else if (fileDisplayPath.StartsWith(defSdCardPath, 0)) + { + fileDisplayPath.Replace(defSdCardPath, displaySdCard); + } + } + //previousParentPath.Append(L"/"); + AppLogDebug("Display path is %ls",fileDisplayPath.GetPointer()); + fileDisplayPath.Remove(fileDisplayPath.GetLength()-1,1); + pParentPath = new (std::nothrow) String(fileDisplayPath); + AppLogDebug("Exit %s", GetErrorMessage(GetLastResult())); + return pParentPath; + } +} + +long long int +FolderEntryDetailPresentationModel::GetFileSize(const Tizen::Base::String& filePath) +{ + AppLogDebug("Entry"); + result r = E_SUCCESS; + Directory* pDirectory = null; + DirEnumerator* pDirectoryEnum = null; + FileAttributes fileAttrib; + + TryCatch(filePath.GetLength() != 0, r=E_FAILURE,"Invalid file path"); + r = File::GetAttributes(filePath, fileAttrib); + TryCatch(r==E_SUCCESS,,"Failed to get folderentry attributes"); + + if (fileAttrib.IsDirectory()) + { + pDirectory = new (std::nothrow) Directory(); + TryCatch(pDirectory != null, , "Failed to allocate Memory to pDirectory"); + TryCatch(filePath.GetLength() != 0, , "Filepath is empty"); + + r = pDirectory->Construct(filePath); + + pDirectoryEnum = pDirectory->ReadN(); + + if (pDirectoryEnum != null) + { + while (pDirectoryEnum->MoveNext() == E_SUCCESS) + { + DirEntry entry = pDirectoryEnum->GetCurrentDirEntry(); + if (entry.GetName() != "." && entry.GetName() != ".." && entry.GetName() != ".emptydir" && entry.GetName() != ".tmp" && entry.GetName() != ".gitignore") + { + String str = entry.GetName(); + String fullpath = filePath + L"/" + str; + + r = File::GetAttributes(fullpath, fileAttrib); + TryCatch(r==E_SUCCESS,,"Failed to get folderEntry attributes"); + + + + if (fileAttrib.IsDirectory()) + { + GetFileSize(fullpath); ///recursivley calling the function getMetaData + } + else + { + __directorySize = __directorySize + fileAttrib.GetFileSize(); + } + } + } + delete pDirectoryEnum; + pDirectoryEnum = null; + } + delete pDirectory; + pDirectory = null; + } + else + { + __directorySize = fileAttrib.GetFileSize(); + } + AppLogDebug("Exit %s", GetErrorMessage(r)); + return __directorySize; + +CATCH: + if (pDirectoryEnum != null) + { + delete pDirectoryEnum; + pDirectoryEnum = null; + } + if (pDirectory != null) + { + delete pDirectory; + pDirectory = null; + } + AppLogDebug("Exit %s", GetErrorMessage(r)); + return 0; + +} + +Tizen::Base::DateTime +FolderEntryDetailPresentationModel::GetFileCreationTime(const Tizen::Base::String& filePath) +{ + AppLogDebug("Entry"); + result r = E_SUCCESS; + ///create an instance of fileAttribute + DateTime fileCreationTime; + FileAttributes fileAttrib; + + TryCatch(filePath.GetLength() != 0, r=E_FAILURE,"Invalid file path"); + r = File::GetAttributes(filePath, fileAttrib); + TryCatch(r==E_SUCCESS,,"Failed to get folderentry attributes"); + + fileCreationTime = fileAttrib.GetDateTime(); + + AppLogDebug("Exit"); + +CATCH: + return fileCreationTime; +} + +int +FolderEntryDetailPresentationModel::GetFileCount(const Tizen::Base::String& filePath) +{ + return __noOfFiles; +} + +int +FolderEntryDetailPresentationModel::GetFolderCount(const Tizen::Base::String& filePath) +{ + return __noOfFolders; +} + +result +FolderEntryDetailPresentationModel::GetMetaData(const Tizen::Base::String filePath) +{ + AppLogDebug("Entry"); + result r = E_SUCCESS; + Directory* pDirectory = null; + FileAttributes fileAttrib; + + TryCatch(filePath.GetLength() != 0, r=E_FAILURE,"Invalid file path"); + r = File::GetAttributes(filePath, fileAttrib); + TryCatch(r==E_SUCCESS,,"Failed to get folderentry attributes"); + + if (fileAttrib.IsDirectory()) + { + pDirectory = new (std::nothrow) Directory(); + TryCatch(pDirectory != null, , "Failed to allocate Memory to pDirectory"); + + DirEnumerator* pDirectoryEnum = null; + + r = pDirectory->Construct(filePath); + + pDirectoryEnum = pDirectory->ReadN(); + + if (pDirectoryEnum != null) + { + while (pDirectoryEnum->MoveNext() == E_SUCCESS) + { + DirEntry entry = pDirectoryEnum->GetCurrentDirEntry(); + if (entry.GetName() != "." && entry.GetName() != ".." && entry.GetName() != ".emptydir" && entry.GetName() != ".tmp" && entry.GetName() != ".gitignore") + { + + String str = entry.GetName(); + String fullpath = filePath + L"/" + str; + + r = File::GetAttributes(fullpath, fileAttrib); + + //__directorySize = __directorySize + fileAttrib.GetFileSize(); + + if (fileAttrib.IsDirectory()) + { + __noOfFolders = __noOfFolders + 1; ///increase the number of folders if current file is a directory + } + else + { + + __noOfFiles++; + } + + } + } + + + //if (pDirectoryEnum != null) + //{ + delete pDirectoryEnum; + pDirectoryEnum = null; + //} + } + //if (pDirectory != null) + //{ + delete pDirectory; + pDirectory = null; + //} + } + /*else + { + __directorySize = fileAttrib.GetFileSize(); + }*/ + + AppLogDebug("Exit %s", GetErrorMessage(r)); + return r; + +CATCH: + AppLogDebug("Exit %s", GetErrorMessage(r)); + return r; +} + +Tizen::Base::String* +FolderEntryDetailPresentationModel::GetFileFormat(const Tizen::Base::String& filePath) +{ + AppLogDebug("Entry"); + String delim(L"."); + String* pFileName = null; + pFileName = GetFileName(filePath); + StringTokenizer strTok(*pFileName, delim); + delete pFileName; + String token; + String* pFileFormat; + pFileFormat = null; + if(strTok.GetTokenCount() != 1) + { + while (strTok.HasMoreTokens()) + { + strTok.GetNextToken(token); + + } + } + else + { + token.Clear(); + token.Append(L"Unknown"); + } + pFileFormat = new (std::nothrow) String(); + pFileFormat->Append(token); + AppLogDebug("Exit"); + return pFileFormat; +} + +Tizen::Base::String* +FolderEntryDetailPresentationModel::GetFileResolution(const Tizen::Base::String& filePath, FileType fileType) +{ + AppLogDebug("Entry"); + Tizen::Base::String contentPath = filePath; + String* pFileResolution = null; + ImageMetadata* pImgMeta = null; + VideoMetadata* pVideoMeta = null; + + pFileResolution = new (std::nothrow) String(); + TryCatch(pFileResolution != null, , "Failed to allocate Memory to pFileResolution"); + + switch (fileType) + { + case FILE_TYPE_IMAGE_TYPE: + { + int width; + int height; + pImgMeta = ContentManagerUtil::GetImageMetaN(contentPath); + TryCatch(pImgMeta != null, pFileResolution->Append(L"NOT FOUND"); + , "GetImageMetaN failed."); + + width = pImgMeta->GetWidth(); + height = pImgMeta->GetHeight(); + pFileResolution->Append(width); + pFileResolution->Append(L"x"); + pFileResolution->Append(height); + + delete pImgMeta; + //return pFileResolution; + + } + break; + + case FILE_TYPE_VIDEO_TYPE: + { + int width; + int height; + pVideoMeta = ContentManagerUtil::GetVideoMetaN(contentPath); + TryCatch(pVideoMeta != null, pFileResolution->Append(L"NOT FOUND"), "::GetImageMetaN failed."); + + width = pVideoMeta->GetWidth(); + height = pVideoMeta->GetHeight(); + pFileResolution->Append(width); + pFileResolution->Append(L"x"); + pFileResolution->Append(height); + + delete pVideoMeta; + //return pFileResolution; + } + break; + + default: + { + //do nothing + } + break; + } + AppLogDebug("Exit"); + return pFileResolution; + +CATCH: + AppLogDebug("Exit"); + return pFileResolution; +} diff --git a/src/MfSubBaseFileManageForm.cpp b/src/MfSubBaseFileManageForm.cpp index c8a9d50..1512c5e 100644 --- a/src/MfSubBaseFileManageForm.cpp +++ b/src/MfSubBaseFileManageForm.cpp @@ -1371,7 +1371,7 @@ SubBaseFileManageForm::SubBaseOnNotificationReceived(Tizen::Base::Collection::Ar pAppResource->GetString("IDS_MF_POP_DELETE_FAILED", deleteFailed); MessageBox messageBox; - messageBox.Construct(L"", deleteFailed, MSGBOX_STYLE_NONE, 1000); + messageBox.Construct(L"", deleteFailed, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); int modalResult = 0; messageBox.ShowAndWait(modalResult); } diff --git a/src/MfSubBaseFolderEntryForm.cpp b/src/MfSubBaseFolderEntryForm.cpp index 8567a4b..55c802d 100644 --- a/src/MfSubBaseFolderEntryForm.cpp +++ b/src/MfSubBaseFolderEntryForm.cpp @@ -2357,7 +2357,7 @@ SubBaseFolderEntryForm::OnAppControlCompleted(void) { _pFolderEntryPM->InitThumbnailManager(); } - + _pFileEventManager->RemovePath(_fileEventPath); _bBackFromAppControl = false; AppLogDebug("Exit"); } diff --git a/src/MfSubBaseMoveCopy.cpp b/src/MfSubBaseMoveCopy.cpp index 33c1840..ee2bde4 100644 --- a/src/MfSubBaseMoveCopy.cpp +++ b/src/MfSubBaseMoveCopy.cpp @@ -878,7 +878,7 @@ SubBaseMoveCopy::OnNotificationReceived(ArrayList* pArgs) if (sourceFormOption.ToInt() == SELECT_MOVE_BUTTON) { - messageBox.Construct(L"", moveFailedErrorMessage, MSGBOX_STYLE_NONE, 1000); + messageBox.Construct(L"", moveFailedErrorMessage, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); } else { @@ -964,7 +964,7 @@ SubBaseMoveCopy::OnNotificationReceived(ArrayList* pArgs) MessageBox messageBox; //messageBox.Construct(L"", L"Not enough memory.\n Delete some items and try again", MSGBOX_STYLE_NONE, 1000); - messageBox.Construct(L"", copyingFailed, MSGBOX_STYLE_NONE, 1000); + messageBox.Construct(L"", copyingFailed, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); // Call ShowAndWait - draw, show itself and process events int modalResult = 0; messageBox.ShowAndWait(modalResult); @@ -995,7 +995,7 @@ SubBaseMoveCopy::OnNotificationReceived(ArrayList* pArgs) MessageBox messageBox; //messageBox.Construct(L"", L"Not enough memory.\n Delete some items and try again", MSGBOX_STYLE_NONE, 1000); - messageBox.Construct(L"", movingFailed, MSGBOX_STYLE_NONE, 1000); + messageBox.Construct(L"", movingFailed, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); // Call ShowAndWait - draw, show itself and process events int modalResult = 0; messageBox.ShowAndWait(modalResult); @@ -1025,7 +1025,7 @@ SubBaseMoveCopy::OnNotificationReceived(ArrayList* pArgs) HideFileProgressingPopup(); MessageBox messageBox; //messageBox.Construct(L"", L"Not enough memory.\n Delete some items and try again", MSGBOX_STYLE_NONE, 1000); - messageBox.Construct(L"", storageFull, MSGBOX_STYLE_NONE, 1000); + messageBox.Construct(L"", storageFull, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); // Call ShowAndWait - draw, show itself and process events int modalResult = 0; messageBox.ShowAndWait(modalResult); diff --git a/src/MfSubFolderFileListForm.cpp b/src/MfSubFolderFileListForm.cpp index 97053ec..c2fe438 100644 --- a/src/MfSubFolderFileListForm.cpp +++ b/src/MfSubFolderFileListForm.cpp @@ -1018,30 +1018,32 @@ SubFolderFileListForm::OnNotificationReceived(Tizen::Base::Collection::ArrayList switch (pFileProcessingResult->ToInt()) { - case FILE_MANAGING_RESULT_DELETING_SUCCESS: - { - AppLogDebug("FILE DELETION SUCCESSFULL"); - HideFileProgressingPopup(); - } - break; + case FILE_MANAGING_RESULT_DELETING_SUCCESS: + { + AppLogDebug("FILE DELETION SUCCESSFULL"); + HideFileProgressingPopup(); + } + break; - case FILE_MANAGING_RESULT_DELETING_FAILED: - { - HideFileProgressingPopup(); - } - break; - case FILE_MANAGING_RESULT_THREAD_STOP: - { - HideFileProgressingPopup(); - } - break; - default: - { - //Do Nothing. - } - break; + case FILE_MANAGING_RESULT_DELETING_FAILED: + { + HideFileProgressingPopup(); + } + break; + case FILE_MANAGING_RESULT_THREAD_STOP: + { + HideFileProgressingPopup(); + } + break; + default: + { + //Do Nothing. + } + break; } + _pFolderEntryPM->InitThumbnailManager(); //for thumbnail issues/disappering images/defulat images etc... + SetFooterVisibility(DISABLE_FOOTER_ITEM); CATCH: if (pArgs != null) diff --git a/src/MfSubFolderMoveCopy.cpp b/src/MfSubFolderMoveCopy.cpp index 3865f17..57df0d8 100644 --- a/src/MfSubFolderMoveCopy.cpp +++ b/src/MfSubFolderMoveCopy.cpp @@ -1171,7 +1171,7 @@ SubFolderMoveCopy::OnNotificationReceived(ArrayList* pArgs) if (sourceFormOption.ToInt() == SELECT_MOVE_BUTTON) { - messageBox.Construct(L"", moveFailedErrorMessage, MSGBOX_STYLE_NONE, 1000); + messageBox.Construct(L"", moveFailedErrorMessage, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); } else { @@ -1294,7 +1294,7 @@ SubFolderMoveCopy::OnNotificationReceived(ArrayList* pArgs) MessageBox messageBox; //messageBox.Construct(L"", L"Not enough memory.\n Delete some items and try again", MSGBOX_STYLE_NONE, 1000); - messageBox.Construct(L"", copyingFailed, MSGBOX_STYLE_NONE, 1000); + messageBox.Construct(L"", copyingFailed, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); // Call ShowAndWait - draw, show itself and process events int modalResult = 0; messageBox.ShowAndWait(modalResult); @@ -1325,7 +1325,7 @@ SubFolderMoveCopy::OnNotificationReceived(ArrayList* pArgs) MessageBox messageBox; //messageBox.Construct(L"", L"Not enough memory.\n Delete some items and try again", MSGBOX_STYLE_NONE, 1000); - messageBox.Construct(L"", movingFailed, MSGBOX_STYLE_NONE, 1000); + messageBox.Construct(L"", movingFailed, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); // Call ShowAndWait - draw, show itself and process events int modalResult = 0; messageBox.ShowAndWait(modalResult); @@ -1355,7 +1355,7 @@ SubFolderMoveCopy::OnNotificationReceived(ArrayList* pArgs) HideFileProgressingPopup(); MessageBox messageBox; //messageBox.Construct(L"", L"Not enough memory.\n Delete some items and try again", MSGBOX_STYLE_NONE, 1000); - messageBox.Construct(L"", storageFull, MSGBOX_STYLE_NONE, 1000); + messageBox.Construct(L"", storageFull, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); // Call ShowAndWait - draw, show itself and process events int modalResult = 0; messageBox.ShowAndWait(modalResult); -- 2.7.4