hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0fadfa4a46e72a8b19af3ce30625b968f2f0bd9e
commit 0fadfa4a46e72a8b19af3ce30625b968f2f0bd9e Author: Shilpa Singh <[email protected]> Date: Fri Aug 28 18:28:19 2015 +0900 Elc_Naviframe: When push is in progress, block pop until push is complete. Summary: When push is in progress, block popping until push is complete to allow animation to complete. @fix Reviewers: Hermet Subscribers: subodh6129, shashank0990 Differential Revision: https://phab.enlightenment.org/D2966 --- src/lib/elc_naviframe.c | 5 ++++- src/lib/elm_naviframe.eo | 8 +++++++- src/lib/elm_widget_naviframe.h | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c index c9765e2..c9433cc 100644 --- a/src/lib/elc_naviframe.c +++ b/src/lib/elc_naviframe.c @@ -1141,6 +1141,8 @@ _on_item_show_finished(void *data, if (sd->freeze_events) evas_object_freeze_events_set(VIEW(it), EINA_FALSE); + it->pushing = EINA_FALSE; + eo_do(WIDGET(it), eo_event_callback_call(ELM_NAVIFRAME_EVENT_TRANSITION_FINISHED, EO_OBJ(it))); } @@ -1539,6 +1541,7 @@ _item_push_helper(Elm_Naviframe_Item_Data *item) sd->ops = eina_list_append(sd->ops, nfo); if (!sd->animator) sd->animator = ecore_animator_add(_deferred, sd); + item->pushing = EINA_TRUE; } else { @@ -1683,7 +1686,7 @@ _elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd) ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it); - if (it->popping) return NULL; + if (it->pushing || it->popping) return NULL; it->popping = EINA_TRUE; evas_object_ref(obj); diff --git a/src/lib/elm_naviframe.eo b/src/lib/elm_naviframe.eo index b4ad965..0978797 100644 --- a/src/lib/elm_naviframe.eo +++ b/src/lib/elm_naviframe.eo @@ -65,7 +65,11 @@ class Elm.Naviframe (Elm.Layout, Elm_Interface_Atspi_Widget_Action) This pops an item that is on the top(visible) of the naviframe, makes it disappear, then deletes the item. The item that was underneath it on the - stack will become visible.]] + stack will become visible. + + When pop transition animation is in progress, new pop operation is blocked until current pop operation + is complete. + ]] return: Evas.Object *; [[$NULL or the content object(if the elm_naviframe_content_preserve_on_pop_get is true).]] } @@ -91,6 +95,8 @@ class Elm.Naviframe (Elm.Layout, Elm_Interface_Atspi_Widget_Action) The item pushed becomes one page of the naviframe, this item will be deleted when it is popped. + + When push transition animation is in progress, pop operation is blocked until push is complete. The following styles are available for this item: "default"]] diff --git a/src/lib/elm_widget_naviframe.h b/src/lib/elm_widget_naviframe.h index ef199e7..0bc5264 100644 --- a/src/lib/elm_widget_naviframe.h +++ b/src/lib/elm_widget_naviframe.h @@ -63,6 +63,7 @@ struct _Elm_Naviframe_Item_Data Evas_Coord minh; Eina_Bool title_enabled : 1; + Eina_Bool pushing : 1; /**< a flag to notify the item is on pushing. This flag is set true at the start of item push. */ Eina_Bool popping : 1; /**< a flag to notify the item is on poping. this flag is set true at the start of item pop. */ Eina_Bool delete_me : 1; /**< a flag to notify the item is on deletion. this flag is set true at the start of item deletion. */ }; --
