summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShilpa Singh <shilpa.singh@samsung.com>2015-08-28 18:28:19 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-08-28 18:32:17 +0900
commit9986d4389f1b6543600e2fdcd07b05f9f6791dcb (patch)
treeaab4f1859af2d847a564958a9b7375b3dd9126f4
parent88bcf35b0340f8d623d669be42bb0abbbfa0b6dc (diff)
downloadelementary-9986d4389f1b6543600e2fdcd07b05f9f6791dcb.tar.gz
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 Conflicts: src/lib/elm_naviframe.eo
-rw-r--r--src/lib/elc_naviframe.c5
-rw-r--r--src/lib/elm_naviframe.eo7
-rw-r--r--src/lib/elm_widget_naviframe.h1
3 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c
index 797916184..4eab3c9a8 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 aa7ab0708..33ead03ba 100644
--- a/src/lib/elm_naviframe.eo
+++ b/src/lib/elm_naviframe.eo
@@ -132,6 +132,9 @@ class Elm.Naviframe (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
disappear, then deletes the item. The item that was underneath it on the
stack will become visible.
+ When pop transition animation is in progress, new pop operation is blocked until current pop operation
+ is complete.
+
@see also elm_naviframe_content_preserve_on_pop_get()
@see also elm_naviframe_item_pop_cb_set()
@@ -182,13 +185,15 @@ 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.
+
@see also elm_naviframe_item_style_set()
@see also elm_naviframe_item_insert_before()
@see also elm_naviframe_item_insert_after()
The following styles are available for this item:
@li @c "default"
-
+
@ingroup Naviframe */
return: Elm_Object_Item *;
diff --git a/src/lib/elm_widget_naviframe.h b/src/lib/elm_widget_naviframe.h
index ef199e7a7..0bc526473 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. */
};