From d6cfb5122bfed4b84e0b0fb316114c4b9613a2b9 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Fri, 12 Jul 2013 07:20:01 +0900 Subject: [PATCH] Opps revert this commit. It was my mistake. Sorry. Revert "sldkfj" This reverts commit a52b461984914211ee98f390b957b0c370347bfc. --- legacy/elementary/ChangeLog | 4 -- legacy/elementary/NEWS | 1 - .../elementary/data/themes/widgets/notify.edc | 71 +++---------------- legacy/elementary/src/lib/elm_notify.c | 27 +------ legacy/elementary/src/lib/elm_widget_notify.h | 2 - 5 files changed, 11 insertions(+), 94 deletions(-) diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index f58cf80d52..881226dcf7 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -1495,7 +1495,3 @@ 2013-07-06 Shinwoo Kim * Add elm_access_highlight_next_set, export elm_widget_focus_region_show - -2013-07-07 Thiep Ha - - * Add hide effect for notify. diff --git a/legacy/elementary/NEWS b/legacy/elementary/NEWS index afff7980a2..72ff2bff51 100644 --- a/legacy/elementary/NEWS +++ b/legacy/elementary/NEWS @@ -122,7 +122,6 @@ Improvements: * Move cursor when mouse moves with longpress. * Show magnifier when selection handlers are pressed or moved. * Change the method to calculate a distance which be scrolled from linear to sine curve. - * Add hide effect for notify. Fixes: * Now elm_datetime_field_limit_set() can set year limits wihtout problems. diff --git a/legacy/elementary/data/themes/widgets/notify.edc b/legacy/elementary/data/themes/widgets/notify.edc index 339b59e2f5..32bdd545f8 100644 --- a/legacy/elementary/data/themes/widgets/notify.edc +++ b/legacy/elementary/data/themes/widgets/notify.edc @@ -96,15 +96,9 @@ group { name: "elm/notify/top/default"; transition: LINEAR 0.5; } program { name: "hide"; - signal: "elm,state,hide"; - source: "elm"; + signal: "hide"; action: STATE_SET "default" 0.0; target: "base"; - transition: LINEAR 0.5; - after: "hide_finished"; - } - program { name: "hide_finished"; - action: SIGNAL_EMIT "elm,action,hide,finished" ""; } } } @@ -145,13 +139,6 @@ group { name: "elm/notify/center/default"; } } } - programs { - program { name: "hide"; - signal: "elm,state,hide"; - source: "elm"; - action: SIGNAL_EMIT "elm,action,hide,finished" ""; - } - } } group { name: "elm/notify/bottom/default"; //this group is a design similar to the inwin group @@ -232,15 +219,9 @@ group { name: "elm/notify/bottom/default"; transition: LINEAR 0.5; } program { name: "hide"; - signal: "elm,state,hide"; - source: "elm"; + signal: "hide"; action: STATE_SET "default" 0.0; target: "base"; - transition: LINEAR 0.5; - after: "hide_finished"; - } - program { name: "hide_finished"; - action: SIGNAL_EMIT "elm,action,hide,finished" ""; } } } @@ -323,15 +304,9 @@ group { name: "elm/notify/left/default"; transition: LINEAR 0.5; } program { name: "hide"; - signal: "elm,state,hide"; - source: "elm"; + signal: "hide"; action: STATE_SET "default" 0.0; target: "base"; - transition: LINEAR 0.5; - after: "hide_finished"; - } - program { name: "hide_finished"; - action: SIGNAL_EMIT "elm,action,hide,finished" ""; } } } @@ -414,15 +389,9 @@ group { name: "elm/notify/right/default"; transition: LINEAR 0.5; } program { name: "hide"; - signal: "elm,state,hide"; - source: "elm"; + signal: "hide"; action: STATE_SET "default" 0.0; target: "base"; - transition: LINEAR 0.5; - after: "hide_finished"; - } - program { name: "hide_finished"; - action: SIGNAL_EMIT "elm,action,hide,finished" ""; } } } @@ -505,15 +474,9 @@ group { name: "elm/notify/top_left/default"; transition: LINEAR 0.5; } program { name: "hide"; - signal: "elm,state,hide"; - source: "elm"; + signal: "hide"; action: STATE_SET "default" 0.0; target: "base"; - transition: LINEAR 0.5; - after: "hide_finished"; - } - program { name: "hide_finished"; - action: SIGNAL_EMIT "elm,action,hide,finished" ""; } } } @@ -596,15 +559,9 @@ group { name: "elm/notify/top_right/default"; transition: LINEAR 0.5; } program { name: "hide"; - signal: "elm,state,hide"; - source: "elm"; + signal: "hide"; action: STATE_SET "default" 0.0; target: "base"; - transition: LINEAR 0.5; - after: "hide_finished"; - } - program { name: "hide_finished"; - action: SIGNAL_EMIT "elm,action,hide,finished" ""; } } } @@ -687,15 +644,9 @@ group { name: "elm/notify/bottom_left/default"; transition: LINEAR 0.5; } program { name: "hide"; - signal: "elm,state,hide"; - source: "elm"; + signal: "hide"; action: STATE_SET "default" 0.0; target: "base"; - transition: LINEAR 0.5; - after: "hide_finished"; - } - program { name: "hide_finished"; - action: SIGNAL_EMIT "elm,action,hide,finished" ""; } } } @@ -778,15 +729,9 @@ group { name: "elm/notify/bottom_right/default"; transition: LINEAR 0.5; } program { name: "hide"; - signal: "elm,state,hide"; - source: "elm"; + signal: "hide"; action: STATE_SET "default" 0.0; target: "base"; - transition: LINEAR 0.5; - after: "hide_finished"; - } - program { name: "hide_finished"; - action: SIGNAL_EMIT "elm,action,hide,finished" ""; } } } diff --git a/legacy/elementary/src/lib/elm_notify.c b/legacy/elementary/src/lib/elm_notify.c index d1744ada70..a43d573ffd 100644 --- a/legacy/elementary/src/lib/elm_notify.c +++ b/legacy/elementary/src/lib/elm_notify.c @@ -248,8 +248,7 @@ _timer_cb(void *data) sd->timer = NULL; if (!evas_object_visible_get(obj)) goto end; - sd->in_timeout = EINA_TRUE; - edje_object_signal_emit(sd->notify, "elm,state,hide", "elm"); + evas_object_hide(obj); evas_object_smart_callback_call(obj, SIG_TIMEOUT, NULL); end: @@ -272,8 +271,6 @@ _elm_notify_smart_show(Eo *obj, void *_pd, va_list *list EINA_UNUSED) { Elm_Notify_Smart_Data *sd = _pd; - sd->had_hidden = EINA_FALSE; - sd->in_timeout = EINA_FALSE; eo_do_super(obj, MY_CLASS, evas_obj_smart_show()); evas_object_show(sd->notify); @@ -287,12 +284,10 @@ _elm_notify_smart_hide(Eo *obj, void *_pd, va_list *list EINA_UNUSED) { Elm_Notify_Smart_Data *sd = _pd; - if (sd->had_hidden && !sd->in_timeout) - return; eo_do_super(obj, MY_CLASS, evas_obj_smart_hide()); - if (!sd->in_timeout) - edje_object_signal_emit(sd->notify, "elm,state,hide", "elm"); + evas_object_hide(sd->notify); + if (!sd->allow_events) evas_object_hide(sd->block_events); ELM_SAFE_FREE(sd->timer, ecore_timer_del); } @@ -438,18 +433,6 @@ _elm_notify_smart_content_unset(Eo *obj, void *_pd, va_list *list) if (ret) *ret = content; } -static void -_hide_finished_cb(void *data, - Evas_Object *obj __UNUSED__, - const char *emission __UNUSED__, - const char *source __UNUSED__) -{ - ELM_NOTIFY_DATA_GET(data, sd); - sd->had_hidden = EINA_TRUE; - evas_object_hide(sd->notify); - if (!sd->allow_events) evas_object_hide(sd->block_events); -} - static void _elm_notify_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) { @@ -465,8 +448,6 @@ _elm_notify_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED) evas_object_event_callback_add (obj, EVAS_CALLBACK_RESTACK, _restack_cb, obj); - edje_object_signal_callback_add - (priv->notify, "elm,action,hide,finished","", _hide_finished_cb, obj); elm_widget_can_focus_set(obj, EINA_FALSE); elm_notify_align_set(obj, 0.5, 0.0); @@ -477,8 +458,6 @@ _elm_notify_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED) { Elm_Notify_Smart_Data *sd = _pd; - edje_object_signal_callback_del_full - (sd->notify, "elm,action,hide,finished", "", _hide_finished_cb, obj); elm_notify_parent_set(obj, NULL); elm_notify_allow_events_set(obj, EINA_FALSE); if (sd->timer) ecore_timer_del(sd->timer); diff --git a/legacy/elementary/src/lib/elm_widget_notify.h b/legacy/elementary/src/lib/elm_widget_notify.h index ac6c006836..701bb45a78 100644 --- a/legacy/elementary/src/lib/elm_widget_notify.h +++ b/legacy/elementary/src/lib/elm_widget_notify.h @@ -28,8 +28,6 @@ struct _Elm_Notify_Smart_Data Ecore_Timer *timer; Eina_Bool allow_events : 1; - Eina_Bool had_hidden : 1; - Eina_Bool in_timeout : 1; }; /**