Added IPropagatedListener to the progressing popup
[apps/osp/Gallery.git] / src / GlTimerBase.cpp
index 70d995e..4c26db0 100644 (file)
@@ -68,7 +68,7 @@ GlTimerBase::StartTimer(void)
        if (__pContentIdList != null && __pContentIdList->GetCount() > 0)
        {
                AppLogDebug("Starting timer");
-               __pMoveProBar = new (std::nothrow) GlProgressBar(static_cast<IActionEventListener*>(this));
+               __pMoveProBar = new (std::nothrow) GlProgressBar(static_cast<IActionEventListener*>(this), static_cast<IPropagatedKeyEventListener*>(this));
                __pMoveProBar->ShowFileProgressingPopup(__pContentIdList->GetCount(), _actionId);
                __moveToCount = 0;
                __moveTimer.Construct(*this);
@@ -237,3 +237,15 @@ void GlTimerBase::Cancel(void)
        }
 
 }
+
+bool
+GlTimerBase::OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo)
+{
+       AppLogDebug("ENTER");
+
+       if(keyEventInfo.GetKeyCode() == KEY_BACK)
+       {
+               CancelTimer();
+       }
+       return true;
+}