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)
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,
1141 if (sd->freeze_events) 1141 if (sd->freeze_events)
1142 evas_object_freeze_events_set(VIEW(it), EINA_FALSE); 1142 evas_object_freeze_events_set(VIEW(it), EINA_FALSE);
1143 1143
1144 it->pushing = EINA_FALSE;
1145
1144 eo_do(WIDGET(it), eo_event_callback_call(ELM_NAVIFRAME_EVENT_TRANSITION_FINISHED, EO_OBJ(it))); 1146 eo_do(WIDGET(it), eo_event_callback_call(ELM_NAVIFRAME_EVENT_TRANSITION_FINISHED, EO_OBJ(it)));
1145} 1147}
1146 1148
@@ -1539,6 +1541,7 @@ _item_push_helper(Elm_Naviframe_Item_Data *item)
1539 1541
1540 sd->ops = eina_list_append(sd->ops, nfo); 1542 sd->ops = eina_list_append(sd->ops, nfo);
1541 if (!sd->animator) sd->animator = ecore_animator_add(_deferred, sd); 1543 if (!sd->animator) sd->animator = ecore_animator_add(_deferred, sd);
1544 item->pushing = EINA_TRUE;
1542 } 1545 }
1543 else 1546 else
1544 { 1547 {
@@ -1683,7 +1686,7 @@ _elm_naviframe_item_pop(Eo *obj, Elm_Naviframe_Data *sd)
1683 1686
1684 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it); 1687 ELM_NAVIFRAME_ITEM_DATA_GET(eo_item, it);
1685 1688
1686 if (it->popping) return NULL; 1689 if (it->pushing || it->popping) return NULL;
1687 it->popping = EINA_TRUE; 1690 it->popping = EINA_TRUE;
1688 1691
1689 evas_object_ref(obj); 1692 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)
132 disappear, then deletes the item. The item that was underneath it on the 132 disappear, then deletes the item. The item that was underneath it on the
133 stack will become visible. 133 stack will become visible.
134 134
135 When pop transition animation is in progress, new pop operation is blocked until current pop operation
136 is complete.
137
135 @see also elm_naviframe_content_preserve_on_pop_get() 138 @see also elm_naviframe_content_preserve_on_pop_get()
136 @see also elm_naviframe_item_pop_cb_set() 139 @see also elm_naviframe_item_pop_cb_set()
137 140
@@ -182,13 +185,15 @@ class Elm.Naviframe (Elm.Layout, Elm_Interface_Atspi_Widget_Action)
182 The item pushed becomes one page of the naviframe, this item will be 185 The item pushed becomes one page of the naviframe, this item will be
183 deleted when it is popped. 186 deleted when it is popped.
184 187
188 When push transition animation is in progress, pop operation is blocked until push is complete.
189
185 @see also elm_naviframe_item_style_set() 190 @see also elm_naviframe_item_style_set()
186 @see also elm_naviframe_item_insert_before() 191 @see also elm_naviframe_item_insert_before()
187 @see also elm_naviframe_item_insert_after() 192 @see also elm_naviframe_item_insert_after()
188 193
189 The following styles are available for this item: 194 The following styles are available for this item:
190 @li @c "default" 195 @li @c "default"
191 196
192 @ingroup Naviframe */ 197 @ingroup Naviframe */
193 198
194 return: Elm_Object_Item *; 199 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
63 Evas_Coord minh; 63 Evas_Coord minh;
64 64
65 Eina_Bool title_enabled : 1; 65 Eina_Bool title_enabled : 1;
66 Eina_Bool pushing : 1; /**< a flag to notify the item is on pushing. This flag is set true at the start of item push. */
66 Eina_Bool popping : 1; /**< a flag to notify the item is on poping. this flag is set true at the start of item pop. */ 67 Eina_Bool popping : 1; /**< a flag to notify the item is on poping. this flag is set true at the start of item pop. */
67 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. */ 68 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. */
68}; 69};