Removed the deprecated Menu and Back buuton api
[apps/osp/Gallery.git] / src / GlFileListForm.cpp
index 0e96fae..b6f4fc1 100644 (file)
@@ -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();
+       }
 
 }