{
SceneManager* pSceneManager = SceneManager::GetInstance();
AppAssert(pSceneManager);
- SetScreenState(SCREEN_STATE_NORMAL);
- pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_DESTROY_OPTION_KEEP));
+
+ if (pSceneManager->GetCurrentSceneId().Equals(IDSCN_ALBUM_CONTENT_LIST,true))
+ {
+ SetScreenState(SCREEN_STATE_NORMAL);
+ pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_DESTROY_OPTION_KEEP));
+ }
}
AppLogDebug("EXIT");
AppLogDebug("ENTER");
if (pAlbumListPresentationModelInstance == null)
{
+ result r = E_SUCCESS;
pAlbumListPresentationModelInstance = new (std::nothrow) AlbumListPresentationModel();
TryReturn(pAlbumListPresentationModelInstance != null, null, "AlbumListPresentationModel instance is not created.");
- result r = E_SUCCESS;
- if(pAlbumListPresentationModelInstance != null)
+ if (pAlbumListPresentationModelInstance != null)
{
r = pAlbumListPresentationModelInstance->Construct();
TryCatch(r == E_SUCCESS, , null, "AlbumListPresentationModel instance is not constrcuted.");
if (__pPresentationModel->GetArtistAlbumListCount() == 0)
{
- __headerTitle = L"";
SceneManager* pSceneManager = SceneManager::GetInstance();
- AppAssert(pSceneManager);
- SetScreenState(SCREEN_STATE_NORMAL);
- pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_DESTROY_OPTION_KEEP));
+ if (pSceneManager->GetCurrentSceneId().Equals(IDSCN_ARTIST_CONTENT_LIST,true)
+ || pSceneManager->GetCurrentSceneId().Equals(IDSCN_PLAYLIST_CREATOR,true))
+ {
+ __headerTitle = L"";
+ AppAssert(pSceneManager);
+ SetScreenState(SCREEN_STATE_NORMAL);
+ pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_DESTROY_OPTION_KEEP));
+ }
}
else
AppLogDebug("ENTER");\r
if (IsEmptyContentList() == true)\r
{\r
- ArrayList *pList = new (std::nothrow) ArrayList();\r
- pList->Construct();\r
+ ArrayList* pList = null;\r
SceneManager* pSceneManager = SceneManager::GetInstance();\r
SetShowStateContentTableview(false);\r
SetShowStateNoContent(true);\r
GetHeader()->SetButtonEnabled(BUTTON_POSITION_RIGHT, false);\r
GetHeader()->Invalidate(true);\r
AppAssert(pSceneManager);\r
- pSceneManager->GoBackward(BackwardSceneTransition(), pList);\r
+ pList = new (std::nothrow) ArrayList();\r
+ pList->Construct();\r
+ pSceneManager->GoBackward(BackwardSceneTransition(),pList);\r
AppLogDebug("EXIT");\r
return;\r
}\r
{
MessageBox messageBox;
int modalResult = 0;
- messageBox.Construct(L"Error", ResourceManager::GetString(L"IDS_MUSIC_POP_UNABLE_TO_PLAY_ERROR_OCCURRED"), MSGBOX_STYLE_NONE, 3000);
+ if (__pPresentationModel->IsDuringCall())
+ {
+ messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_POP_UNABLE_TO_PLAY_DURING_CALL"), MSGBOX_STYLE_NONE, 3000);
+ }
+ else
+ {
+ messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_POP_UNABLE_TO_PLAY_ERROR_OCCURRED"), MSGBOX_STYLE_NONE, 3000);
+ }
messageBox.ShowAndWait(modalResult);
}
}
}
TogglePlayPauseImage(__pPlayerPresentationModel->GetPlayerState());
- if (__pContentsListViewPanel->GetShowState())
- {
- TableView* pContentsTableView = static_cast<TableView*>(__pContentsListViewPanel->GetControl(IDC_CONTENTS_TABLEVIEW));
- pContentsTableView->UpdateTableView();
- __pContentsListViewPanel->Invalidate(true);
- }
+// if (__pContentsListViewPanel->GetShowState())
+// {
+// TableView* pContentsTableView = static_cast<TableView*>(__pContentsListViewPanel->GetControl(IDC_CONTENTS_TABLEVIEW));
+//// pContentsTableView->UpdateTableView();
+// __pContentsListViewPanel->Invalidate(true);
+// }
AppLogDebug("EXIT");
}
}
else
{
+ __pMsgShowTimer->Cancel();
__pSeekTimer->Cancel();
__playPosition = -1;
PlayAnimation();
}
else
{
+ __pMsgShowTimer->Cancel();
__pSeekTimer->Cancel();
__playPosition = -1;
PlayAnimation();
PlayerForm::OnAnimationTransactionStopped(int transactionId)
{
AppLogDebug("ENTER");
+ __isAnimationPerformed = false;
AppLogDebug("EXIT");
}
}
else if (&timer == __pMsgShowTimer)
{
- ShowMessageBox(ResourceManager::GetString(L"IDS_MUSIC_POP_UNABLE_TO_PLAY_ERROR_OCCURRED"));
+ if(__pPlayerPresentationModel->IsDuringCall())
+ {
+ ShowMessageBox(ResourceManager::GetString(L"IDS_MUSIC_POP_UNABLE_TO_PLAY_DURING_CALL"));
+ }
+ else
+ {
+ ShowMessageBox(ResourceManager::GetString(L"IDS_MUSIC_POP_UNABLE_TO_PLAY_ERROR_OCCURRED"));
+ }
}
else if (&timer == __pSeekTimer)
{
SetFocus();
__pPlayerPresentationModel->AddMusicPlayerEventListener(*this);
- if (pArgs != null)
+ if (pArgs != null && pArgs->GetCount() > 0 && dynamic_cast<Integer*>(pArgs->GetAt(0)) == null)
{
if (IsFailed(__pPlayerPresentationModel->SetContentList(pArgs)))
{
else
{
PlayerState playerState = __pPlayerPresentationModel->GetPlayerState();
- // GetContentListCount() may return 1 in case of current playing song is deleted and no other song is available
- if (playerState != PLAYER_STATE_PAUSED
- && playerState != PLAYER_STATE_PLAYING
- && __pPlayerPresentationModel->GetContentListCount() <= 1)
+ if (__pPlayerPresentationModel->IsDuringCall() == true || playerState == PLAYER_STATE_INITIALIZED
+ || playerState == PLAYER_STATE_ERROR)
{
playerState = PLAYER_STATE_ERROR;
}
AppLogDebug("ENTER");
MessageBox messageBox;
int modalResult = 0;
- messageBox.Construct(L"Error", showText, MSGBOX_STYLE_NONE, 3000);
+ messageBox.Construct(L"", showText, MSGBOX_STYLE_NONE, 3000);
messageBox.ShowAndWait(modalResult);
AppLogDebug("EXIT");
return E_SUCCESS;
{
r = __pPlayer->Pause();
TryCatch(r == E_SUCCESS, , "__pPlayer pause failed..%s\n",GetErrorMessage(r));
-
+ }
+ if (__pPlayer->GetState() == PLAYER_STATE_PAUSED)
+ {
if (__pPlayStateTimer != null)
{
r = __pPlayStateTimer->Cancel();
AppLogDebug("ENTER");
TryReturn( pArgs != null && pArgs->GetCount() > 0, E_INVALID_ARG, "Invalid arguments");
result r = E_SUCCESS;
- String* temp = null;
+ String* pTemp = null;
if (__pPlayContentList == null)
{
__pPlayContentList->RemoveAll(true);
}
- temp = static_cast<String*>(pArgs->GetAt(0));
- if (temp->Equals(MUSIC, true))
+ pTemp = static_cast<String*>(pArgs->GetAt(0));
+ if (pTemp->Equals(MUSIC, true))
{
ArrayList* pContentList = static_cast<ArrayList*>(pArgs->GetAt(2));
- TryReturn(pContentList != null, E_FAILURE, "pArgs->GetAt(0) is null.")
+ TryReturn(pContentList != null, E_FAILURE, "pArgs->GetAt(2) is null.")
IEnumerator* pEnum = pContentList->GetEnumeratorN();
if (__pPresentationModel->GetContentCount() == 0)
{
SceneManager* pSceneManager = SceneManager::GetInstance();
- ToggleScreenState(SCREEN_STATE_NORMAL);
- AppAssert(pSceneManager);
- pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_DESTROY_OPTION_KEEP));
+ if (pSceneManager->GetCurrentSceneId().Equals(IDSCN_PLAYLIST_CONTENT_LIST,true))
+ {
+ ToggleScreenState(SCREEN_STATE_NORMAL);
+ AppAssert(pSceneManager);
+ pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_DESTROY_OPTION_KEEP));
+ }
}
else
{
3000);
int modalResult = 0;
messageBox.ShowAndWait(modalResult);
- pList = new (std::nothrow) ArrayList();
- pList->Construct();
- pList->Add(new (std::nothrow) Integer(1));
+ if (!__previousSceneId.Equals(IDSCN_PLAYER,true))
+ {
+ pList = new (std::nothrow) ArrayList();
+ pList->Construct();
+ pList->Add(new (std::nothrow) Integer(1));
+ }
}
else
{
* @brief This is the implementation file for PlaylistListPanel class.
*/
+#include "MpAllListPresentationModel.h"
#include "MpCommonUtil.h"
#include "MpMusicPlayerApp.h"
#include "MpPlaylistListPanel.h"
String bitmapResName[] = {"34_mostplayed.png", "34_recentlyplayed.png", "34_recentlyadded.png"};
Bitmap* pBitmap = ResourceManager::GetBitmapN(bitmapResName[itemIndex]);
- r = CreateTableViewItem(*pItem, defaultPlaylistTitle, *pBitmap, NUM_NOT_DISPLAY_CONTENT_COUNT);
- delete pBitmap;
- TryCatch(r == E_SUCCESS, , "CreateTableViewItem failed(%s)", GetErrorMessage(r));
-
- ArrayList* pPlaylistContentList = __pPlaylistListPresentationModel->GetContentPathListN(itemIndex);
- if(__pContextItem_default)
+ if (pBitmap != null)
{
- __pContextItem_default->SetEnabled(true);
-
- if (pPlaylistContentList != null)
+ r = CreateTableViewItem(*pItem, defaultPlaylistTitle, *pBitmap, NUM_NOT_DISPLAY_CONTENT_COUNT);
+ delete pBitmap;
+ TryCatch(r == E_SUCCESS, , "CreateTableViewItem failed(%s)", GetErrorMessage(r));
+ ArrayList* pPlaylistContentList = __pPlaylistListPresentationModel->GetContentPathListN(itemIndex);
+ if(__pContextItem_default)
{
- if (pPlaylistContentList->GetCount() == 0)
+ __pContextItem_default->SetEnabled(true);
+
+ if (pPlaylistContentList != null)
{
- __pContextItem_default->SetEnabled(false);
+ if (pPlaylistContentList->GetCount() == 0)
+ {
+ __pContextItem_default->SetEnabled(false);
+ }
+
+ pPlaylistContentList->RemoveAll(true);
+ delete pPlaylistContentList;
}
- pPlaylistContentList->RemoveAll(true);
- delete pPlaylistContentList;
+ __pContextItem_default->Invalidate(true);
+ pItem->SetContextItem(__pContextItem_default);
}
-
- __pContextItem_default->Invalidate(true);
-
- pItem->SetContextItem(__pContextItem_default);
}
}
else
{
- Tizen::Base::String* playlistName = __pPlaylistListPresentationModel->GetPlayListName(itemIndex - USER_CONTENT);
-
+ String* playlistName = __pPlaylistListPresentationModel->GetPlayListName(itemIndex - USER_CONTENT);
if (playlistName != null)
{
int playlistItemCount = __pPlaylistListPresentationModel->GetPlayListItemCount(*playlistName);
else
{
Bitmap* pThumbnail = (ResourceManager::GetBitmapN(L"34_player_list_thum_noitems.png"));
- pThumbnail->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
- r = CreateTableViewItem(*pItem, *playlistName, *pThumbnail, playlistItemCount);
- delete pThumbnail;
- TryCatch(r == E_SUCCESS, , "CreateTableViewItem failed(%s)", GetErrorMessage(r));
+ if (pThumbnail != null)
+ {
+ pThumbnail->Scale(Dimension(W_THUMBNAIL, H_THUMBNAIL));
+ r = CreateTableViewItem(*pItem, *playlistName, *pThumbnail, playlistItemCount);
+ delete pThumbnail;
+ TryCatch(r == E_SUCCESS, , "CreateTableViewItem failed(%s)", GetErrorMessage(r));
+ }
}
}
if (__pPlaylistListPresentationModel != null)
{
__pPlaylistListPresentationModel->UpdatePlaylistList();
+ if (AllListPresentationModel::GetInstance()->GetTotalCount() <= 0)
+ {
+ CommonUtil::SetAddtoPlaylistState(false);
+ }
}
AppLogDebug("EXIT");
}