NABI_Se issue fixes
authorchitta.rs <chitta.rs@samsung.com>
Sat, 29 Jun 2013 09:28:41 +0000 (14:58 +0530)
committerchitta.rs <chitta.rs@samsung.com>
Sat, 29 Jun 2013 09:28:41 +0000 (14:58 +0530)
Change-Id: I3057117f00e13b7dc8d182b321d59be796ab836e

inc/MfSubBaseFolderEntryForm.h
src/MfSearchForm.cpp
src/MfSubBaseFolderEntryForm.cpp
src/MfSubFolderFileListForm.cpp
src/MfThumbnailManager.cpp

index b75bfde..b3cb1b9 100644 (file)
@@ -598,6 +598,7 @@ protected:
        bool _bIsDirectoryEmpty;
        bool _bBackFromAppControl;
        bool _bIsDeleteFromContextSwipe;
+       bool _bIsFileEventOccured;
 
        Tizen::Base::String _fileEventPath;
        MemoryType _storageType;
index 84775f6..3bd0baf 100644 (file)
@@ -1718,12 +1718,10 @@ SearchForm::OnSceneTransitionCompleted(const Tizen::Ui::Scenes::SceneId &previou
        {
                if (previousSceneId == IDSCN_CREATE_FOLDER_FORM)
                {
-                       if (!File::IsFileExist(__pathToRename))
+                       if (File::IsFileExist(__pathToRename) == false)
                        {
-
                                if (__searchText.IsEmpty() == false)
                                        StartSearch();
-
                        }
                        else
                        {
@@ -1731,6 +1729,15 @@ SearchForm::OnSceneTransitionCompleted(const Tizen::Ui::Scenes::SceneId &previou
                        }
                }
        }
+       else
+       {
+               if (previousSceneId == IDSCN_SUB_DIRECTORY_FORM || previousSceneId == IDSCN_SUB_DIRECTORY_FORM1)
+               {
+                       AppLogDebug("FileEvent has occured");
+                       if (__searchText.IsEmpty() == false)
+                               StartSearch();
+               }
+       }
 }
 
 void
index f9a14e6..bf3b056 100644 (file)
@@ -80,6 +80,9 @@ SubBaseFolderEntryForm::SubBaseFolderEntryForm(void)
        _bIsDirectoryEmpty = false;
        _bBackFromAppControl = false;
        _bIsDeleteFromContextSwipe = false;
+       _bIsFileEventOccured = false;
+
+       _pathOfSelectedFile = L"";
 
        _flagViewAsStatus = 0;
        _indexToDelete = 0;
@@ -1591,7 +1594,6 @@ SubBaseFolderEntryForm::SubBaseOnActionPerformed(const Tizen::Ui::Control& sourc
        case IDA_DELETE_FILE:
        {
                HideDeleteConfirmationPopup();
-
                if (_pDeleteConfirmationPopUp != null)
                {
                        delete _pDeleteConfirmationPopUp;
@@ -1685,6 +1687,10 @@ SubBaseFolderEntryForm::SubBaseOnActionPerformed(const Tizen::Ui::Control& sourc
        {
                _bIsDeleteFromContextSwipe = true;
 
+               if (_pFileEventManager != null)
+               {
+                       _pFileEventManager->RemovePath(FolderNavigationPresentationModel::GetCurrentPath());
+               }
                if (_pIconListViewContextMenu != null)
                {
                        delete _pIconListViewContextMenu;
@@ -1700,6 +1706,12 @@ SubBaseFolderEntryForm::SubBaseOnActionPerformed(const Tizen::Ui::Control& sourc
 
        case IDA_ICONLISTVIEW_RENAME:
        {
+
+               if (_pFileEventManager != null)
+               {
+                       _pFileEventManager->RemovePath(FolderNavigationPresentationModel::GetCurrentPath());
+               }
+
                if (_pIconListViewContextMenu != null)
                {
                        delete _pIconListViewContextMenu;
@@ -1714,6 +1726,7 @@ SubBaseFolderEntryForm::SubBaseOnActionPerformed(const Tizen::Ui::Control& sourc
                        {
                                _currentFileName.Clear();
                                _currentFileName = pDirStr->GetFileName();
+                               _pathOfSelectedFile = pDirStr->GetFullFilePath();
                        }
                }
 
@@ -1763,6 +1776,8 @@ SubBaseFolderEntryForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::L
 
                                _currentFileName.Clear();
                                _currentFileName = pDirStr->GetFileName();
+
+                               _pathOfSelectedFile = pDirStr->GetFullFilePath();
                                _renameIndex = index;
                                _renameOrCreate = SELECT_RENAME;
                                //Load the Rename View of the item selected.
index 717b405..47e88cd 100644 (file)
@@ -323,6 +323,7 @@ SubFolderFileListForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
        String delim(L"/");
        String token;
        String displayPath;
+       ArrayList* pArgs = null;
 #if 0
        AppLogDebug("Scene History");
        bool searchHistory = CheckSearchHistory();
@@ -371,8 +372,19 @@ SubFolderFileListForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
                        }
                }
 #endif
+               if (_bIsFileEventOccured == true)
+               {
+                       //Create a dummy argument list to verify occurrence of File Event
+                       pArgs = new (std::nothrow)ArrayList();
+                       pArgs->Construct();
+
+                       _bIsFileEventOccured = false;
+               }
+
                if (pSceneManager != null)
-                       pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_SEARCH_FORM, SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
+               {
+                       pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_SEARCH_FORM, SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), pArgs);
+               }
        }
        else
        {
@@ -1041,6 +1053,7 @@ SubFolderFileListForm::OnNotificationReceived(Tizen::Base::Collection::ArrayList
                case FILE_MANAGING_RESULT_DELETING_SUCCESS:
                {
                        AppLogDebug("FILE DELETION SUCCESSFUL");
+                       _bIsFileEventOccured = true;
                        _bIsDeleteFromContextSwipe = false;
                        HideFileProgressingPopup();
                }
@@ -1337,6 +1350,11 @@ SubFolderFileListForm::OnSceneTransitionCompleted (const Tizen::Ui::Scenes::Scen
        pAppRegistry = UiApp::App::GetInstance()->GetAppRegistry();
 
        _pLongPressGestureDetector->AddLongPressGestureEventListener(*this);
+
+       if (_pathOfSelectedFile.IsEmpty() == false && File::IsFileExist(_pathOfSelectedFile) == false)
+       {
+               _bIsFileEventOccured = true;
+       }
        if (_pIconListView != null)
        {
                _pIconListView->AddGestureDetector(*_pLongPressGestureDetector);
@@ -1448,6 +1466,7 @@ SubFolderFileListForm::OnFileEventOccured(const unsigned long events,const Tizen
        bool cacheKeyStatus = false;
        String cachePath;
 
+       _bIsFileEventOccured = true;
        if ((events & FILE_EVENT_TYPE_CREATE) || (events & FILE_EVENT_TYPE_MOVED_FROM) || (events & FILE_EVENT_TYPE_MOVED_TO ))
        {
                if ( events & FILE_EVENT_TYPE_MOVED_FROM)
index 27dec86..bb78695 100644 (file)
@@ -252,8 +252,11 @@ ThumbnailManager::GetThumbnail(ThumbRequest* pRequest)
                                if (pTmpBmp)
                                {
                                        ImageBuffer::GetImageInfo(pRequest->FilePath, imgFormat, width, height);
-                                       ImgBuffer.Construct(pRequest->FilePath,width, height, IMAGE_SCALING_METHOD_FAST_BILINEAR );
+                                       r = ImgBuffer.Construct(pRequest->FilePath,width, height, IMAGE_SCALING_METHOD_FAST_BILINEAR );
+                                       TryCatch(r == E_SUCCESS, , "ImageBuffer::Construct failed");
+
                                        imgOrientation = ImgBuffer.GetExifOrientation();
+                                       TryCatch(GetLastResult() == E_SUCCESS, , "ImageBuffer::GetExifOrientation failed");
 
                                        if (imgOrientation == EXIF_ORIENTATION_RIGHT_TOP ||
                                                        imgOrientation == EXIF_ORIENTATION_TOP_RIGHT )
@@ -294,6 +297,7 @@ ThumbnailManager::GetThumbnail(ThumbRequest* pRequest)
                                else
                                {
                                        r = ImgBuffer.Construct(pRequest->FilePath,THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT, IMAGE_SCALING_METHOD_FAST_BILINEAR );
+                                       TryCatch(r == E_SUCCESS, , "ImageBuffer::Construct failed");
                                        pRequest->pBitmap = ImgBuffer.GetBitmapN(BITMAP_PIXEL_FORMAT_ARGB8888, BUFFER_SCALING_NONE);
 
                                }