From 5a22537557b34e420e256bc1b236981b3a6e455e Mon Sep 17 00:00:00 2001 From: HeeJu Kang Date: Sat, 11 May 2013 11:57:47 +0900 Subject: [PATCH] Fixed b/s Change-Id: Ib20897eeae5eceb2e601f4ce15ae6b3d2cea1ef9 Signed-off-by: HeeJu Kang --- src/FShell_AppWidgetPopupView.cpp | 28 ++++------------------------ src/FShell_AppWidgetPopupView.h | 5 ----- src/FShell_AppWidgetView.cpp | 10 +++++++++- 3 files changed, 13 insertions(+), 30 deletions(-) diff --git a/src/FShell_AppWidgetPopupView.cpp b/src/FShell_AppWidgetPopupView.cpp index 4637e76..57a9c5b 100644 --- a/src/FShell_AppWidgetPopupView.cpp +++ b/src/FShell_AppWidgetPopupView.cpp @@ -62,8 +62,8 @@ using namespace Tizen::Ui::Animations; namespace Tizen { namespace Shell { -const wchar_t* OPEN_ANIMATION = L"Open"; -const wchar_t* CLOSE_ANIMATION = L"Close"; +const wchar_t* OPEN_ANIMATION = L"PopupOpen"; +const wchar_t* CLOSE_ANIMATION = L"PopupClose"; _AppWidgetPopupView::_AppWidgetPopupView(_AppWidgetView& appwidgetView) : __pAppWidgetPopupViewPresenter(new (std::nothrow) _AppWidgetPopupViewPresenter(*this)) @@ -229,7 +229,8 @@ _AppWidgetPopupView::PlayAnimation(bool open) VisualElementAnimationGroup animationGroup; animationGroup.SetDuration(ANIMATION_DURATION); - animationGroup.SetVisualElementAnimationStatusEventListener(this); +// animationGroup.SetVisualElementAnimationStatusEventListener(this); + animationGroup.SetVisualElementAnimationStatusEventListener(__pAppWidgetView); FloatRectangle bounds = GetBoundsF(); bounds.x = 0.0f; @@ -381,27 +382,6 @@ _AppWidgetPopupView::OnBoundsChanged(void) } void -_AppWidgetPopupView::OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target) -{ -} - -void -_AppWidgetPopupView::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally) -{ - if (keyName == CLOSE_ANIMATION) - { - SysLog(NID_SHELL, "Close AppWidgetPopup"); - Close(); - FireAppWidgetPopupEvent(false); - } -} - -void -_AppWidgetPopupView::OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount) -{ -} - -void _AppWidgetPopupView::OnDraw(void) { __pAppWidgetPopupViewPresenter->Draw(); diff --git a/src/FShell_AppWidgetPopupView.h b/src/FShell_AppWidgetPopupView.h index 21f3330..8677b53 100644 --- a/src/FShell_AppWidgetPopupView.h +++ b/src/FShell_AppWidgetPopupView.h @@ -28,7 +28,6 @@ #include #include #include -#include #include #include @@ -65,7 +64,6 @@ class _IAppWidgetPopupViewEventListener; */ class _AppWidgetPopupView : public Tizen::Ui::_Window - , public Tizen::Ui::Animations::IVisualElementAnimationStatusEventListener , public Tizen::Ui::Controls::_IFrameEventListener { public: @@ -97,9 +95,6 @@ private: virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo); virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo); virtual void OnBoundsChanged(void); - virtual void OnVisualElementAnimationStarted(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target); - virtual void OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally); - virtual void OnVisualElementAnimationRepeated(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, long currentRepeatCount); virtual void OnDraw(void); virtual result OnAttachedToMainTree(void); virtual result OnDetachingFromMainTree(void); diff --git a/src/FShell_AppWidgetView.cpp b/src/FShell_AppWidgetView.cpp index 1e60c64..426371d 100644 --- a/src/FShell_AppWidgetView.cpp +++ b/src/FShell_AppWidgetView.cpp @@ -66,6 +66,8 @@ namespace Tizen { namespace Shell const int ANIMATION_DURATION = 200; const wchar_t* CLICK_ANIMATION = L"Click"; const wchar_t* FLICK_ANIMATION = L"Flick"; +const wchar_t* POPUP_OPEN_ANIMATION = L"PopupOpen"; +const wchar_t* POPUP_CLOSE_ANIMATION = L"PopupClose"; _AppWidgetView::_AppWidgetView(void) : __pAppWidgetViewPresenter(new (std::nothrow) _AppWidgetViewPresenter(*this)) @@ -392,7 +394,6 @@ _AppWidgetView::PlayFlickAnimation(void) animation.SetEndValue(Variant(endBounds)); animation.SetDuration(ANIMATION_DURATION); animation.SetAutoReverseEnabled(true); - animation.SetVisualElementAnimationStatusEventListener(this); pVisualElement->AddAnimation(FLICK_ANIMATION, animation); } @@ -478,6 +479,13 @@ _AppWidgetView::OnVisualElementAnimationStarted(const Tizen::Ui::Animations::Vis void _AppWidgetView::OnVisualElementAnimationFinished(const Tizen::Ui::Animations::VisualElementAnimation& animation, const Tizen::Base::String& keyName, Tizen::Ui::Animations::VisualElement& target, bool completedNormally) { + if (keyName == POPUP_CLOSE_ANIMATION) + { + SysLog(NID_SHELL, "Close AppWidgetPopup"); + __pAppWidgetPopupView->Close(); + __pAppWidgetPopupView.reset(null); +// FireAppWidgetPopupEvent(false); + } } void -- 2.7.4