Back key enabled for popup
[apps/osp/Gallery.git] / src / GlAlbumListEditorForm.cpp
index 8e3ac3f..25c0950 100644 (file)
@@ -191,6 +191,7 @@ AlbumListEditorForm::InitializePopup(void)
        {
                __pDeletePopup = new (std::nothrow) Popup();
                __pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP));
+               __pDeletePopup->SetPropagatedKeyEventListener(this);
 
                Rectangle popupClientBounds = __pDeletePopup->GetClientAreaBounds();
 
@@ -759,6 +760,18 @@ void AlbumListEditorForm::OnFileOpComplete(enum FileActionMode actionId, enum Fi
        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
 }
 
+bool AlbumListEditorForm::OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo)
+{
+       AppLogDebug("ENTER");
+
+       if(keyEventInfo.GetKeyCode() == KEY_BACK)
+       {
+               __pDeletePopup->SetShowState(false);
+               __pDeletePopup->Show();
+       }
+       return true;
+}
+
 result
 AlbumListEditorForm::Update(void)
 {