From d0cfbc87091af87cb23f404914e67f25b7ce0ff1 Mon Sep 17 00:00:00 2001 From: "chitta.rs" Date: Tue, 7 May 2013 16:00:55 +0530 Subject: [PATCH] NABI_SE isues resolved Change-Id: I8654bab053d5d3ae5f711804341e465747db1da9 --- inc/MfSubBaseFolderEntryForm.h | 2 +- src/AppResourceId.cpp | 114 +++++++++++++++++++++++++++++++++++ src/MfCategorySearch.cpp | 9 ++- src/MfSplitPanelForm.cpp | 31 ++-------- src/MfSubBaseFolderEntryForm.cpp | 36 +++++++---- src/MfSubBaseMoveCopy.cpp | 7 ++- src/MfSubBaseSelectionForm.cpp | 2 +- src/MfSubFolderFileListForm.cpp | 50 ++++----------- src/MfSubFolderMoveCopy.cpp | 5 +- src/MfSubFolderSelection.cpp | 17 ++++-- src/MfTopLevelFolderFileListForm.cpp | 5 ++ src/MfTopMostFolderFileListForm.cpp | 41 +++---------- 12 files changed, 193 insertions(+), 126 deletions(-) diff --git a/inc/MfSubBaseFolderEntryForm.h b/inc/MfSubBaseFolderEntryForm.h index 9cf45cd..e928ee3 100644 --- a/inc/MfSubBaseFolderEntryForm.h +++ b/inc/MfSubBaseFolderEntryForm.h @@ -397,7 +397,7 @@ protected: * @param No parameters * @return Void return type */ - void SetFooterVisibility(int mode); + void SetFooterVisibility(void); /* * A protected member function taking and returning no arguments. diff --git a/src/AppResourceId.cpp b/src/AppResourceId.cpp index 1cc70d3..a52641b 100644 --- a/src/AppResourceId.cpp +++ b/src/AppResourceId.cpp @@ -15,3 +15,117 @@ const wchar_t* IDL_SUB_FOLDER_MOVE_COPY = L"IDL_SUB_FOLDER_MOVE_COPY"; const wchar_t* IDL_TOP_LEVEL_DIRECTORY_COPY_MOVE = L"IDL_TOP_LEVEL_DIRECTORY_COPY_MOVE"; const wchar_t* IDL_TOP_MOST_FILE_SELECTION = L"IDL_TOP_MOST_FILE_SELECTION"; const wchar_t* IDL_TOP_MOST_MOVE_COPY = L"IDL_TOP_MOST_MOVE_COPY"; +const wchar_t* IDS_BYTES = L"IDS_BYTES"; +const wchar_t* IDS_CANNOT_COPY = L"IDS_CANNOT_COPY"; +const wchar_t* IDS_COM_BODY_B = L"IDS_COM_BODY_B"; +const wchar_t* IDS_COM_BODY_BLUETOOTH = L"IDS_COM_BODY_BLUETOOTH"; +const wchar_t* IDS_COM_BODY_CLOSE = L"IDS_COM_BODY_CLOSE"; +const wchar_t* IDS_COM_BODY_CREATE_FOLDER = L"IDS_COM_BODY_CREATE_FOLDER"; +const wchar_t* IDS_COM_BODY_DONE = L"IDS_COM_BODY_DONE"; +const wchar_t* IDS_COM_BODY_EMAIL = L"IDS_COM_BODY_EMAIL"; +const wchar_t* IDS_COM_BODY_EMAIL_SIZE = L"IDS_COM_BODY_EMAIL_SIZE"; +const wchar_t* IDS_COM_BODY_FOLDERS = L"IDS_COM_BODY_FOLDERS"; +const wchar_t* IDS_COM_BODY_FORMAT = L"IDS_COM_BODY_FORMAT"; +const wchar_t* IDS_COM_BODY_GB = L"IDS_COM_BODY_GB"; +const wchar_t* IDS_COM_BODY_KB = L"IDS_COM_BODY_KB"; +const wchar_t* IDS_COM_BODY_LOCATION = L"IDS_COM_BODY_LOCATION"; +const wchar_t* IDS_COM_BODY_MB = L"IDS_COM_BODY_MB"; +const wchar_t* IDS_COM_BODY_MESSAGE = L"IDS_COM_BODY_MESSAGE"; +const wchar_t* IDS_COM_BODY_MORE = L"IDS_COM_BODY_MORE"; +const wchar_t* IDS_COM_BODY_MY_FILES = L"IDS_COM_BODY_MY_FILES"; +const wchar_t* IDS_COM_BODY_NO_FILES = L"IDS_COM_BODY_NO_FILES"; +const wchar_t* IDS_COM_BODY_NO_IMAGES = L"IDS_COM_BODY_NO_IMAGES"; +const wchar_t* IDS_COM_BODY_NO_ITEMS = L"IDS_COM_BODY_NO_ITEMS"; +const wchar_t* IDS_COM_BODY_REPLACE_ABB = L"IDS_COM_BODY_REPLACE_ABB"; +const wchar_t* IDS_COM_BODY_SELECTED = L"IDS_COM_BODY_SELECTED"; +const wchar_t* IDS_COM_BODY_SELECTED_DATA_NOT_FOUND = L"IDS_COM_BODY_SELECTED_DATA_NOT_FOUND"; +const wchar_t* IDS_COM_BODY_SELECT_ALL = L"IDS_COM_BODY_SELECT_ALL"; +const wchar_t* IDS_COM_BODY_SIZE = L"IDS_COM_BODY_SIZE"; +const wchar_t* IDS_COM_BODY_USB = L"IDS_COM_BODY_USB"; +const wchar_t* IDS_COM_BUTTON_SHARE = L"IDS_COM_BUTTON_SHARE"; +const wchar_t* IDS_COM_BUTTON_SHARE1 = L"IDS_COM_BUTTON_SHARE1"; +const wchar_t* IDS_COM_OPT1_WI_FI_DIRECT = L"IDS_COM_OPT1_WI_FI_DIRECT"; +const wchar_t* IDS_COM_OPT_FILES = L"IDS_COM_OPT_FILES"; +const wchar_t* IDS_COM_OPT_IMPORT = L"IDS_COM_OPT_IMPORT"; +const wchar_t* IDS_COM_OPT_LIST = L"IDS_COM_OPT_LIST"; +const wchar_t* IDS_COM_OPT_SAVE = L"IDS_COM_OPT_SAVE"; +const wchar_t* IDS_COM_POP_ATTACH = L"IDS_COM_POP_ATTACH"; +const wchar_t* IDS_COM_POP_CANCEL = L"IDS_COM_POP_CANCEL"; +const wchar_t* IDS_COM_POP_DELETE_Q = L"IDS_COM_POP_DELETE_Q"; +const wchar_t* IDS_COM_POP_DELETING = L"IDS_COM_POP_DELETING"; +const wchar_t* IDS_COM_POP_FOLDER = L"IDS_COM_POP_FOLDER"; +const wchar_t* IDS_COM_POP_INVALID_CHARACTERS = L"IDS_COM_POP_INVALID_CHARACTERS"; +const wchar_t* IDS_COM_POP_MAXIMUM_NUMBER_OF_CHARACTERS_REACHED = L"IDS_COM_POP_MAXIMUM_NUMBER_OF_CHARACTERS_REACHED"; +const wchar_t* IDS_COM_POP_MOVING = L"IDS_COM_POP_MOVING"; +const wchar_t* IDS_COM_POP_MOVING_FAILED = L"IDS_COM_POP_MOVING_FAILED"; +const wchar_t* IDS_COM_POP_SEARCHING = L"IDS_COM_POP_SEARCHING"; +const wchar_t* IDS_COM_SK_NO = L"IDS_COM_SK_NO"; +const wchar_t* IDS_COM_SK_YES = L"IDS_COM_SK_YES"; +const wchar_t* IDS_CONFIRM_DELETE = L"IDS_CONFIRM_DELETE"; +const wchar_t* IDS_COPY_FAILED_MESSAGE = L"IDS_COPY_FAILED_MESSAGE"; +const wchar_t* IDS_CREATE_FOLDER_FAILED = L"IDS_CREATE_FOLDER_FAILED"; +const wchar_t* IDS_EXPORT = L"IDS_EXPORT"; +const wchar_t* IDS_EXPORT_HERE = L"IDS_EXPORT_HERE"; +const wchar_t* IDS_IDLE_BODY_RESOLUTION = L"IDS_IDLE_BODY_RESOLUTION"; +const wchar_t* IDS_ITEM_COUNT = L"IDS_ITEM_COUNT"; +const wchar_t* IDS_MF_BODY_CONTAINS = L"IDS_MF_BODY_CONTAINS"; +const wchar_t* IDS_MF_BODY_CREATED_DATE = L"IDS_MF_BODY_CREATED_DATE"; +const wchar_t* IDS_MF_BODY_DIRECTORY = L"IDS_MF_BODY_DIRECTORY"; +const wchar_t* IDS_MF_BODY_DOCUMENT = L"IDS_MF_BODY_DOCUMENT"; +const wchar_t* IDS_MF_BODY_DOWNLOADS = L"IDS_MF_BODY_DOWNLOADS"; +const wchar_t* IDS_MF_BODY_FOLDER_NAME = L"IDS_MF_BODY_FOLDER_NAME"; +const wchar_t* IDS_MF_BODY_IMAGES = L"IDS_MF_BODY_IMAGES"; +const wchar_t* IDS_MF_BODY_LIST_AND_DETAILS_ABB = L"IDS_MF_BODY_LIST_AND_DETAILS_ABB"; +const wchar_t* IDS_MF_BODY_OTHERS = L"IDS_MF_BODY_OTHERS"; +const wchar_t* IDS_MF_BODY_RENAME_ABB = L"IDS_MF_BODY_RENAME_ABB"; +const wchar_t* IDS_MF_BODY_SOUNDS = L"IDS_MF_BODY_SOUNDS"; +const wchar_t* IDS_MF_BODY_TYPE = L"IDS_MF_BODY_TYPE"; +const wchar_t* IDS_MF_BODY_VIDEOS = L"IDS_MF_BODY_VIDEOS"; +const wchar_t* IDS_MF_BUTTON_HOME = L"IDS_MF_BUTTON_HOME"; +const wchar_t* IDS_MF_BUTTON_SEARCH_ALL_FOLDERS = L"IDS_MF_BUTTON_SEARCH_ALL_FOLDERS"; +const wchar_t* IDS_MF_OPT_CREATE_FOLDER = L"IDS_MF_OPT_CREATE_FOLDER"; +const wchar_t* IDS_MF_OPT_CREATE_FOLDER1 = L"IDS_MF_OPT_CREATE_FOLDER1"; +const wchar_t* IDS_MF_OPT_DATE_HMOST_RECENT = L"IDS_MF_OPT_DATE_HMOST_RECENT"; +const wchar_t* IDS_MF_OPT_DATE_HOLDEST = L"IDS_MF_OPT_DATE_HOLDEST"; +const wchar_t* IDS_MF_OPT_HIDE_FILE_EXTENSION_ABB = L"IDS_MF_OPT_HIDE_FILE_EXTENSION_ABB"; +const wchar_t* IDS_MF_OPT_LISTBY_NAME = L"IDS_MF_OPT_LISTBY_NAME"; +const wchar_t* IDS_MF_OPT_NAME_HA_TO_Z = L"IDS_MF_OPT_NAME_HA_TO_Z"; +const wchar_t* IDS_MF_OPT_NAME_HZ_TO_A = L"IDS_MF_OPT_NAME_HZ_TO_A"; +const wchar_t* IDS_MF_OPT_SHOW_FILE_EXTENSION = L"IDS_MF_OPT_SHOW_FILE_EXTENSION"; +const wchar_t* IDS_MF_OPT_THUMBNAIL_VIEW = L"IDS_MF_OPT_THUMBNAIL_VIEW"; +const wchar_t* IDS_MF_OPT_VIEW_AS = L"IDS_MF_OPT_VIEW_AS"; +const wchar_t* IDS_MF_POP_COPYING = L"IDS_MF_POP_COPYING"; +const wchar_t* IDS_MF_POP_DELETE_FAILED = L"IDS_MF_POP_DELETE_FAILED"; +const wchar_t* IDS_MF_POP_RENAMING = L"IDS_MF_POP_RENAMING"; +const wchar_t* IDS_MF_POP_SAME_NAME_ALREADY_IN_USE = L"IDS_MF_POP_SAME_NAME_ALREADY_IN_USE"; +const wchar_t* IDS_MF_POP_UNABLE_TO_COPY_DESTINATION_FOLDER_SAME_AS_SOURCE_FOLDER = L"IDS_MF_POP_UNABLE_TO_COPY_DESTINATION_FOLDER_SAME_AS_SOURCE_FOLDER"; +const wchar_t* IDS_MF_POP_UNABLE_TO_MOVE_DESTINATION_FOLDER_SAME_AS_SOURCE_FOLDER = L"IDS_MF_POP_UNABLE_TO_MOVE_DESTINATION_FOLDER_SAME_AS_SOURCE_FOLDER"; +const wchar_t* IDS_MF_SK3_COPY = L"IDS_MF_SK3_COPY"; +const wchar_t* IDS_MF_SK3_DELETE = L"IDS_MF_SK3_DELETE"; +const wchar_t* IDS_MF_SK3_DELETE1 = L"IDS_MF_SK3_DELETE1"; +const wchar_t* IDS_MF_SK3_EDIT = L"IDS_MF_SK3_EDIT"; +const wchar_t* IDS_MF_SK3_MOVE = L"IDS_MF_SK3_MOVE"; +const wchar_t* IDS_MF_SK3_MOVE_HERE = L"IDS_MF_SK3_MOVE_HERE"; +const wchar_t* IDS_MF_SK3_PASTE_HERE = L"IDS_MF_SK3_PASTE_HERE"; +const wchar_t* IDS_MF_SK3_PASTE_HERE1 = L"IDS_MF_SK3_PASTE_HERE1"; +const wchar_t* IDS_MF_SK3_PASTE_HERE2 = L"IDS_MF_SK3_PASTE_HERE2"; +const wchar_t* IDS_MF_SK3_SEARCH = L"IDS_MF_SK3_SEARCH"; +const wchar_t* IDS_MF_SK3_SORT_BY = L"IDS_MF_SK3_SORT_BY"; +const wchar_t* IDS_MF_SK3_SORT_BY1 = L"IDS_MF_SK3_SORT_BY1"; +const wchar_t* IDS_MF_SK_DETAILS = L"IDS_MF_SK_DETAILS"; +const wchar_t* IDS_MF_TAB_EXTERNAL_STORAGE = L"IDS_MF_TAB_EXTERNAL_STORAGE"; +const wchar_t* IDS_MF_TAB_EXTERNAL_STORAGE1 = L"IDS_MF_TAB_EXTERNAL_STORAGE1"; +const wchar_t* IDS_MF_TAB_MEMORY_CARD = L"IDS_MF_TAB_MEMORY_CARD"; +const wchar_t* IDS_MF_TAB_PHONE = L"IDS_MF_TAB_PHONE"; +const wchar_t* IDS_MF_TAB_UP = L"IDS_MF_TAB_UP"; +const wchar_t* IDS_MORE = L"IDS_MORE"; +const wchar_t* IDS_NAME_CANT_EMPTY = L"IDS_NAME_CANT_EMPTY"; +const wchar_t* IDS_No = L"IDS_No"; +const wchar_t* IDS_RENAME_FAILED = L"IDS_RENAME_FAILED"; +const wchar_t* IDS_SEARCH_STRING_CANNOT_BE_EMPTY = L"IDS_SEARCH_STRING_CANNOT_BE_EMPTY"; +const wchar_t* IDS_SELECT_FILES = L"IDS_SELECT_FILES"; +const wchar_t* IDS_SHARE_VIA_EMAIL = L"IDS_SHARE_VIA_EMAIL"; +const wchar_t* IDS_STORAGE_FULL = L"IDS_STORAGE_FULL"; +const wchar_t* IDS_STRING1 = L"IDS_STRING1"; +const wchar_t* IDS_THUMBNAILS = L"IDS_THUMBNAILS"; +const wchar_t* IDS_YES = L"IDS_YES"; diff --git a/src/MfCategorySearch.cpp b/src/MfCategorySearch.cpp index 5ecc625..4f6d0b3 100644 --- a/src/MfCategorySearch.cpp +++ b/src/MfCategorySearch.cpp @@ -398,10 +398,13 @@ CategorySearch::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousScen void CategorySearch::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId) { - if(_pFileEventManager != null) - _pFileEventManager->RemovePath(_pathOfSelectedFile); - DeviceManager::RemoveAllDeviceEventListeners(); + if (_pFileEventManager != null) + { + _pFileEventManager->RemovePath(_pathOfSelectedFile); + delete _pFileEventManager; + _pFileEventManager = null; + } if (_pIconListView != null) { diff --git a/src/MfSplitPanelForm.cpp b/src/MfSplitPanelForm.cpp index 4060e01..3b781ad 100644 --- a/src/MfSplitPanelForm.cpp +++ b/src/MfSplitPanelForm.cpp @@ -582,14 +582,7 @@ SplitPanelForm::RefreshIconListView(DirectoryEntry* pDirStr) _pFolderEntryPM->InitThumbnailManager(); _pFilenames = _pFolderEntryPM->GetFolderEntryList(); TryCatch(_pFilenames != null, , "MfMyFilesApp::Failed to allocate Memory to Filenames ArrayList"); - if (_pFilenames->GetCount() == 0) - { - SetFooterVisibility(DISABLE_FOOTER_ITEM); - } - else - { - SetFooterVisibility(ENABLE_FOOTER_ITEM); - } + SetFooterVisibility(); } } } @@ -648,7 +641,8 @@ SplitPanelForm::ShowParentDirectoryView(void) _pFolderEntryPM->InitThumbnailManager(); } - SetFooterVisibility(ENABLE_FOOTER_ITEM); + SetFooterVisibility(); + if (_pFooter != null) { _pFooter->RequestRedraw(true); @@ -763,24 +757,7 @@ SplitPanelForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& _pThumbnailItemProvider->SetCreateItemSource(sourceForm); } - //update footer - if (_pFilenames->GetCount() == 0) - { - SetFooterVisibility(DISABLE_FOOTER_ITEM); - } - else - { - SetFooterVisibility(ENABLE_FOOTER_ITEM); - - if (fileCount == 0) - { - _pFooter = GetFooter(); - if (_pFooter) - { - _pFooter->SetItemEnabled(1, false); - } - } - } + SetFooterVisibility(); //update directorytree DirectoryEntry* pRootDirectory = new (std::nothrow) DirectoryEntry(); diff --git a/src/MfSubBaseFolderEntryForm.cpp b/src/MfSubBaseFolderEntryForm.cpp index 55c802d..b3b00a3 100644 --- a/src/MfSubBaseFolderEntryForm.cpp +++ b/src/MfSubBaseFolderEntryForm.cpp @@ -166,6 +166,11 @@ SubBaseFolderEntryForm::~SubBaseFolderEntryForm(void) { delete _pFileEventManager; } + + if (_pIconListViewContextMenu != null) + { + delete _pIconListViewContextMenu; + } } SubBaseFolderEntryForm& @@ -1136,7 +1141,7 @@ SubBaseFolderEntryForm::OnIconListViewItemStateChangeNotify() void SubBaseFolderEntryForm::OnFooterStateChangeNotify(void) { - SetFooterVisibility(DISABLE_FOOTER_ITEM); + SetFooterVisibility(); _pFooter = GetFooter(); if (_pFooter != null) @@ -2119,7 +2124,7 @@ SubBaseFolderEntryForm::SetDefaultSelectionForViewAsPopUp(void) void -SubBaseFolderEntryForm::SetFooterVisibility(int mode) +SubBaseFolderEntryForm::SetFooterVisibility(void) { AppLogDebug("Entry"); int folderCount=0, fileCount=0; @@ -2129,20 +2134,23 @@ SubBaseFolderEntryForm::SetFooterVisibility(int mode) if( _pFolderEntryPM ) _pFolderEntryPM->GetFolderEntryCount(FolderNavigationPresentationModel::GetCurrentPath(), folderCount, fileCount); - if (mode == DISABLE_FOOTER_ITEM) + if (folderCount ==0 && fileCount == 0) { - if (folderCount ==0 && fileCount == 0) - _pFooter->SetItemEnabled(0, false); - if (fileCount == 0 ) - _pFooter->SetItemEnabled(1, false); + _pFooter->SetItemEnabled(0, false); } else { - if(folderCount!=0 || fileCount!=0) - _pFooter->SetItemEnabled(0, true); - if (fileCount!=0) - _pFooter->SetItemEnabled(1, true); + _pFooter->SetItemEnabled(0, true); + } + if (fileCount == 0 ) + { + _pFooter->SetItemEnabled(1, false); } + else + { + _pFooter->SetItemEnabled(1, true); + } + _pFooter->Invalidate(true); } @@ -2272,7 +2280,8 @@ SubBaseFolderEntryForm::ShowIconListViewContextMenu(void) Header* pHeader = GetHeader(); headerHeight = pHeader->GetHeight(); - y_Anchor_Position = _currentPosition.y + headerHeight + H_DISPLAY_PATH_LABEL; + + y_Anchor_Position = _currentPosition.y + headerHeight + H_DISPLAY_PATH_LABEL + 60; if (_bIsTopLevelDirectory) { @@ -2338,7 +2347,8 @@ SubBaseFolderEntryForm::OnAppControlCompleted(void) // // _pFolderEntryPM->GetFolderEntryCount(FolderNavigationPresentationModel::GetCurrentPath(),folderCount, fileCount); - SetFooterVisibility(ENABLE_FOOTER_ITEM); +// SetFooterVisibility(ENABLE_FOOTER_ITEM); + SetFooterVisibility(); if( !_bBackFromAppControl ) return; diff --git a/src/MfSubBaseMoveCopy.cpp b/src/MfSubBaseMoveCopy.cpp index ee2bde4..6d1b98b 100644 --- a/src/MfSubBaseMoveCopy.cpp +++ b/src/MfSubBaseMoveCopy.cpp @@ -872,9 +872,10 @@ SubBaseMoveCopy::OnNotificationReceived(ArrayList* pArgs) HideFileProgressingPopup(); MessageBox messageBox; String moveFailedErrorMessage; - AppResource::GetInstance()->GetString(L"IDS_MF_POP_UNABLE_TO_MOVE_DESTINATION_FOLDER_SAME_AS_SOURCE_FOLDER", moveFailedErrorMessage); + String copyFailedErrorMessage; - AppLogDebug("Move failed Error : %S" , moveFailedErrorMessage.GetPointer()); + AppResource::GetInstance()->GetString(L"IDS_MF_POP_UNABLE_TO_MOVE_DESTINATION_FOLDER_SAME_AS_SOURCE_FOLDER", moveFailedErrorMessage); + AppResource::GetInstance()->GetString(L"IDS_MF_POP_UNABLE_TO_COPY_DESTINATION_FOLDER_SAME_AS_SOURCE_FOLDER", copyFailedErrorMessage); if (sourceFormOption.ToInt() == SELECT_MOVE_BUTTON) { @@ -882,7 +883,7 @@ SubBaseMoveCopy::OnNotificationReceived(ArrayList* pArgs) } else { - messageBox.Construct(L"", L"Cannot Copy: The Destination and the source are the same", MSGBOX_STYLE_NONE, 1000); + messageBox.Construct(L"", copyFailedErrorMessage, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); } // Call ShowAndWait - draw, show itself and process events diff --git a/src/MfSubBaseSelectionForm.cpp b/src/MfSubBaseSelectionForm.cpp index 4879419..bc73581 100644 --- a/src/MfSubBaseSelectionForm.cpp +++ b/src/MfSubBaseSelectionForm.cpp @@ -777,7 +777,7 @@ SubBaseSelection::OnFormBackRequested(Form& source) { if (_pAudioPlayer->GetState() == PLAYER_STATE_PLAYING) { - _pAudioPlayer->Stop(); + _pAudioPlayer->Stop(); } } if (currentPath == BasePresentationModel::GetMediaPath() || currentPath == BasePresentationModel::GetSdCardPath()) diff --git a/src/MfSubFolderFileListForm.cpp b/src/MfSubFolderFileListForm.cpp index 0e6c3c8..cb9fc5f 100644 --- a/src/MfSubFolderFileListForm.cpp +++ b/src/MfSubFolderFileListForm.cpp @@ -554,6 +554,7 @@ SubFolderFileListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ __currentDirectoryPath = FolderNavigationPresentationModel::GetCurrentPath(); parentPath.Append(__currentDirectoryPath); + SetNextDisplayPath(); SetHeaderTitleText(__currentDirectoryPath); @@ -908,15 +909,9 @@ SubFolderFileListForm::ShowParentDirectoryView(void) backUpCurrentPath = FolderNavigationPresentationModel::GetCurrentPath(); -// if(backUpCurrentPath == BasePresentationModel::GetMediaPath() || backUpCurrentPath == BasePresentationModel::GetSdCardPath()) -// { - // return; - // } - displayPath = defaultPhoneBody; displayPath.Append("/"); - //SetFooterVisibility(ENABLE_FOOTER_ITEM); if (backUpCurrentPath == BasePresentationModel::GetMediaPath() || backUpCurrentPath == BasePresentationModel::GetSdCardPath() || backUpCurrentPath == BasePresentationModel::GetUsbPath()) { @@ -952,17 +947,7 @@ SubFolderFileListForm::ShowParentDirectoryView(void) SetParentDisplayPath(); SetHeaderTitleText(ParentPath); - SetFooterVisibility(ENABLE_FOOTER_ITEM); - if (fileCount == 0) - { - _pFooter = GetFooter(); - if (_pFooter) - { - _pFooter->SetItemEnabled(1, false); - _pFooter->Invalidate(true); - } - } //Remove the current files from the filenames list if (_pFolderEntryPM != null) { @@ -974,15 +959,12 @@ SubFolderFileListForm::ShowParentDirectoryView(void) sourceForm = _pFolderEntryPM->GetSourceForm(); AppLogDebug("Current Source Form is : %d",sourceForm); - /*if ( sourceForm == CREATE_ITEM_SOURCE_SUB_FOLDER_FILE_LIST ) - _pFolderEntryPM->SetSourceForm(CREATE_ITEM_SOURCE_SUB_FOLDER_FILE_LIST_TWO); - else - _pFolderEntryPM->SetSourceForm(CREATE_ITEM_SOURCE_SUB_FOLDER_FILE_LIST);*/ - _pFolderEntryPM->InitThumbnailManager(); } + SetFooterVisibility(); + //Get the files in the parent path of the current view //Update the icon list to view the files of the parent directory @@ -1021,7 +1003,7 @@ SubFolderFileListForm::OnNotificationReceived(Tizen::Base::Collection::ArrayList { case FILE_MANAGING_RESULT_DELETING_SUCCESS: { - AppLogDebug("FILE DELETION SUCCESSFULL"); + AppLogDebug("FILE DELETION SUCCESSFUL"); HideFileProgressingPopup(); } break; @@ -1045,7 +1027,7 @@ SubFolderFileListForm::OnNotificationReceived(Tizen::Base::Collection::ArrayList _pFolderEntryPM->InitThumbnailManager(); //for thumbnail issues/disappering images/defulat images etc... - SetFooterVisibility(DISABLE_FOOTER_ITEM); + SetFooterVisibility(); CATCH: if (pArgs != null) { @@ -1357,6 +1339,9 @@ SubFolderFileListForm::OnSceneTransitionCompleted (const Tizen::Ui::Scenes::Scen if (_pIconListView != null && _pIconListView->IsVisible()) _pIconListView->RefreshList(_renameIndex, LIST_REFRESH_TYPE_ITEM_MODIFY); } + + SetFooterVisibility(); + return; } } @@ -1368,28 +1353,15 @@ SubFolderFileListForm::OnSceneTransitionCompleted (const Tizen::Ui::Scenes::Scen SwitchViewType(); - if (_pFilenames != null && _pFilenames->GetCount() == 0) + SetFooterVisibility(); + + if (_pFilenames->GetCount() == 0) { _bIsDirectoryEmpty = true; - - SetFooterVisibility(DISABLE_FOOTER_ITEM); - } else { _bIsDirectoryEmpty = false; - - SetFooterVisibility(ENABLE_FOOTER_ITEM); - - if (fileCount == 0) - { - _pFooter = GetFooter(); - if (_pFooter) - { - _pFooter->SetItemEnabled(1, false); - _pFooter->Invalidate(true); - } - } } if (_pFolderEntryPM != null) diff --git a/src/MfSubFolderMoveCopy.cpp b/src/MfSubFolderMoveCopy.cpp index 57df0d8..838a093 100644 --- a/src/MfSubFolderMoveCopy.cpp +++ b/src/MfSubFolderMoveCopy.cpp @@ -1167,7 +1167,10 @@ SubFolderMoveCopy::OnNotificationReceived(ArrayList* pArgs) HideFileProgressingPopup(); MessageBox messageBox; String moveFailedErrorMessage; + String copyFailedErrorMessage; + AppResource::GetInstance()->GetString(L"IDS_MF_POP_UNABLE_TO_MOVE_DESTINATION_FOLDER_SAME_AS_SOURCE_FOLDER", moveFailedErrorMessage); + AppResource::GetInstance()->GetString(L"IDS_MF_POP_UNABLE_TO_COPY_DESTINATION_FOLDER_SAME_AS_SOURCE_FOLDER", copyFailedErrorMessage); if (sourceFormOption.ToInt() == SELECT_MOVE_BUTTON) { @@ -1175,7 +1178,7 @@ SubFolderMoveCopy::OnNotificationReceived(ArrayList* pArgs) } else { - messageBox.Construct(L"", L"Cannot Copy: The Destination and the source are the same", MSGBOX_STYLE_NONE, 1000); + messageBox.Construct(L"", copyFailedErrorMessage, MSGBOX_STYLE_NONE, ID_MESSAGE_BOX_TIMEOUT_ONE_SECOND); } // Call ShowAndWait - draw, show itself and process events diff --git a/src/MfSubFolderSelection.cpp b/src/MfSubFolderSelection.cpp index 873835c..0da4f12 100644 --- a/src/MfSubFolderSelection.cpp +++ b/src/MfSubFolderSelection.cpp @@ -69,6 +69,7 @@ SubFolderSelection::~SubFolderSelection(void) } if (__pFileEventManager != null) { + __pFileEventManager->RemovePath(_rootMediaPath); delete __pFileEventManager; } } @@ -274,10 +275,10 @@ SubFolderSelection::OnInitializing(void) if (_currentViewStyle != APPCONTROL_VIEW_EXPORT) { - _pFolderEntryPM->SetFolderEntryType(_currentFileType); - _pFolderEntryPM->SetFolderEntryPath(_rootMediaPath); - _pFilenames = _pFolderEntryPM->GetFolderEntryList(); - TryCatch(_pFilenames != null, , "MfMyFilesApp::Failed to allocate Memory to Filenames ArrayList"); + _pFolderEntryPM->SetFolderEntryType(_currentFileType); + _pFolderEntryPM->SetFolderEntryPath(_rootMediaPath); + _pFilenames = _pFolderEntryPM->GetFolderEntryList(); + TryCatch(_pFilenames != null, , "MfMyFilesApp::Failed to allocate Memory to Filenames ArrayList"); } _pThumbnailManager = ThumbnailManager::GetInstance(); @@ -661,6 +662,8 @@ SubFolderSelection::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& current if(__pFileEventManager != null) { __pFileEventManager->RemovePath(_rootMediaPath); + delete __pFileEventManager; + __pFileEventManager = null; } } @@ -1122,7 +1125,7 @@ SubFolderSelection::OnSceneTransitionCompleted (const Tizen::Ui::Scenes::SceneId __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 ); + r = __pFileEventManager->AddPath(_rootMediaPath, FILE_EVENT_TYPE_ATTRIBUTE | FILE_EVENT_TYPE_MOVED_TO | FILE_EVENT_TYPE_DELETE | FILE_EVENT_TYPE_CREATE ); AppLogDebug("Result is %s",GetErrorMessage(r)); #if 0 @@ -1287,7 +1290,7 @@ SubFolderSelection::OnFileEventOccured(const unsigned long events,const Tizen::B { AppLogDebug("SubFolderSelection::OnFileEventOccured:%S", path.GetPointer()); - if ((events & FILE_EVENT_TYPE_ATTRIBUTE) || (events & FILE_EVENT_TYPE_DELETE) || (events & FILE_EVENT_TYPE_MOVED_TO )) + if ((events & FILE_EVENT_TYPE_ATTRIBUTE) || (events & FILE_EVENT_TYPE_DELETE) || (events & FILE_EVENT_TYPE_MOVED_TO ) || (events & FILE_EVENT_TYPE_CREATE)) { if (_pFolderEntryPM!=null) { @@ -1299,6 +1302,8 @@ SubFolderSelection::OnFileEventOccured(const unsigned long events,const Tizen::B _pListView->UpdateList(); } + ResetFooter(); + if (_pFolderEntryPM!=null) { AppLogDebug("inside file event"); diff --git a/src/MfTopLevelFolderFileListForm.cpp b/src/MfTopLevelFolderFileListForm.cpp index 0e5edbb..c64ac07 100644 --- a/src/MfTopLevelFolderFileListForm.cpp +++ b/src/MfTopLevelFolderFileListForm.cpp @@ -310,6 +310,11 @@ TopLevelFolderFileListForm::OnDeviceStateChanged(Tizen::System::DeviceType devic } + if (_pIconListViewContextMenu != null) + { + _pIconListViewContextMenu->SetShowState(false); + } + switch (deviceType) { case StorageCard: diff --git a/src/MfTopMostFolderFileListForm.cpp b/src/MfTopMostFolderFileListForm.cpp index c2b8734..1d80d61 100644 --- a/src/MfTopMostFolderFileListForm.cpp +++ b/src/MfTopMostFolderFileListForm.cpp @@ -394,14 +394,8 @@ TopMostFolderFileListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& p _pFilenames = _pFolderEntryPM->GetFolderEntryList(); TryCatch(_pFilenames != null, , "Failed to allocate Memory to Filenames ArrayList"); - if (_pFilenames->GetCount() == 0) - { - SetFooterVisibility(DISABLE_FOOTER_ITEM); - } - else - { - SetFooterVisibility(ENABLE_FOOTER_ITEM); - } + SetFooterVisibility(); + AppLogDebug("EXIT: r = %s", GetErrorMessage(r)); if (pArgs != null) @@ -652,14 +646,9 @@ TopMostFolderFileListForm::OnActionPerformed(const Tizen::Ui::Control& source, i FolderNavigationPresentationModel::SetCurrentFilePath(mediaPath); FolderNavigationPresentationModel::SetStorageType(MEMORY_TYPE_PHONE); - if (_pFilenames != null && _pFilenames->GetCount() == 0) - { - SetFooterVisibility(DISABLE_FOOTER_ITEM); - } - else - { - SetFooterVisibility(ENABLE_FOOTER_ITEM); - } + + SetFooterVisibility(); + //Invalidate(true); } if (_pFolderEntryPM != null) @@ -695,14 +684,9 @@ TopMostFolderFileListForm::OnActionPerformed(const Tizen::Ui::Control& source, i _pFolderEntryPM->SetFolderEntryPath(storagePath); _pFilenames = _pFolderEntryPM->GetFolderEntryList(); - if (_pFilenames->GetCount() == 0) - { - SetFooterVisibility(DISABLE_FOOTER_ITEM); - } - else - { - SetFooterVisibility(ENABLE_FOOTER_ITEM); - } + + SetFooterVisibility(); + if (_pListView != null && _pListView->IsVisible()) { _pListView->ScrollToItem(0); @@ -765,14 +749,7 @@ TopMostFolderFileListForm::OnActionPerformed(const Tizen::Ui::Control& source, i _pIconListView->UpdateList(); } - if (_pFilenames->GetCount() == 0) - { - SetFooterVisibility(DISABLE_FOOTER_ITEM); - } - else - { - SetFooterVisibility(ENABLE_FOOTER_ITEM); - } + SetFooterVisibility(); FolderNavigationPresentationModel::SetCurrentFilePath(usbPath); FolderNavigationPresentationModel::SetStorageType(MEMORY_TYPE_EXTERNAL); -- 2.7.4