[MusicPlayer] Additional work 2.1 UI(1, 2 depth Edit/Share via check operation and...
authorMyunkyu <mk70.kang@partner.samsung.com>
Fri, 22 Mar 2013 08:45:21 +0000 (17:45 +0900)
committerMyunkyu <mk70.kang@partner.samsung.com>
Fri, 22 Mar 2013 08:45:21 +0000 (17:45 +0900)
Change-Id: I45a66b40178424ce58b5cdd5e4156f6096f7c0b1

14 files changed:
inc/MpContentListForm.h
inc/MpSharePopup.h [changed mode: 0755->0644]
inc/MpTypes.h
src/MpAlbumContentListForm.cpp
src/MpAlbumListEditorPanel.cpp
src/MpAllListEditorPanel.cpp
src/MpContentListForm.cpp
src/MpFolderContentListForm.cpp
src/MpFolderListEditorPanel.cpp
src/MpMusicPlayerForm.cpp
src/MpPlaylistContentListForm.cpp
src/MpPlaylistPickerPopup.cpp
src/MpSharePopup.cpp
src/MpUserPlaylistContentListForm.cpp

index 7dd9a0e..a7012ab 100644 (file)
@@ -96,7 +96,7 @@ protected:
        result SetCheckedTableviewItemToShareVia(void);
        void RefreshAdditionalInformationRegisterBar(void);
        result SetActivatedContextItemToPlaylist(void);
-       void RemoveCheckedTableviewItem(void);
+       void RemoveCheckedTableviewItem(bool itemRemove);
        void RemoveAdditionalInforamtion(void);
 
        ContentListScreenMode GetContentListScreenMode(void);
old mode 100755 (executable)
new mode 100644 (file)
index cd9da22..174fc56
@@ -40,7 +40,7 @@ class SharePopup
 public:
        SharePopup(void);
        virtual ~SharePopup(void);
-       result Initialize(void);
+       result Initialize(Tizen::Ui::Control* pControl);
 
        void SetArguments(Tizen::Base::Collection::IList* pIList);
 
@@ -101,8 +101,8 @@ private:
 private:
        Tizen::Ui::Controls::TableView* __pShareItemTableView;
        Tizen::Ui::Controls::Button* __pCancelButton;
-//     Tizen::Base::Collection::IList* __pDataList;
        Tizen::Base::Collection::HashMap* __pDataList;
+       Tizen::Ui::Control* __pControl;
 };
 
 #endif // _MP_SHARE_POPUP_H_
\ No newline at end of file
index 7f5146c..925d466 100644 (file)
@@ -298,6 +298,7 @@ static const int INDEX_EDITCONTENTLIST_FOOTER_SEARCH = 1;
 static const int INDEX_EDIT_FOOTER_EDIT = 0;
 
 static const long ID_DESTORY_PLAY_LIST_PICKER_POPUP = 0;
+static const long ID_DESTORY_SHARE_POPUP = 1;
 
 static const Tizen::Base::String STRING_SORT_TITLE = L"Title";
 static const Tizen::Base::String STRING_SORT_ARTIST = L"Artist";
index 5cba7ff..b5fc8b2 100644 (file)
@@ -113,68 +113,13 @@ AlbumContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int ac
 
        case IDA_FOOTER_BUTTON_DELETE:
                {
-                       RemoveCheckedTableviewItem();
+                       RemoveCheckedTableviewItem(true);
                        __pPresentationModel->RefreshContentList(__currentContentIndex);
                        UpdateContentListScreenState();
                        __pContentTableView->UpdateTableView();
                }
                break;
 
-       case IDA_FOOTER_BUTTON_SHARE:
-               {
-//                     Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
-//                     Footer* pFooter = GetFooter();
-//                     int totalCount = __pPresentationModel->GetContentCount(__currentContentIndex);
-//
-//                     pDataList->Construct();
-//
-//                     for (int iCount = 0; iCount < totalCount; iCount++)
-//                     {
-//                             if (__pContentTableView->IsItemChecked(iCount) == true)
-//                             {
-//                                     ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
-//                                     if (pContentInfoStruct == null)
-//                                     {
-//                                             pDataList->RemoveAll(true);
-//                                             delete pDataList;
-//                                             pDataList = null;
-//                                             return;
-//                                     }
-//                                     pDataList->Add(*(new (std::nothrow) String(L"attachment:" + pContentInfoStruct->ContentFilePath)));
-//
-//                                     __pContentTableView->SetItemChecked(iCount, false);
-//
-//                                     delete pContentInfoStruct;
-//                                     pContentInfoStruct = null;
-//                             }
-//                     }
-//                     pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
-//                     pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
-//                     pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
-//
-//                     __checkedItemCount = INIT_VALUE;
-//                     CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
-//                     CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
-//
-//                     Invalidate(true);
-//
-//                     if (__pSharePopup == null)
-//                     {
-//                             __pSharePopup = new (std::nothrow) SharePopup();
-//                             __pSharePopup->Initialize();
-//                     }
-//                     __pSharePopup->SetShowState(true);
-//                     __pSharePopup->Show();
-//                     __pSharePopup->SetArguments(pDataList);
-               }
-               break;
-
-//     case IDA_FOOTER_BUTTON_ADD_TO_PLAYLIST:
-//             {
-//                     SetCheckedTableviewItemToPlayList();
-//             }
-//             break;
-
        default:
                break;
        }
@@ -505,7 +450,7 @@ void
 AlbumContentListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
 {
        AppLogDebug("ENTER");
-       ContentListForm::OnUserEventReceivedN(requestId, null);
+       ContentListForm::OnUserEventReceivedN(requestId, pArgs);
        AppLogDebug("EXIT");
 }
 
index 31194e5..ff8a488 100644 (file)
@@ -120,7 +120,6 @@ AlbumListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int ac
                                if (__pContentTableView->IsItemChecked(iCount) == true)
                                {
                                        pDataList->AddItems(*(__pPresentationModel->GetContentPathListN(iCount)));
-                                       __pContentTableView->SetItemChecked(iCount, false);
                                }
                        }
 
@@ -128,11 +127,6 @@ AlbumListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int ac
                        __pPlayListPickerPopup->Initialize(this, pDataList);
                        __pPlayListPickerPopup->SetShowState(true);
                        __pPlayListPickerPopup->Show();
-
-                       __checkedItemCount = INIT_VALUE;
-                       SetCheckedCountBalloonPopup(__checkedItemCount);
-                       CommonUtil::SetFooterItemEnabled(*pFooter, false);
-                       __pContentTableView->Invalidate(true);
                }
                break;
 
@@ -431,6 +425,32 @@ AlbumListEditorPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Col
                        delete __pPlayListPickerPopup;
                        __pPlayListPickerPopup = null;
                }
+
+               if (pArgs == null)
+               {
+                       AppLogDebug("EXIT_1");
+                       return;
+               }
+
+               Boolean* pIsInitialize = static_cast<Boolean*>(pArgs->GetAt(0));
+               if (pIsInitialize->Equals(true))
+               {
+                       __checkedItemCount = INIT_VALUE;
+                       SetCheckedCountBalloonPopup(__checkedItemCount);
+
+                       int totalCount = __pPresentationModel->GetAllAlbumCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               __pContentTableView->SetItemChecked(iCount, false);
+                       }
+
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       Footer* pFooter = pForm->GetFooter();
+                       CommonUtil::SetFooterItemEnabled(*pFooter, false);
+                       Invalidate(true);
+               }
+               pArgs->RemoveAll(true);
+               delete pArgs;
        }
        AppLogDebug("EXIT");
 }
index faf578a..62826c7 100644 (file)
@@ -167,7 +167,6 @@ AllListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int acti
                                if (__pContentTableView->IsItemChecked(iCount) == true)
                                {
                                        pDataList->Add(__pPresentationModel->GetCheckedContent(iCount));
-                                       __pContentTableView->SetItemChecked(iCount, false);
                                }
                        }
 
@@ -175,11 +174,6 @@ AllListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int acti
                        __pPlayListPickerPopup->Initialize(this, pDataList);
                        __pPlayListPickerPopup->SetShowState(true);
                        __pPlayListPickerPopup->Show();
-
-                       __checkedItemCount = INIT_VALUE;
-                       SetCheckedCountBalloonPopup(__checkedItemCount);
-                       CommonUtil::SetFooterItemEnabled(*pFooter, false);
-                       __pContentTableView->Invalidate(true);
                }
                break;
 
@@ -209,21 +203,15 @@ AllListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int acti
                                        }
                                        pDataList->Add(*(new (std::nothrow) String(L"attachment:" + pContentInfoStruct->ContentFilePath)));
 
-                                       __pContentTableView->SetItemChecked(iCount, false);
-
                                        delete pContentInfoStruct;
                                        pContentInfoStruct = null;
                                }
                        }
-                       __checkedItemCount = INIT_VALUE;
-                       SetCheckedCountBalloonPopup(__checkedItemCount);
-                       CommonUtil::SetFooterItemEnabled(*pFooter, false);
-                       __pContentTableView->Invalidate(true);
 
                        if (__pSharePopup == null)
                        {
                                __pSharePopup = new (std::nothrow) SharePopup();
-                               __pSharePopup->Initialize();
+                               __pSharePopup->Initialize(this);
                        }
                        __pSharePopup->SetShowState(true);
                        __pSharePopup->Show();
@@ -515,13 +503,57 @@ AllListEditorPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Colle
 {
        AppLogDebug("ENTER");
        AppLogDebug("OnUserEventReceivedN %d", requestId);
-       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       switch (requestId)
        {
-               if (__pPlayListPickerPopup != null)
+       case ID_DESTORY_PLAY_LIST_PICKER_POPUP:
+               // fall through
+       case ID_DESTORY_SHARE_POPUP:
+               {
+                       if (__pPlayListPickerPopup != null)
+                       {
+                               delete __pPlayListPickerPopup;
+                               __pPlayListPickerPopup = null;
+                       }
+
+                       if (__pSharePopup != null)
+                       {
+                               delete __pSharePopup;
+                               __pSharePopup = null;
+                       }
+
+                       if (pArgs == null)
+                       {
+                               AppLogDebug("EXIT_1");
+                               return;
+                       }
+
+                       Boolean* pIsInitialize = static_cast<Boolean*>(pArgs->GetAt(0));
+                       if (pIsInitialize->Equals(true))
+                       {
+                               __checkedItemCount = INIT_VALUE;
+                               SetCheckedCountBalloonPopup(__checkedItemCount);
+
+                               int totalCount = __pPresentationModel->GetTotalCount();
+                               for (int iCount = 0; iCount < totalCount; iCount++)
+                               {
+                                       __pContentTableView->SetItemChecked(iCount, false);
+                               }
+
+                               Form* pForm = dynamic_cast<Form*>(GetParent());
+                               Footer* pFooter = pForm->GetFooter();
+                               CommonUtil::SetFooterItemEnabled(*pFooter, false);
+                               Invalidate(true);
+                       }
+                       pArgs->RemoveAll(true);
+                       delete pArgs;
+               }
+               break;
+
+       default:
                {
-                       delete __pPlayListPickerPopup;
-                       __pPlayListPickerPopup = null;
+                       // Empty statement
                }
+               break;
        }
        AppLogDebug("EXIT");
 }
index 58182ed..10094cd 100644 (file)
@@ -155,7 +155,7 @@ ContentListForm::CreateSharePopup(void)
        DestroySharePopup();
 
        __pSharePopup = new (std::nothrow) SharePopup();
-       result r = __pSharePopup->Initialize();
+       result r = __pSharePopup->Initialize(this);
        if (IsFailed(r))
        {
                AppLogDebug("__pSharePopup->Initialize() failed(%s)", GetErrorMessage(r));
@@ -407,14 +407,30 @@ ContentListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collecti
 {
        AppLogDebug("ENTER");
        AppLogDebug("OnUserEventReceivedN %d", requestId);
-       if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
+       if ((requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP) || (requestId == ID_DESTORY_SHARE_POPUP))
        {
                if (GetContentListScreenMode() != CONTENT_LIST_SCREEN_MODE_NORMAL)
                {
-                       ToggleItemCheckedAll(false);
-                       __allSelectToggle = false;
+                       if (pArgs == null)
+                       {
+                               AppLogDebug("EXIT_1");
+                               return;
+                       }
+                       Boolean* pIsInitialize = static_cast<Boolean*>(pArgs->GetAt(0));
+                       if (pIsInitialize->Equals(true))
+                       {
+                               ToggleItemCheckedAll(false);
+                               __allSelectToggle = false;
+                       }
                }
                DestroyPlayListPickerPopup();
+               DestroySharePopup();
+       }
+
+       if (pArgs != null)
+       {
+               pArgs->RemoveAll(true);
+               delete pArgs;
        }
        AppLogDebug("EXIT");
 }
@@ -656,6 +672,7 @@ ContentListForm::ToggleContentListScreenMode(ContentListScreenMode screenMode)
        }
 
        UpdateContentListScreenState();
+       GetHeader()->Invalidate(true);
        __pContentTableView->UpdateTableView();
 
        AppLogDebug("EXIT");
@@ -750,21 +767,23 @@ ContentListForm::TableviewSelectedItemStateChanged(Tizen::Ui::Controls::TableVie
 }
 
 void
-ContentListForm::RemoveCheckedTableviewItem(void)
+ContentListForm::RemoveCheckedTableviewItem(bool itemRemove)
 {
        AppLogDebug("ENTER");
-       int totalCount = __pContentTableView->GetItemCount();
-       for (int iCount = 0; iCount < totalCount; iCount++)
+       if (itemRemove)
        {
-               if (__pContentTableView->IsItemChecked(iCount) == true)
+               int totalCount = __pContentTableView->GetItemCount();
+               for (int iCount = 0; iCount < totalCount; iCount++)
                {
-                       __pContentTableView->SetItemChecked(iCount, false);
-                       ContentInformation* pContentInfo = GetContentInformation(iCount);
-                       RemoveContentAt(pContentInfo->contentId);
-                       delete pContentInfo;
+                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                       {
+                               __pContentTableView->SetItemChecked(iCount, false);
+                               ContentInformation* pContentInfo = GetContentInformation(iCount);
+                               RemoveContentAt(pContentInfo->contentId);
+                               delete pContentInfo;
+                       }
                }
        }
-
        __checkedItemCount = INIT_VALUE;
        __allSelectToggle = false;
        CommonUtil::SetTextItemSelectedBalloonPopup(*__pItemSelectedBalloonPopup, __checkedItemCount);
@@ -870,9 +889,6 @@ ContentListForm::SetCheckedTableviewItemToShareVia(void)
        __pSharePopup->SetShowState(true);
        __pSharePopup->Show();
 
-       ToggleItemCheckedAll(false);
-       __allSelectToggle = false;
-
        AppLogDebug("EXIT");
        return E_SUCCESS;
 }
@@ -914,4 +930,4 @@ ContentListForm::SetActivatedContextItemToPlaylist(void)
 
        AppLogDebug("EXIT");
        return E_SUCCESS;
-}
+}
\ No newline at end of file
index 0980086..9127a2d 100644 (file)
@@ -285,7 +285,7 @@ FolderContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int a
 
        case IDA_FOOTER_BUTTON_DELETE:
                {
-                       RemoveCheckedTableviewItem();
+                       RemoveCheckedTableviewItem(true);
                        __pPresentationModel->RefreshContentList(__currentContentIndex);
 
                        UpdateContentListScreenState();
@@ -570,7 +570,7 @@ void
 FolderContentListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
 {
        AppLogDebug("ENTER");
-       ContentListForm::OnUserEventReceivedN(requestId, null);
+       ContentListForm::OnUserEventReceivedN(requestId, pArgs);
        AppLogDebug("EXIT");
 }
 
index cf3fc47..9954eaa 100644 (file)
@@ -426,6 +426,32 @@ FolderListEditorPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Co
                        delete __pPlayListPickerPopup;
                        __pPlayListPickerPopup = null;
                }
+
+               if (pArgs == null)
+               {
+                       AppLogDebug("EXIT_1");
+                       return;
+               }
+
+               Boolean* pIsInitialize = static_cast<Boolean*>(pArgs->GetAt(0));
+               if (pIsInitialize->Equals(true))
+               {
+                       __checkedItemCount = INIT_VALUE;
+                       SetCheckedCountBalloonPopup(__checkedItemCount);
+
+                       int totalCount = __pPresentationModel->GetAllFolderCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               __pContentTableView->SetItemChecked(iCount, false);
+                       }
+
+                       Form* pForm = dynamic_cast<Form*>(GetParent());
+                       Footer* pFooter = pForm->GetFooter();
+                       CommonUtil::SetFooterItemEnabled(*pFooter, false);
+                       Invalidate(true);
+               }
+               pArgs->RemoveAll(true);
+               delete pArgs;
        }
        AppLogDebug("EXIT");
 }
index 3a1b432..5ff6241 100644 (file)
@@ -614,7 +614,7 @@ PlayerForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                        if (__pSharePopup == null)
                        {
                                __pSharePopup = new (std::nothrow) SharePopup();
-                               __pSharePopup->Initialize();
+                               __pSharePopup->Initialize(this);
                        }
                        pDataList->Add(*(new (std::nothrow) String(*contentPath)));
                        __pSharePopup->SetArguments(pDataList);
@@ -1298,6 +1298,21 @@ PlayerForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::I
                        __pPlayListPickerPopup = null;
                }
        }
+
+       if (requestId == ID_DESTORY_SHARE_POPUP)
+       {
+               if (__pSharePopup != null)
+               {
+                       delete __pSharePopup;
+                       __pSharePopup = null;
+               }
+       }
+
+       if (pArgs != null)
+       {
+               pArgs->RemoveAll(true);
+               delete pArgs;
+       }
        AppLogDebug("EXIT");
 }
 
index 4fb2cac..89986d2 100644 (file)
@@ -107,7 +107,32 @@ PlaylistContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int
 
        case IDA_FOOTER_BUTTON_DELETE:
                {
-                       RemoveCheckedTableviewItem();
+                       if (__currentContentIndex == RECENTLY_ADDED_CONTENT)
+                       {
+                               RemoveCheckedTableviewItem(true);
+                       }
+                       else
+                       {
+                               int totalCount = __pPresentationModel->GetContentCount();
+                               for (int iCount = 0; iCount < totalCount; iCount++)
+                               {
+                                       if (__pContentTableView->IsItemChecked(iCount) == true)
+                                       {
+                                               ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                               if (pContentInfoStruct == null)
+                                               {
+                                                       return;
+                                               }
+                                               __pContentTableView->SetItemChecked(iCount, false);
+                                               __pPresentationModel->DeleteContent(__currentContentIndex, *pContentInfoStruct);
+
+                                               delete pContentInfoStruct;
+                                               pContentInfoStruct = null;
+                                       }
+                               }
+                               RemoveCheckedTableviewItem(false);
+                       }
+
                        __pPresentationModel->UpdatePlaylistContentList(__currentContentIndex, __headerTitle);
                        UpdateContentListScreenState();
                        __pContentTableView->UpdateTableView();
index dd31efa..2779de3 100644 (file)
@@ -28,6 +28,7 @@
 
 using namespace Tizen::App;
 using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
 using namespace Tizen::Base::Runtime;
 using namespace Tizen::Base::Utility;
 using namespace Tizen::Content;
@@ -99,14 +100,18 @@ PlayListPickerPopup::OnActionPerformed(const Tizen::Ui::Control& source, int act
        AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
+
+       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+       pDataList->Construct();
+
        if (actionId == IDA_BUTTON_CANCEL)
        {
                SetShowState(false);
                Invalidate(true);
-               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, null);
+               pDataList->Add(*(new (std::nothrow) Boolean(false)));
+               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, pDataList);
        }
-
-       if (actionId == IDA_BUTTON_CREATE)
+       else if (actionId == IDA_BUTTON_CREATE)
        {
                SetShowState(false);
                Invalidate(true);
@@ -118,7 +123,8 @@ PlayListPickerPopup::OnActionPerformed(const Tizen::Ui::Control& source, int act
                {
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_CREATOR));
                }
-               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, null);
+               pDataList->Add(*(new (std::nothrow) Boolean(true)));
+               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, pDataList);
        }
        AppLogDebug("EXIT");
 }
@@ -313,7 +319,11 @@ PlayListPickerPopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView&
                        int modalResult = 0;
                        messageBox.ShowAndWait(modalResult);
                }
-               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, null);
+               Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+               pDataList->Construct();
+               pDataList->Add(*(new (std::nothrow) Boolean(true)));
+
+               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, pDataList);
        }
        AppLogDebug("EXIT");
 }
index 0027d1b..6935bfb 100644 (file)
@@ -44,6 +44,7 @@ SharePopup::SharePopup(void)
        : __pShareItemTableView(null)
        , __pCancelButton(null)
        , __pDataList(null)
+       , __pControl(null)
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT");
@@ -62,7 +63,7 @@ SharePopup::~SharePopup(void)
 }
 
 result
-SharePopup::Initialize(void)
+SharePopup::Initialize(Tizen::Ui::Control* pControl)
 {
        AppLogDebug("ENTER");
        result r = E_SUCCESS;
@@ -80,7 +81,7 @@ SharePopup::Initialize(void)
        __pCancelButton = static_cast<Button*>(GetControl(IDC_CANCEL_BUTTON));
        __pCancelButton->SetActionId(IDA_BUTTON_CANCEL);
        __pCancelButton->AddActionEventListener(*this);
-
+       __pControl = pControl;
        AppLogDebug("EXIT");
        return r;
 }
@@ -89,10 +90,15 @@ void
 SharePopup::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 {
        AppLogDebug("ENTER");
+       Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+       pDataList->Construct();
+       pDataList->Add(*(new (std::nothrow) Boolean(false)));
+
        if (actionId == IDA_BUTTON_CANCEL)
        {
                SetShowState(false);
                Invalidate(true);
+               __pControl->SendUserEvent(ID_DESTORY_SHARE_POPUP, pDataList);
        }
        AppLogDebug("EXIT");
 }
@@ -270,6 +276,11 @@ SharePopup::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableVie
 
                case INDEX_SHART_ITEM_EMAIL:
                        {
+                               Tizen::Base::Collection::ArrayList* pDataList = new (std::nothrow) ArrayList();
+                               pDataList->Construct();
+                               pDataList->Add(*(new (std::nothrow) Boolean(true)));
+
+                               __pControl->SendUserEvent(ID_DESTORY_SHARE_POPUP, pDataList);
                                LaunchAppControl(OPERATION_ID_COMPOSE, PROVIDER_ID_EMAIL);
                        }
                        break;
index 1edacb0..71b47c6 100644 (file)
@@ -103,8 +103,25 @@ UserPlaylistContentListForm::OnActionPerformed(const Tizen::Ui::Control& source,
 
        case IDA_FOOTER_BUTTON_DELETE:
                {
-                       RemoveCheckedTableviewItem();
-                       __pPresentationModel->UpdatePlaylistContentList(__currentContentIndex, __headerTitle);
+                       int totalCount = __pPresentationModel->GetContentCount();
+                       for (int iCount = 0; iCount < totalCount; iCount++)
+                       {
+                               if (__pContentTableView->IsItemChecked(iCount) == true)
+                               {
+                                       ContentInformation* pContentInfoStruct = __pPresentationModel->GetContentInfoN(iCount);
+                                       __pContentTableView->SetItemChecked(iCount, false);
+                                       if (pContentInfoStruct == null)
+                                       {
+                                               return;
+                                       }
+                                       __pPresentationModel->DeleteContent(USER_CONTENT, *pContentInfoStruct);
+
+                                       delete pContentInfoStruct;
+                                       pContentInfoStruct = null;
+                               }
+                       }
+                       RemoveCheckedTableviewItem(false);
+                       __pPresentationModel->UpdatePlaylistContentList(USER_CONTENT, __headerTitle);
                        UpdateContentListScreenState();
                        __pContentTableView->UpdateTableView();
                }
@@ -328,7 +345,7 @@ void
 UserPlaylistContentListForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
 {
        AppLogDebug("ENTER");
-       ContentListForm::OnUserEventReceivedN(requestId, null);
+       ContentListForm::OnUserEventReceivedN(requestId, pArgs);
        if (requestId == ID_DESTORY_PLAY_LIST_PICKER_POPUP)
        {
                __pPresentationModel->UpdatePlaylistContentList(USER_CONTENT, __headerTitle);