naviframe: Fix smart_show function to show only top item view

Summary:
Now if evas_object_show is called for naviframe, all item views are shown.
This may cause the previous item view is overlapped to the top item view.
To resolve this problem, fix smart_show of naviframe to show only top item view.
@fix

Reviewers: Hermet

CC: seoz

Differential Revision: https://phab.enlightenment.org/D594
This commit is contained in:
Jaehyun Cho 2014-03-07 11:12:06 +09:00 committed by ChunEon Park
parent 45444cf98c
commit 698eb0c7fc
1 changed files with 12 additions and 0 deletions

View File

@ -1406,6 +1406,17 @@ _elm_naviframe_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
}
//Show only the top item view
static void
_elm_naviframe_smart_show(Eo *obj, void *_pd EINA_UNUSED, va_list *list EINA_UNUSED)
{
Elm_Naviframe_Item *top;
top = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj);
if (top && !top->delete_me)
evas_object_show(VIEW(top));
}
static void
_elm_naviframe_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
{
@ -2136,6 +2147,7 @@ _class_constructor(Eo_Class *klass)
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_ADD), _elm_naviframe_smart_add),
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_DEL), _elm_naviframe_smart_del),
EO_OP_FUNC(EVAS_OBJ_SMART_ID(EVAS_OBJ_SMART_SUB_ID_SHOW), _elm_naviframe_smart_show),
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_naviframe_smart_focus_next_manager_is),
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT), _elm_naviframe_smart_focus_next),