From 5e11cdc406071a1f0252fe609ead6fc314b74e1f Mon Sep 17 00:00:00 2001 From: Divya Jain Date: Tue, 3 Sep 2013 17:06:45 +0530 Subject: [PATCH] Fixed Jira issues 50249, 50683, 50387 Change-Id: Id5539b162ee63a8e86cfc0b5b8135c79fe621641 Signed-off-by: Divya Jain --- ..._PLAYLIST_EDITOR_ITEM_PANEL_FONT_SIZE_GIANT.xml | 4 +- ...S_PLAYLIST_EDITOR_ITEM_PANEL_FONT_SIZE_HUGE.xml | 4 +- ..._PLAYLIST_EDITOR_ITEM_PANEL_FONT_SIZE_LARGE.xml | 4 +- res/screen-size-normal/IDL_MINI_PLYAER_PANEL.xml | 2 +- src/MpAlbumContentListForm.cpp | 4 ++ src/MpAlbumListEditorPanel.cpp | 54 ++++++++++++++++------ src/MpAllListEditorPanel.cpp | 51 +++++++++++++++----- src/MpArtistContentListForm.cpp | 24 ++++++---- src/MpArtistListEditorPanel.cpp | 52 +++++++++++++++------ src/MpContentEditPanel.cpp | 12 +++-- src/MpContentListForm.cpp | 12 +++-- src/MpFolderContentListForm.cpp | 45 ++++++++++-------- src/MpFolderListEditorPanel.cpp | 54 ++++++++++++++++------ src/MpPlaylistContentListForm.cpp | 6 +++ src/MpPlaylistCreatorForm.cpp | 1 + src/MpPlaylistPickerPopup.cpp | 2 +- src/MpUserPlaylistContentListForm.cpp | 6 +++ 17 files changed, 240 insertions(+), 97 deletions(-) diff --git a/res/screen-size-normal/IDL_CONTENTS_PLAYLIST_EDITOR_ITEM_PANEL_FONT_SIZE_GIANT.xml b/res/screen-size-normal/IDL_CONTENTS_PLAYLIST_EDITOR_ITEM_PANEL_FONT_SIZE_GIANT.xml index 9fe17c0..5bca35b 100644 --- a/res/screen-size-normal/IDL_CONTENTS_PLAYLIST_EDITOR_ITEM_PANEL_FONT_SIZE_GIANT.xml +++ b/res/screen-size-normal/IDL_CONTENTS_PLAYLIST_EDITOR_ITEM_PANEL_FONT_SIZE_GIANT.xml @@ -21,8 +21,8 @@ diff --git a/src/MpAlbumContentListForm.cpp b/src/MpAlbumContentListForm.cpp index 2f3f9cb..b319679 100644 --- a/src/MpAlbumContentListForm.cpp +++ b/src/MpAlbumContentListForm.cpp @@ -208,6 +208,10 @@ AlbumContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previo __ablumName = *(static_cast(pArgs->GetAt(DATA_ITEM_CONTENT_NAME))); __currentAlbumIndex = __pPresentationModel->searchAlbumIndex(__ablumName); } + else if (previousSceneId.Equals(IDSCN_PLAYLIST_CREATOR, false)) + { + SetItemCheckedAll(false); + } else { __currentAlbumIndex = static_cast(pArgs->GetAt(DATA_ITEM_CONTENT_TYPE))->ToInt(); diff --git a/src/MpAlbumListEditorPanel.cpp b/src/MpAlbumListEditorPanel.cpp index 3521081..b6a6adc 100644 --- a/src/MpAlbumListEditorPanel.cpp +++ b/src/MpAlbumListEditorPanel.cpp @@ -152,6 +152,30 @@ AlbumListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previo UpdateContentEditScreenState(); + if (previousSceneId.Equals(IDSCN_PLAYLIST_CREATOR, true)) + { + if (pArgs != null) + { + int totalCount = 0; + __pContentTableView->UpdateTableView(); + __checkedItemCount = INIT_VALUE; + SetCheckedCountBallonTooltip(__checkedItemCount); + + totalCount = __pPresentationModel->GetAllAlbumCount(); + for (int count = 0; count < totalCount; count++) + { + __pContentTableView->SetItemChecked(count, false); + } + } + else + { + if (pFooter != null) + { + CommonUtil::SetFooterItemEnabled(*pFooter, true); + } + } + } + if (pArgs != null) { pArgs->RemoveAll(true); @@ -170,23 +194,27 @@ AlbumListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curre Form* pForm = dynamic_cast(GetParent()); AppAssert(pForm); - Footer* pFooter = pForm->GetFooter(); - - if (pFooter != null) + if (!(nextSceneId.Equals(IDSCN_PLAYLIST_CREATOR, false))) { - pFooter->RemoveAllButtons(); - pFooter->RemoveAllItems(); - pFooter->RemoveActionEventListener(*this); - } + Footer* pFooter = pForm->GetFooter(); - __checkedItemCount = INIT_VALUE; - SetCheckedCountBallonTooltip(__checkedItemCount); + if (pFooter != null) + { + pFooter->RemoveAllButtons(); + pFooter->RemoveAllItems(); + pFooter->RemoveActionEventListener(*this); + } - int totalCount = __pPresentationModel->GetAllAlbumCount(); - for (int iCount = 0; iCount < totalCount; iCount++) - { - __pContentTableView->SetItemChecked(iCount, false); + __checkedItemCount = INIT_VALUE; + SetCheckedCountBallonTooltip(__checkedItemCount); + + int totalCount = __pPresentationModel->GetAllAlbumCount(); + for (int iCount = 0; iCount < totalCount; iCount++) + { + __pContentTableView->SetItemChecked(iCount, false); + } } + CancelAllThumbnailRequest(); AppLogDebug("EXIT"); } diff --git a/src/MpAllListEditorPanel.cpp b/src/MpAllListEditorPanel.cpp index 2812b26..d1ab2df 100644 --- a/src/MpAllListEditorPanel.cpp +++ b/src/MpAllListEditorPanel.cpp @@ -171,6 +171,30 @@ AllListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previous UpdateContentEditScreenState(); + if (previousSceneId.Equals(IDSCN_PLAYLIST_CREATOR, true)) + { + if (pArgs != null) + { + int totalCount = 0; + __pContentTableView->UpdateTableView(); + __checkedItemCount = INIT_VALUE; + SetCheckedCountBallonTooltip(__checkedItemCount); + + totalCount = __pPresentationModel->GetTotalCount(); + for (int count = 0; count < totalCount; count++) + { + __pContentTableView->SetItemChecked(count, false); + } + } + else + { + if (pFooter != null) + { + CommonUtil::SetFooterItemEnabled(*pFooter, true); + } + } + } + if (pArgs != null) { pArgs->RemoveAll(true); @@ -186,21 +210,24 @@ AllListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& current AppLogDebug("ENTER"); ContentPanel::OnSceneDeactivated(currentSceneId, nextSceneId); - Footer* pFooter = GetFooter(); - if (pFooter != null) + if (!(nextSceneId.Equals(IDSCN_PLAYLIST_CREATOR, false))) { - pFooter->RemoveAllButtons(); - pFooter->RemoveAllItems(); - pFooter->RemoveActionEventListener(*this); - } + Footer* pFooter = GetFooter(); + if (pFooter != null) + { + pFooter->RemoveAllButtons(); + pFooter->RemoveAllItems(); + pFooter->RemoveActionEventListener(*this); + } - __checkedItemCount = INIT_VALUE; - SetCheckedCountBallonTooltip(__checkedItemCount); + __checkedItemCount = INIT_VALUE; + SetCheckedCountBallonTooltip(__checkedItemCount); - int totalCount = __pPresentationModel->GetTotalCount(); - for (int iCount = 0; iCount < totalCount; iCount++) - { - __pContentTableView->SetItemChecked(iCount, false); + int totalCount = __pPresentationModel->GetTotalCount(); + for (int iCount = 0; iCount < totalCount; iCount++) + { + __pContentTableView->SetItemChecked(iCount, false); + } } CancelAllThumbnailRequest(); AppLogDebug("EXIT"); diff --git a/src/MpArtistContentListForm.cpp b/src/MpArtistContentListForm.cpp index 0764f74..fcfd618 100644 --- a/src/MpArtistContentListForm.cpp +++ b/src/MpArtistContentListForm.cpp @@ -134,15 +134,21 @@ ArtistContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ AppLogDebug("ENTER"); if (pArgs != null) { - __prevSceneId.Clear(); - __headerTitle.Clear(); - __prevSceneId.Append(*static_cast(pArgs->GetAt(DATA_ITEM_SCENE_NAME))); - __headerTitle.Append(*static_cast(pArgs->GetAt(DATA_ITEM_CONTENT_NAME))); - __artistName = __headerTitle; - __pPresentationModel->UpdateArtistList(); - __pPresentationModel->InitializeArtistAlbumList(__artistName); - __pPresentationModel->InitializeContentList(INIT_VALUE); - + if (previousSceneId.Equals(IDSCN_PLAYLIST_CREATOR, false)) + { + SetItemCheckedAll(false); + } + else + { + __prevSceneId.Clear(); + __headerTitle.Clear(); + __prevSceneId.Append(*static_cast(pArgs->GetAt(DATA_ITEM_SCENE_NAME))); + __headerTitle.Append(*static_cast(pArgs->GetAt(DATA_ITEM_CONTENT_NAME))); + __artistName = __headerTitle; + __pPresentationModel->UpdateArtistList(); + __pPresentationModel->InitializeArtistAlbumList(__artistName); + __pPresentationModel->InitializeContentList(INIT_VALUE); + } SetHeader(); UpdateScreenState(); UpdateTableView(); diff --git a/src/MpArtistListEditorPanel.cpp b/src/MpArtistListEditorPanel.cpp index 68ce57a..ac7c3f1 100644 --- a/src/MpArtistListEditorPanel.cpp +++ b/src/MpArtistListEditorPanel.cpp @@ -151,6 +151,30 @@ ArtistListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ UpdateContentEditScreenState(); + if (previousSceneId.Equals(IDSCN_PLAYLIST_CREATOR, true)) + { + if (pArgs != null) + { + int totalCount = 0; + __pContentTableView->UpdateTableView(); + __checkedItemCount = INIT_VALUE; + SetCheckedCountBallonTooltip(__checkedItemCount); + + totalCount = __pPresentationModel->GetArtistListCount(); + for (int count = 0; count < totalCount; count++) + { + __pContentTableView->SetItemChecked(count, false); + } + } + else + { + if (pFooter != null) + { + CommonUtil::SetFooterItemEnabled(*pFooter, true); + } + } + } + if (pArgs != null) { pArgs->RemoveAll(true); @@ -165,21 +189,23 @@ ArtistListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curr { AppLogDebug("ENTER"); ContentPanel::OnSceneDeactivated(currentSceneId, nextSceneId); - - Footer* pFooter = GetFooter(); - if (pFooter != null) + if (!(nextSceneId.Equals(IDSCN_PLAYLIST_CREATOR, false))) { - pFooter->RemoveAllButtons(); - pFooter->RemoveAllItems(); - pFooter->RemoveActionEventListener(*this); - } + Footer* pFooter = GetFooter(); + if (pFooter != null) + { + pFooter->RemoveAllButtons(); + pFooter->RemoveAllItems(); + pFooter->RemoveActionEventListener(*this); + } - __checkedItemCount = INIT_VALUE; - SetCheckedCountBallonTooltip(__checkedItemCount); - int totalCount = __pPresentationModel->GetArtistListCount(); - for (int iCount = 0; iCount < totalCount; iCount++) - { - __pContentTableView->SetItemChecked(iCount, false); + __checkedItemCount = INIT_VALUE; + SetCheckedCountBallonTooltip(__checkedItemCount); + int totalCount = __pPresentationModel->GetArtistListCount(); + for (int iCount = 0; iCount < totalCount; iCount++) + { + __pContentTableView->SetItemChecked(iCount, false); + } } CancelAllThumbnailRequest(); AppLogDebug("EXIT"); diff --git a/src/MpContentEditPanel.cpp b/src/MpContentEditPanel.cpp index 6c53ad7..c329628 100644 --- a/src/MpContentEditPanel.cpp +++ b/src/MpContentEditPanel.cpp @@ -335,13 +335,15 @@ ContentEditPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collect if (pArgs != null) { - Boolean* pIsInitialize = static_cast(pArgs->GetAt(0)); - - if (pIsInitialize->Equals(true)) + if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP) { - SetItemCheckedAll(false); - } + Boolean* pIsInitialize = static_cast(pArgs->GetAt(0)); + if (pIsInitialize->Equals(true)) + { + SetItemCheckedAll(false); + } + } pArgs->RemoveAll(true); delete pArgs; } diff --git a/src/MpContentListForm.cpp b/src/MpContentListForm.cpp index b398b0a..88592c3 100644 --- a/src/MpContentListForm.cpp +++ b/src/MpContentListForm.cpp @@ -402,11 +402,15 @@ ContentListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collecti if (GetScreenState() != SCREEN_STATE_NORMAL && pArgs != null) { Integer* pLaunchRes = null; - Boolean* pIsInitialize = static_cast(pArgs->GetAt(0)); - - if (pIsInitialize->Equals(true)) + + if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP) { - SetItemCheckedAll(false); + Boolean* pIsInitialize = static_cast(pArgs->GetAt(0)); + + if (pIsInitialize->Equals(true)) + { + SetItemCheckedAll(false); + } } RemovePlayListPicker(); diff --git a/src/MpFolderContentListForm.cpp b/src/MpFolderContentListForm.cpp index 81b001f..400ddf0 100644 --- a/src/MpFolderContentListForm.cpp +++ b/src/MpFolderContentListForm.cpp @@ -122,30 +122,37 @@ FolderContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ AppLogDebug("ENTER"); if (pArgs != null) { - __prevSceneId.Append(*static_cast(pArgs->GetAt(DATA_ITEM_SCENE_NAME))); - __currentFolderIndex = static_cast(pArgs->GetAt(DATA_ITEM_CONTENT_TYPE))->ToInt(); - __pCurrentFolderPath = new (std::nothrow) String(*(static_cast(pArgs->GetAt(DATA_ITEM_CONTENT_NAME)))); + if (previousSceneId.Equals(IDSCN_PLAYLIST_CREATOR, false)) + { + SetItemCheckedAll(false); + } + else + { + __prevSceneId.Append(*static_cast(pArgs->GetAt(DATA_ITEM_SCENE_NAME))); + __currentFolderIndex = static_cast(pArgs->GetAt(DATA_ITEM_CONTENT_TYPE))->ToInt(); + __pCurrentFolderPath = new (std::nothrow) String(*(static_cast(pArgs->GetAt(DATA_ITEM_CONTENT_NAME)))); - __pPresentationModel = FolderListPresentationModel::GetInstance(); - __pPresentationModel->UpdateFolderPathList(); - __pPresentationModel->InitializeContentList(__currentFolderIndex); + __pPresentationModel = FolderListPresentationModel::GetInstance(); + __pPresentationModel->UpdateFolderPathList(); + __pPresentationModel->InitializeContentList(__currentFolderIndex); - int position = INIT_VALUE; - __pCurrentFolderPath->LastIndexOf(IDS_SEPARATOR_SLASH, __pCurrentFolderPath->GetLength() - 1, position); - __pCurrentFolderPath->SubString(position + 1, __headerTitle); + int position = INIT_VALUE; + __pCurrentFolderPath->LastIndexOf(IDS_SEPARATOR_SLASH, __pCurrentFolderPath->GetLength() - 1, position); + __pCurrentFolderPath->SubString(position + 1, __headerTitle); - String ellipisiPath = CommonUtil::SetHighDepthToEllipsisPath(*__pCurrentFolderPath); - Rectangle rect(INIT_VALUE, INIT_VALUE, GetWidth(), 42); + String ellipisiPath = CommonUtil::SetHighDepthToEllipsisPath(*__pCurrentFolderPath); + Rectangle rect(INIT_VALUE, INIT_VALUE, GetWidth(), 42); - Label* pAdditionalInfo = new (std::nothrow) Label(); - if (!IsFailed(pAdditionalInfo->Construct(rect, ellipisiPath))) - { - pAdditionalInfo->SetTextHorizontalAlignment(ALIGNMENT_LEFT); - pAdditionalInfo->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); - pAdditionalInfo->SetTextConfig(32, LABEL_TEXT_STYLE_BOLD); - pAdditionalInfo->SetTextColor(COLOR_ITEM_SUB_TEXT); + Label* pAdditionalInfo = new (std::nothrow) Label(); + if (!IsFailed(pAdditionalInfo->Construct(rect, ellipisiPath))) + { + pAdditionalInfo->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pAdditionalInfo->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + pAdditionalInfo->SetTextConfig(32, LABEL_TEXT_STYLE_BOLD); + pAdditionalInfo->SetTextColor(COLOR_ITEM_SUB_TEXT); - SetExtraInformaionArea(*pAdditionalInfo); + SetExtraInformaionArea(*pAdditionalInfo); + } } SetHeader(); diff --git a/src/MpFolderListEditorPanel.cpp b/src/MpFolderListEditorPanel.cpp index 7aee855..481ce33 100644 --- a/src/MpFolderListEditorPanel.cpp +++ b/src/MpFolderListEditorPanel.cpp @@ -140,6 +140,30 @@ FolderListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previ UpdateContentEditScreenState(); + if (previousSceneId.Equals(IDSCN_PLAYLIST_CREATOR, true)) + { + if (pArgs != null) + { + int totalCount = 0; + __pContentTableView->UpdateTableView(); + __checkedItemCount = INIT_VALUE; + SetCheckedCountBallonTooltip(__checkedItemCount); + + totalCount = __pPresentationModel->GetAllFolderCount(); + for (int count = 0; count < totalCount; count++) + { + __pContentTableView->SetItemChecked(count, false); + } + } + else + { + if (pFooter != null) + { + CommonUtil::SetFooterItemEnabled(*pFooter, true); + } + } + } + if (pArgs != null) { pArgs->RemoveAll(true); @@ -154,23 +178,25 @@ FolderListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& curr { AppLogDebug("ENTER"); ContentPanel::OnSceneDeactivated(currentSceneId, nextSceneId); - - Footer* pFooter = GetFooter(); - - if (pFooter != null) + if (!(nextSceneId.Equals(IDSCN_PLAYLIST_CREATOR, false))) { - pFooter->RemoveAllButtons(); - pFooter->RemoveAllItems(); - pFooter->RemoveActionEventListener(*this); - } + Footer* pFooter = GetFooter(); - __checkedItemCount = INIT_VALUE; - SetCheckedCountBallonTooltip(__checkedItemCount); + if (pFooter != null) + { + pFooter->RemoveAllButtons(); + pFooter->RemoveAllItems(); + pFooter->RemoveActionEventListener(*this); + } - int totalCount = __pPresentationModel->GetAllFolderCount(); - for (int iCount = 0; iCount < totalCount; iCount++) - { - __pContentTableView->SetItemChecked(iCount, false); + __checkedItemCount = INIT_VALUE; + SetCheckedCountBallonTooltip(__checkedItemCount); + + int totalCount = __pPresentationModel->GetAllFolderCount(); + for (int iCount = 0; iCount < totalCount; iCount++) + { + __pContentTableView->SetItemChecked(iCount, false); + } } AppLogDebug("EXIT"); } diff --git a/src/MpPlaylistContentListForm.cpp b/src/MpPlaylistContentListForm.cpp index e9852b6..27aaa6f 100644 --- a/src/MpPlaylistContentListForm.cpp +++ b/src/MpPlaylistContentListForm.cpp @@ -247,6 +247,12 @@ PlaylistContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& pre pArgs->RemoveAll(true); delete pArgs; } + else if (pArgs != null && previousSceneId.Equals(IDSCN_PLAYLIST_CREATOR, true) == true) + { + SetItemCheckedAll(false); + pArgs->RemoveAll(true); + delete pArgs; + } __pPresentationModel = PlaylistListPresentationModel::GetInstance(); __pPresentationModel->UpdatePlaylistContentList(__currentContentType, __headerTitle); diff --git a/src/MpPlaylistCreatorForm.cpp b/src/MpPlaylistCreatorForm.cpp index 3e065e5..d23a8bf 100644 --- a/src/MpPlaylistCreatorForm.cpp +++ b/src/MpPlaylistCreatorForm.cpp @@ -314,6 +314,7 @@ PlaylistCreatorForm::OnActionPerformed(const Tizen::Ui::Control& source, int act messageBox.ShowAndWait(modalResult); pList = new (std::nothrow) ArrayList(); pList->Construct(); + pList->Add(new (std::nothrow) Integer(1)); } else { diff --git a/src/MpPlaylistPickerPopup.cpp b/src/MpPlaylistPickerPopup.cpp index 1c00b88..8200a0e 100644 --- a/src/MpPlaylistPickerPopup.cpp +++ b/src/MpPlaylistPickerPopup.cpp @@ -129,7 +129,7 @@ PlayListPickerPopup::OnActionPerformed(const Tizen::Ui::Control& source, int act { pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_CREATOR)); } - pDataList->Add(*(new (std::nothrow) Boolean(true))); + pDataList->Add(*(new (std::nothrow) Boolean(false))); __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, pDataList); } AppLogDebug("EXIT"); diff --git a/src/MpUserPlaylistContentListForm.cpp b/src/MpUserPlaylistContentListForm.cpp index 620674b..eb665cc 100644 --- a/src/MpUserPlaylistContentListForm.cpp +++ b/src/MpUserPlaylistContentListForm.cpp @@ -247,6 +247,12 @@ UserPlaylistContentListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& pArgs->RemoveAll(true); delete pArgs; } + else if (pArgs != null && previousSceneId.Equals(IDSCN_PLAYLIST_CREATOR, false)) + { + SetItemCheckedAll(false); + pArgs->RemoveAll(true); + delete pArgs; + } else if (!(__headerTitle.Equals(L"", false))) { __pPresentationModel->UpdatePlaylistContentList(USER_CONTENT, __headerTitle); -- 2.7.4