summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-11-20 16:41:30 +0530
committerAmitesh Singh <amitesh.sh@samsung.com>2015-11-20 17:05:43 +0530
commit112abbf507561363a70541d416310b287c138a74 (patch)
treef0992229cbe8b4643d47994b7a3ca44793250e58
parent81b5ee7e16c37f96e2ac11d13893720bdd637e5c (diff)
notify: fix hide animation
This feature has been added long time ago but it never worked before. I delayed the parent object hide call when hide signal is present in theme. Test: 1. elementary_test -to notify 2. Click Left and wait for timer to expire 3. Click Left and click "close" button on notify. Now hide animation happens when notify hides. @fix
-rw-r--r--src/lib/elm_notify.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c
index 3e78ad94f..cec6104a5 100644
--- a/src/lib/elm_notify.c
+++ b/src/lib/elm_notify.c
@@ -247,7 +247,6 @@ _elm_notify_evas_object_smart_move(Eo *obj, Elm_Notify_Data *sd EINA_UNUSED, Eva
247static Eina_Bool 247static Eina_Bool
248_timer_cb(void *data) 248_timer_cb(void *data)
249{ 249{
250 const char *hide_signal;
251 Evas_Object *obj = data; 250 Evas_Object *obj = data;
252 251
253 ELM_NOTIFY_DATA_GET(obj, sd); 252 ELM_NOTIFY_DATA_GET(obj, sd);
@@ -255,16 +254,7 @@ _timer_cb(void *data)
255 sd->timer = NULL; 254 sd->timer = NULL;
256 if (!evas_object_visible_get(obj)) goto end; 255 if (!evas_object_visible_get(obj)) goto end;
257 256
258 hide_signal = edje_object_data_get(sd->notify, "hide_finished_signal"); 257 evas_object_hide(obj);
259 if ((hide_signal) && (!strcmp(hide_signal, "on")))
260 {
261 sd->in_timeout = EINA_TRUE;
262 edje_object_signal_emit(sd->notify, "elm,state,hide", "elm");
263 }
264 else //for backport supporting: edc without emitting hide finished signal
265 {
266 evas_object_hide(obj);
267 }
268 eo_do(obj, eo_event_callback_call(ELM_NOTIFY_EVENT_TIMEOUT, NULL)); 258 eo_do(obj, eo_event_callback_call(ELM_NOTIFY_EVENT_TIMEOUT, NULL));
269 259
270end: 260end:
@@ -302,7 +292,6 @@ _elm_notify_evas_object_smart_hide(Eo *obj, Elm_Notify_Data *sd)
302 292
303 if (sd->had_hidden && !sd->in_timeout) 293 if (sd->had_hidden && !sd->in_timeout)
304 return; 294 return;
305 eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
306 295
307 hide_signal = edje_object_data_get(sd->notify, "hide_finished_signal"); 296 hide_signal = edje_object_data_get(sd->notify, "hide_finished_signal");
308 if ((hide_signal) && (!strcmp(hide_signal, "on"))) 297 if ((hide_signal) && (!strcmp(hide_signal, "on")))
@@ -312,6 +301,7 @@ _elm_notify_evas_object_smart_hide(Eo *obj, Elm_Notify_Data *sd)
312 } 301 }
313 else //for backport supporting: edc without emitting hide finished signal 302 else //for backport supporting: edc without emitting hide finished signal
314 { 303 {
304 eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
315 evas_object_hide(sd->notify); 305 evas_object_hide(sd->notify);
316 if (sd->allow_events) evas_object_hide(sd->block_events); 306 if (sd->allow_events) evas_object_hide(sd->block_events);
317 } 307 }
@@ -431,7 +421,7 @@ _hide_finished_cb(void *data,
431 sd->had_hidden = EINA_TRUE; 421 sd->had_hidden = EINA_TRUE;
432 evas_object_hide(sd->notify); 422 evas_object_hide(sd->notify);
433 if (!sd->allow_events) evas_object_hide(sd->block_events); 423 if (!sd->allow_events) evas_object_hide(sd->block_events);
434 evas_object_hide(data); 424 eo_do_super(data, MY_CLASS, evas_obj_smart_hide());
435} 425}
436 426
437EOLIAN static void 427EOLIAN static void