NABI_SE issues resolved
authorchitta.rs <chitta.rs@samsung.com>
Fri, 24 May 2013 08:41:15 +0000 (14:11 +0530)
committerchitta.rs <chitta.rs@samsung.com>
Fri, 24 May 2013 08:41:15 +0000 (14:11 +0530)
Change-Id: I9b2c62dafba7a10f93fd66870dd75f79f01b4ab3

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

index 41770d6..ae470dd 100644 (file)
@@ -176,6 +176,7 @@ private:
        Tizen::Base::Collection::ArrayList* __pContentListFromLastView;\r
        Tizen::Base::Collection::ArrayList* __pSearchedContentList;\r
        Tizen::Base::String __currentSearchDirectoryPath;\r
+       Tizen::Base::String __directoryForFileEvent;\r
        Tizen::Base::String __fileToDelete;\r
        Tizen::Base::String __searchText;\r
        Tizen::Base::String __previousFormPath;\r
index 36b11cb..eff08a4 100644 (file)
@@ -52,6 +52,7 @@ SearchForm::SearchForm(void)
 
        __searchText = L"";
        __currentSearchDirectoryPath = L"";
+       __directoryForFileEvent = L"";
        __bIsResultList = false;
 
        __searchedAllFolders = false;
@@ -426,7 +427,7 @@ SearchForm::TransitionScene(void)
        }
 
        if(__pFileEventManager != null)
-               __pFileEventManager->RemovePath(__currentSearchDirectoryPath);
+               __pFileEventManager->RemovePath(__directoryForFileEvent);
 
 //     pSceneManager->GoBackward(BackwardSceneTransition(__previousSceneId, SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
 
@@ -542,7 +543,17 @@ SearchForm::OnListViewItemStateChanged(ListView& listView, int index, int elemen
                                if (pCustomAppControl != null)
                                {
                                        pCustomAppControl->SetAppControlListener(this);
-                                       __pFileEventManager->AddPath(parentDirectoryOfSelectedFile, FILE_EVENT_TYPE_CREATE | FILE_EVENT_TYPE_MOVED_FROM | FILE_EVENT_TYPE_MOVED_TO | FILE_EVENT_TYPE_DELETE );
+                                       if(__pFileEventManager != null)
+                                       {
+                                                       __pFileEventManager->RemovePath(__directoryForFileEvent);
+                                                       delete __pFileEventManager;
+                                                       __pFileEventManager = null;
+                                       }
+                                       __pFileEventManager = new (std::nothrow) FileEventManager();
+                                       __pFileEventManager->Construct(*this);
+
+                                       __directoryForFileEvent = parentDirectoryOfSelectedFile;
+                                       __pFileEventManager->AddPath(__directoryForFileEvent, FILE_EVENT_TYPE_CREATE | FILE_EVENT_TYPE_MOVED_FROM | FILE_EVENT_TYPE_MOVED_TO | FILE_EVENT_TYPE_DELETE );
                                        AppControl* pAppControlInUse = pCustomAppControl->LaunchAppControl(__pathOfSelectedFile);
                                        if (pAppControlInUse != null)
                                                CustomAppControl::SetAppControlInUse(pAppControlInUse);
@@ -1658,6 +1669,10 @@ SearchForm::OnSceneTransitionCompleted(const Tizen::Ui::Scenes::SceneId &previou
        __pFileEventManager = new (std::nothrow) FileEventManager();
        __pFileEventManager->Construct(*this);
 
+       __directoryForFileEvent = __currentSearchDirectoryPath;
+       __pFileEventManager->AddPath(__directoryForFileEvent, FILE_EVENT_TYPE_CREATE | FILE_EVENT_TYPE_MOVED_FROM | FILE_EVENT_TYPE_MOVED_TO | FILE_EVENT_TYPE_DELETE );
+       AppLogDebug("SearchForm::OnSceneTransitionCompleted:%S:%s", __directoryForFileEvent.GetPointer(), GetErrorMessage(GetLastResult()));
+
        if (__bCheckArgsNull)
        {
                if (__pListView != null)
@@ -1737,6 +1752,7 @@ SearchForm::StartSearch(void)
 void
 SearchForm::OnFileEventOccured(const unsigned long events,const Tizen::Base::String &  path, const unsigned int        eventId)
 {
+       AppLogDebug("SearchForm::OnFileEventOccured");
        bool cacheKeyStatus = false;
        HashMap* pCacheList = null;
        DirectoryEntry* pCurrentEntry = null;
@@ -1780,7 +1796,17 @@ SearchForm::OnFileEventOccured(const unsigned long events,const Tizen::Base::Str
                                }
                        }
                }
+               if (((MyFilesApp*) Application::GetInstance())->IsAppControlLaunched() == false)
+               {
+                       AppLogDebug("SearchForm::OnFileEventOccured");
+                       if (__searchText.IsEmpty() == false)
+                               StartSearch();
+
+                       if (__pListView != null)
+                               __pListView->UpdateList();
+               }
        }
+
        __selectedItemIndex  =-1;
 }
 
@@ -1875,6 +1901,20 @@ SearchForm::OnAppControlCompleted(void)
        AppLogDebug("OnAppControlCompleted++");
        if ( __backFromAppControl==true )
        {
+               if (__pFileEventManager != null)
+               {
+                       __pFileEventManager->RemovePath(__directoryForFileEvent);
+                       delete __pFileEventManager;
+                       __pFileEventManager = null;
+               }
+
+               __pFileEventManager = new (std::nothrow) FileEventManager();
+               __pFileEventManager->Construct(*this);
+
+               __directoryForFileEvent = __currentSearchDirectoryPath;
+               __pFileEventManager->AddPath(__directoryForFileEvent, FILE_EVENT_TYPE_CREATE | FILE_EVENT_TYPE_MOVED_FROM | FILE_EVENT_TYPE_MOVED_TO | FILE_EVENT_TYPE_DELETE );
+
+
                __pSearchBar->SetMode(__searchBarMode);
 
                if (__searchText.IsEmpty() == false)
index 5d6db9b..8c97ca1 100644 (file)
@@ -145,7 +145,10 @@ ThumbnailManager::GetThumbnail(ThumbRequest* pRequest)
 
        ImageMetadata* pImageMeta = null;
        ImageBuffer* pImage = null;
+       ImageBuffer*            pRotatedImgBuff = null;
+
        VideoFrameExtractor extractor;
+       RecordingRotation videoRecordingRotation;
 
        Bitmap* pTmpBmp = null;
 
@@ -179,7 +182,19 @@ ThumbnailManager::GetThumbnail(ThumbRequest* pRequest)
                                AppLogDebug("VideoThumbnail:GetFrameNStop");
                                if  ( pImage )
                                {
-                                       pRequest->pBitmap = pImage->GetBitmapN(BITMAP_PIXEL_FORMAT_ARGB8888, BUFFER_SCALING_NONE);
+                                       videoRecordingRotation = extractor.GetRecordingRotation();
+
+                                       if ( videoRecordingRotation != RECORDING_ROTATION_NONE )
+                                       {
+                                               if ( videoRecordingRotation == RECORDING_ROTATION_90 )
+                                                       pRotatedImgBuff = pImage->RotateN(IMAGE_ROTATION_90);
+                                               else if ( videoRecordingRotation == RECORDING_ROTATION_180 )
+                                                       pRotatedImgBuff = pImage->RotateN(IMAGE_ROTATION_180);
+                                               else if ( videoRecordingRotation == RECORDING_ROTATION_270 )
+                                                       pRotatedImgBuff = pImage->RotateN(IMAGE_ROTATION_270);
+                                       }
+
+                                       pRequest->pBitmap = pRotatedImgBuff->GetBitmapN(BITMAP_PIXEL_FORMAT_ARGB8888, BUFFER_SCALING_NONE);
                                        TryCatch(pRequest->pBitmap != null, r = E_OUT_OF_MEMORY, "FRAMEEXTRACTOR : failed to allocate memory to pTempBitmap");
 
                                        delete pImage;
@@ -288,7 +303,7 @@ ThumbnailManager::GetThumbnailN(Tizen::Base::String& FilePath, Tizen::Graphics::
        }
 
        pTempBitmap = MakeBitmapN(FilePath, GenerateThumbnail, IsVideoFile);
-       TryCatch(pTempBitmap != null, r = E_FAILURE, "Thumbnail Geneeration failed");
+       TryCatch(pTempBitmap != null, r = E_FAILURE, "Thumbnail Generation failed");
 
        if (GenerateThumbnail)
        {