Fixed the malfunction related with check operation
authorJongTaeOh <jongtae.oh@samsung.com>
Tue, 19 Mar 2013 08:19:56 +0000 (17:19 +0900)
committerJongTaeOh <jongtae.oh@samsung.com>
Tue, 19 Mar 2013 08:19:56 +0000 (17:19 +0900)
Change-Id: Ic602a75e7cbe068302e0b90cb4e49291c9353cb2

src/MpAlbumContentListForm.cpp
src/MpAlbumListEditorPanel.cpp
src/MpAllListEditorPanel.cpp
src/MpArtistListEditorPanel.cpp
src/MpPlaylistPickerPopup.cpp

index db05592..85762ef 100644 (file)
@@ -237,17 +237,17 @@ AlbumContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int ac
                                        }
                                        pDataList->Add(*(new (std::nothrow) String(L"attachment:" + pContentInfoStruct->ContentFilePath)));
 
-                                       __pContentTableView->SetItemChecked(iCount, false);
+                               //      __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);
+               //      pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+               //      pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+               //      pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
 
-                       __checkedItemCount = INIT_VALUE;
+               //      __checkedItemCount = INIT_VALUE;
                        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
                        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
@@ -295,7 +295,7 @@ AlbumContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int ac
 
                                        pDataList->Add(*(new (std::nothrow) String(pContentInfoStruct->ContentFilePath)));
 
-                                       __pContentTableView->SetItemChecked(iCount, false);
+                               //      __pContentTableView->SetItemChecked(iCount, false);
 
                                        delete pContentInfoStruct;
                                        pContentInfoStruct = null;
@@ -311,11 +311,11 @@ AlbumContentListForm::OnActionPerformed(const Tizen::Ui::Control& source, int ac
                        __pPlayListPickerPopup->Show();
                        //__pPlayListPickerPopup->SetCollectedContent(pDataList);
 
-                       pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
-                       pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
-                       pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
+               //      pFooter->SetItemEnabled(INDEX_FOOTER_DELETE, false);
+               //      pFooter->SetItemEnabled(INDEX_FOOTER_SHARE, false);
+               //      pFooter->SetItemEnabled(INDEX_FOOTER_ADDTOPLATLIST, false);
 
-                       __checkedItemCount = INIT_VALUE;
+               //      __checkedItemCount = INIT_VALUE;
                        CommonUtil::ShowCheckedCountLabel(*__pCheckedCountLabel, __checkedItemCount, *__pContentTableView, *this);
                        CommonUtil::ShowSelectAllCheckButton(*__pSelectAllCheckedButton);
 
@@ -822,4 +822,4 @@ AlbumContentListForm::OnThumbnailInfoReveivedN(ThumbnailInfo* pThumbnailInfo)
        delete pThumbnailInfo;
        delete static_cast<int*>(pParam);
        AppLogDebug("EXIT");
-}
\ No newline at end of file
+}
index 40fce4c..d100c11 100644 (file)
@@ -459,6 +459,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");
 }
@@ -501,4 +527,4 @@ AlbumListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewIt
        __pThumbnail = null;
        pThumbnailLabel->Invalidate(true);
        AppLogDebug("EXIT");
-}
\ No newline at end of file
+}
index 3c493f6..1e6d587 100644 (file)
@@ -170,7 +170,7 @@ AllListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int acti
                                if (__pContentTableView->IsItemChecked(iCount) == true)
                                {
                                        pDataList->Add(__pPresentationModel->GetCheckedContent(iCount));
-                                       __pContentTableView->SetItemChecked(iCount, false);
+                               //      __pContentTableView->SetItemChecked(iCount, false);
                                }
                        }
 
@@ -179,11 +179,11 @@ AllListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int acti
                        __pPlayListPickerPopup->SetShowState(true);
                        __pPlayListPickerPopup->Show();
 
-                       __checkedItemCount = INIT_VALUE;
+       //              __checkedItemCount = INIT_VALUE;
                        SetCheckedCountBalloonPopup(__checkedItemCount);
                        SetUnCheckedIconAllCheckButton();
 
-                       CommonUtil::SetFooterItemEnabled(*pFooter, false);
+               //      CommonUtil::SetFooterItemEnabled(*pFooter, false);
                        __pContentTableView->Invalidate(true);
                }
                break;
@@ -572,8 +572,34 @@ AllListEditorPanel::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Colle
                        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->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;
        }
-       AppLogDebug("EXIT");
+       AppLogDebug("EXIT_2");
 }
 
 void
@@ -614,4 +640,4 @@ AllListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem
        __pThumbnail = null;
        pThumbnailLabel->Invalidate(true);
        AppLogDebug("EXIT");
-}
\ No newline at end of file
+}
index d8db084..9b7b4c6 100644 (file)
@@ -451,6 +451,32 @@ ArtistListEditorPanel::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->GetArtistListCount();
+                       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");
 }
@@ -493,4 +519,4 @@ ArtistListEditorPanel::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewI
        __pThumbnail = null;
        pThumbnailLabel->Invalidate(true);
        AppLogDebug("EXIT");
-}
\ No newline at end of file
+}
index 5ae2ab4..6747554 100644 (file)
@@ -30,6 +30,7 @@ using namespace Tizen::App;
 using namespace Tizen::Base;
 using namespace Tizen::Base::Runtime;
 using namespace Tizen::Base::Utility;
+using namespace Tizen::Base::Collection;
 using namespace Tizen::Content;
 using namespace Tizen::Graphics;
 using namespace Tizen::Io;
@@ -99,14 +100,19 @@ 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();
+       pDataList->Add(*(new (std::nothrow) Boolean(false)));
+
        if (actionId == IDA_BUTTON_CANCEL)
        {
                SetShowState(false);
                Invalidate(true);
-               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, null);
-       }
 
-       if (actionId == IDA_BUTTON_CREATE)
+               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, pDataList);
+       }
+       else if (actionId == IDA_BUTTON_CREATE)
        {
                SetShowState(false);
                Invalidate(true);
@@ -118,7 +124,7 @@ PlayListPickerPopup::OnActionPerformed(const Tizen::Ui::Control& source, int act
                {
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYLIST_CREATOR));
                }
-               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, null);
+               __pControl->SendUserEvent(ID_DESTORY_PLAY_LIST_PICKER_POPUP, pDataList);
        }
        AppLogDebug("EXIT");
 }
@@ -313,7 +319,12 @@ 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");
 }