From: Himanshu Date: Fri, 21 Jun 2013 05:48:36 +0000 (+0530) Subject: Removed the deprecated Menu and Back buuton api X-Git-Tag: submit/tizen_2.2/20130714.134410~41 X-Git-Url: http://review.tizen.org/git/?p=apps%2Fosp%2FGallery.git;a=commitdiff_plain;h=14f18a3280b720fd40d09289ef3c76e04e986d11 Removed the deprecated Menu and Back buuton api Change-Id: I6a02dce8b5b94b3dd0af37d862bb050b998d0114 Signed-off-by: Himanshu --- diff --git a/inc/GlFileListForm.h b/inc/GlFileListForm.h index f98f7f8..e69a37a 100644 --- a/inc/GlFileListForm.h +++ b/inc/GlFileListForm.h @@ -57,13 +57,13 @@ public: virtual void OnFormMenuRequested (Tizen::Ui::Controls::Form &source); - void SetFooterState(bool state); + void SetMenuState(bool state); private: result InitializeFooter(void); private: - + bool __menuState; Tizen::Ui::Controls::OptionMenu* __pOptionMenu; SlideShowPopUp* __pPopUp; FileListPresentationModel* __pPresentationModel; diff --git a/res/screen-size-normal/IDL_FORM_ALBUM_LIST.xml b/res/screen-size-normal/IDL_FORM_ALBUM_LIST.xml index 484d1fa..b2f6b5e 100644 --- a/res/screen-size-normal/IDL_FORM_ALBUM_LIST.xml +++ b/res/screen-size-normal/IDL_FORM_ALBUM_LIST.xml @@ -3,8 +3,7 @@ This XML file was automatically generated by UiBuilder - do not modify by hand. --> - - + 720
@@ -12,11 +11,11 @@
- +
- +
diff --git a/res/screen-size-normal/IDL_FORM_SETTING_MAIN.xml b/res/screen-size-normal/IDL_FORM_SETTING_MAIN.xml index 759e035..8f48b9a 100644 --- a/res/screen-size-normal/IDL_FORM_SETTING_MAIN.xml +++ b/res/screen-size-normal/IDL_FORM_SETTING_MAIN.xml @@ -3,7 +3,7 @@ This XML file was automatically generated by UiBuilder - do not modify by hand. --> - + 720
@@ -11,7 +11,7 @@
- +
diff --git a/src/GlAlbumListForm.cpp b/src/GlAlbumListForm.cpp index 143a193..7b543c4 100644 --- a/src/GlAlbumListForm.cpp +++ b/src/GlAlbumListForm.cpp @@ -157,14 +157,11 @@ AlbumListForm::InitializeFooter(void) if (__pPresentationModel->GetAppControlMode() == APPCONTROL_MODE_PICK) { - pFooter->SetBackButton(); SetFormBackEventListener(this); } else { pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON); - pFooter->SetBackButton(); - pFooter->SetMenuButton(); pFooter->RemoveAllItems(); FooterItem itemCamera; @@ -416,15 +413,6 @@ AlbumListForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& } __itemCount = __pPresentationModel->GetFolderCount(); - if ( __itemCount == 0 ) - { - GetFooter()->SetMenuButtonEnabled(false); - } - else - { - GetFooter()->SetMenuButtonEnabled(true); - } - if (__pAlbumViewIconList != null) { __pAlbumViewIconList->UpdateList(); @@ -477,16 +465,6 @@ AlbumListForm::OnContentUpdated(void) __itemCount = __pPresentationModel->GetFolderCount(); __pAlbumViewIconList->UpdateList(); - if (__itemCount == 0 ) - { - GetFooter()->SetMenuButtonEnabled(false); - } - else - { - GetFooter()->SetMenuButtonEnabled(true); - } - - GetFooter()->Invalidate(true); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); } diff --git a/src/GlAlbumNameEditorForm.cpp b/src/GlAlbumNameEditorForm.cpp index a2e945e..4da5a0a 100644 --- a/src/GlAlbumNameEditorForm.cpp +++ b/src/GlAlbumNameEditorForm.cpp @@ -101,9 +101,6 @@ AlbumNameEditorForm::OnInitializing(void) pHeader->SetStyle(HEADER_STYLE_TITLE); - GetFooter()->SetBackButtonEnabled(true); - GetFooter()->SetBackButton(); - FooterItem itemSave; itemSave.Construct(IDA_BUTTON_CREATE_NAME_SAVE); itemSave.SetText(ResourceManager::GetString(L"IDS_COM_OPT_SAVE")); diff --git a/src/GlAllListPanel.cpp b/src/GlAllListPanel.cpp index a91d0e4..e7590a6 100644 --- a/src/GlAllListPanel.cpp +++ b/src/GlAllListPanel.cpp @@ -360,11 +360,11 @@ AllListPanel::OnSceneActivatedN(const SceneId& previousSceneId, if( __itemCount == 0) { - pFileListForm->SetFooterState(false); + pFileListForm->SetMenuState(false); } else { - pFileListForm->SetFooterState(true); + pFileListForm->SetMenuState(true); } } diff --git a/src/GlFileListEditorForm.cpp b/src/GlFileListEditorForm.cpp index 1236ea5..82c206f 100644 --- a/src/GlFileListEditorForm.cpp +++ b/src/GlFileListEditorForm.cpp @@ -170,14 +170,13 @@ FileListEditorForm::InitializeFooter(void) { pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_TEXT); } - pFooter->SetBackButton(); + SetFormBackEventListener(this); } else { pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT); - pFooter->SetMenuButton(); SetFormMenuEventListener(this); FooterItem footerShare; @@ -214,7 +213,6 @@ FileListEditorForm::InitializeFooter(void) delete pBitmapDeleteDim; TryReturn(r == E_SUCCESS, r, "[%s] Unable to add item", GetErrorMessage(r)); - pFooter->SetBackButton(); SetFormBackEventListener(this); SceneManager* pSceneManager = SceneManager::GetInstance(); @@ -1053,13 +1051,11 @@ FileListEditorForm::SetFooterButtonsState(const bool enableState) { if (enableState == true) { - pFooter->SetMenuButtonEnabled(true); pFooter->SetItemEnabled(0, true); pFooter->SetItemEnabled(1, true); } else { - pFooter->SetMenuButtonEnabled(false); pFooter->SetItemEnabled(0, false); pFooter->SetItemEnabled(1, false); } diff --git a/src/GlFileListForm.cpp b/src/GlFileListForm.cpp index 0e96fae..b6f4fc1 100644 --- a/src/GlFileListForm.cpp +++ b/src/GlFileListForm.cpp @@ -39,7 +39,8 @@ using namespace Tizen::Ui::Scenes; using namespace Tizen::Content; FileListForm::FileListForm(void) - : __pOptionMenu(null) + : __menuState(true) + , __pOptionMenu(null) , __pPopUp(null) , __pPresentationModel(null) { @@ -193,8 +194,6 @@ FileListForm::InitializeFooter(void) pFooter->RemoveAllItems(); pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON); - pFooter->SetMenuButton(); - pFooter->SetBackButton(); FooterItem itemCamera; itemCamera.Construct(IDA_FOOTER_CAMERA); @@ -294,24 +293,26 @@ FileListForm::OnSlideSettingPopUpItemSelected(int index) } void -FileListForm::SetFooterState(bool state) +FileListForm::SetMenuState(bool state) { - GetFooter()->SetMenuButtonEnabled(state); - GetFooter()->Invalidate(true); + __menuState = state; } void FileListForm::OnFormMenuRequested (Tizen::Ui::Controls::Form &source) { - InitializeFooter(); - - if ( __pOptionMenu == null ) + if (__menuState == true ) { - return ; - } + InitializeFooter(); - __pOptionMenu->SetShowState(true); - __pOptionMenu->Show(); + if ( __pOptionMenu == null ) + { + return ; + } + + __pOptionMenu->SetShowState(true); + __pOptionMenu->Show(); + } } diff --git a/src/GlSettingMainForm.cpp b/src/GlSettingMainForm.cpp index c25cdaf..51ae65f 100644 --- a/src/GlSettingMainForm.cpp +++ b/src/GlSettingMainForm.cpp @@ -90,13 +90,6 @@ SettingMainForm::OnInitializing(void) __pList->AddGroupedListViewItemEventListener(*this); } - Footer* pFooter = GetFooter(); - if (pFooter) - { - AppLogDebug("setting back button"); - pFooter->SetBackButtonEnabled(true); - } - SetFormBackEventListener(this); AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));