From: chitta.rs Date: Mon, 15 Apr 2013 10:21:37 +0000 (+0530) Subject: Fixed NABI_SE issue N_SE-34439 X-Git-Tag: accepted/tizen_2.1/20130425.024242~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=59f8414c9d576060d7e3b447125733738baf76be;p=apps%2Fosp%2FMyFiles.git Fixed NABI_SE issue N_SE-34439 Change-Id: Id2ffb103935c4114d675b594351a5fa7d9ca616f --- diff --git a/src/MfSubBaseSelectionForm.cpp b/src/MfSubBaseSelectionForm.cpp index 2e8d9aa..bd924ac 100644 --- a/src/MfSubBaseSelectionForm.cpp +++ b/src/MfSubBaseSelectionForm.cpp @@ -521,6 +521,11 @@ SubBaseSelection::LoadMusicPlayer(const Tizen::Base::String& mediaFilepath, Tize result r = E_SUCCESS; if (_pAudioPlayer != null && mediaFilepath.IsEmpty() == false) { + if (_pAudioPlayer->GetState() != PLAYER_STATE_PAUSED) + { + _pAudioPlayer->Construct(*this); + } + r = _pAudioPlayer->OpenFile(mediaFilepath, false); r = _pAudioPlayer->Play(); r = _pAudioPlayer->SetLooping(false); @@ -729,6 +734,7 @@ SubBaseSelection::ResetFooter(void) void SubBaseSelection::OnPlayerAudioFocusChanged (void) { + //Empty Implementation. } void diff --git a/src/MfSubFolderSelection.cpp b/src/MfSubFolderSelection.cpp index bfb5ac0..153f395 100644 --- a/src/MfSubFolderSelection.cpp +++ b/src/MfSubFolderSelection.cpp @@ -213,9 +213,6 @@ SubFolderSelection::OnInitializing(void) r = _pExport->Construct(IDA_BTN_EXPORT); _pExport->SetText(buttonExportHere); -/* _pCreateFolder = new (std::nothrow) FooterItem(); - r = _pCreateFolder->Construct(IDA_BTN_CREATE_FOLDER); - _pCreateFolder->SetText(buttonCreate);*/ } else { @@ -224,10 +221,6 @@ SubFolderSelection::OnInitializing(void) _pAttach->SetText(buttonAttach); } -/* _pCancel = new (std::nothrow) FooterItem(); - r = _pCancel->Construct(IDA_BTN_CANCEL); - _pCancel->SetText(buttonCancel);*/ - TryCatch(_pFooter != null, , "Footer is Null"); if (_pFooter != null) @@ -438,8 +431,6 @@ SubFolderSelection::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& li } else { - // _pAudioPlayer->Play(); - AppLogDebug("music player started"); LoadMusicPlayer(pDirStr->GetFullFilePath(), PLAYER_STATE_INITIALIZED); } } @@ -449,6 +440,7 @@ SubFolderSelection::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& li _pAudioPlayer->Close(); _pListView->RefreshList(_previousAudioSelected, LIST_REFRESH_TYPE_ITEM_MODIFY); _previousAudioSelected = index; + LoadMusicPlayer(pDirStr->GetFullFilePath(), PLAYER_STATE_STOPPED); } _currentAudioPlayIndex = index; @@ -844,17 +836,38 @@ SubFolderSelection::SetHeaderTitleText(Tizen::Base::String& filePath) String delimiter(L"/"); StringTokenizer tokenizer(filePath, delimiter); - while (tokenizer.HasMoreTokens()) - { - int tokenCount = tokenizer.GetTokenCount(); + AppResource* pAppResource = null; - if (tokenCount == 1) + pAppResource = UiApp::App::GetInstance()->GetAppResource(); + + if (filePath == BasePresentationModel::GetMediaPath()) + { + if (pAppResource != null) { - tokenizer.GetNextToken(parentFileName); + pAppResource->GetString(L"IDS_MF_TAB_PHONE", parentFileName); } - else + } + else if (filePath == BasePresentationModel::GetSdCardPath()) + { + if (pAppResource != null) { - tokenizer.GetNextToken(token); + pAppResource->GetString(L"IDS_MF_TAB_MEMORY_CARD", parentFileName); + } + } + else + { + while (tokenizer.HasMoreTokens()) + { + int tokenCount = tokenizer.GetTokenCount(); + + if (tokenCount == 1) + { + tokenizer.GetNextToken(parentFileName); + } + else + { + tokenizer.GetNextToken(token); + } } }