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
This commit is contained in:
Shilpa Singh 2015-08-28 18:28:19 +09:00 committed by ChunEon Park
parent b4f525e140
commit 6dc7d1b55f
3 changed files with 12 additions and 2 deletions

View File

@ -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);

View File

@ -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"]]

View File

@ -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. */
};