From 6800e9e5fbdca3f9f8e30373bbc2385cd3acae95 Mon Sep 17 00:00:00 2001 From: "chitta.rs" Date: Fri, 24 May 2013 14:11:15 +0530 Subject: [PATCH] NABI_SE issues resolved Change-Id: I9b2c62dafba7a10f93fd66870dd75f79f01b4ab3 --- inc/MfSearchForm.h | 1 + src/MfSearchForm.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++-- src/MfThumbnailManager.cpp | 19 +++++++++++++++++-- 3 files changed, 60 insertions(+), 4 deletions(-) diff --git a/inc/MfSearchForm.h b/inc/MfSearchForm.h index 41770d6..ae470dd 100644 --- a/inc/MfSearchForm.h +++ b/inc/MfSearchForm.h @@ -176,6 +176,7 @@ private: Tizen::Base::Collection::ArrayList* __pContentListFromLastView; Tizen::Base::Collection::ArrayList* __pSearchedContentList; Tizen::Base::String __currentSearchDirectoryPath; + Tizen::Base::String __directoryForFileEvent; Tizen::Base::String __fileToDelete; Tizen::Base::String __searchText; Tizen::Base::String __previousFormPath; diff --git a/src/MfSearchForm.cpp b/src/MfSearchForm.cpp index 36b11cb..eff08a4 100644 --- a/src/MfSearchForm.cpp +++ b/src/MfSearchForm.cpp @@ -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) diff --git a/src/MfThumbnailManager.cpp b/src/MfThumbnailManager.cpp index 5d6db9b..8c97ca1 100644 --- a/src/MfThumbnailManager.cpp +++ b/src/MfThumbnailManager.cpp @@ -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) { -- 2.7.4