return false - KeyPress;\7f
[apps/osp/Gallery.git] / src / GlSlideShowPopUp.cpp
index f1a5748..ca4af7b 100644 (file)
@@ -2,11 +2,11 @@
 // Tizen Native SDK
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
-//     http://www.tizenopensource.org/license
+//     http://floralicense.org/license/
 //
 // Unless required by applicable law or agreed to in writing, software
 // distributed under the License is distributed on an AS IS BASIS,
@@ -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 false;
+}
+
 ListItemBase*
 SlideShowPopUp::CreateItem(int index, int itemWidth)
 {
@@ -128,14 +142,14 @@ SlideShowPopUp::CreateItem(int index, int itemWidth)
        {
        case 0:
        {
-               pItem->AddElement(Rectangle(0, 0, GetClientAreaBounds().width, listItemHeight), ID_FORMAT_START,
+               pItem->AddElement(Rectangle(25, 0, GetClientAreaBounds().width, listItemHeight), ID_FORMAT_START,
                                ResourceManager::GetString(L"IDS_MEDIABR_OPT_START_SLIDESHOW"), true);
        }
        break;
 
        case 1:
        {
-               pItem->AddElement(Rectangle(0, 0, GetClientAreaBounds().width, listItemHeight), ID_FORMAT_SETTING,
+               pItem->AddElement(Rectangle(25, 0, GetClientAreaBounds().width, listItemHeight), ID_FORMAT_SETTING,
                                ResourceManager::GetString(L"IDS_MEDIABR_BODY_SLIDESHOW_SETTINGS"), true);
        }
        break;