Back Key support in Progress popup.
authorkishorekumar Dachinamoorthy <kishore.d@samsung.com>
Mon, 24 Jun 2013 14:20:28 +0000 (19:50 +0530)
committerkishorekumar Dachinamoorthy <kishore.d@samsung.com>
Tue, 25 Jun 2013 13:32:08 +0000 (19:02 +0530)
Change-Id: I32fe8bdb672e7197539230ca749a994ebc44f70b
Signed-off-by: kishorekumar Dachinamoorthy <kishore.d@samsung.com>
src/ui/controls/FUiCtrl_ProgressPopup.cpp
src/ui/inc/FUiCtrl_ProgressPopup.h

index d2860ef..d401fab 100644 (file)
@@ -988,6 +988,21 @@ _ProgressPopup::OnTouchPressed(const _Control& source, const _TouchInfo& touchin
 }
 
 bool
+_ProgressPopup::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
+{
+       _KeyCode keyCode = keyInfo.GetKeyCode();
+
+       if (keyCode == _KEY_ESC || keyCode == _KEY_BACK)
+       {
+               FireProgressPopupEvent();
+               _Popup::SetReturnValue(POPUP_RESULT_CANCEL);
+               return true;
+       }
+
+       return false;
+}
+
+bool
 _ProgressPopup::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo)
 {
        if (&source != this)
index b9f86a4..15b4843 100644 (file)
@@ -79,6 +79,7 @@ public:
        virtual void OnVisibleStateChanged(void);
        virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
        virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId);
+       virtual bool OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo);
 
        virtual void OnBoundsChanged(void);