Back key enabled for popup
[apps/osp/Gallery.git] / src / GlSlideShowPopUp.cpp
index 7c6a2a4..a15ae72 100644 (file)
@@ -53,6 +53,7 @@ SlideShowPopUp::Initialize(void)
 {
        Button* pCancelButton = null;
        Popup::Construct(L"IDL_SLIDESHOW_SETTING_POPUP");
+       Popup::SetPropagatedKeyEventListener(this);
 
        __pList = static_cast<ListView*>(GetControl(L"IDC_POPUP_LIST"));
 
@@ -108,6 +109,19 @@ SlideShowPopUp::OnListViewItemStateChanged(ListView& listView, int index, int el
        }
 }
 
+bool
+SlideShowPopUp::OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo)
+{
+       AppLogDebug("ENTER");
+
+       if(keyEventInfo.GetKeyCode() == KEY_BACK)
+       {
+               Popup::SetShowState(false);
+               Popup::Show();
+       }
+       return true;
+}
+
 ListItemBase*
 SlideShowPopUp::CreateItem(int index, int itemWidth)
 {