From 9c3860ab966eed5190460786e9e6fa3b3e82c631 Mon Sep 17 00:00:00 2001 From: hermet Date: Wed, 11 Jan 2012 11:48:45 +0000 Subject: [PATCH] elementary/naviframe - satisfied focus_next_hook git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@67068 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elc_naviframe.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c index b3789ac..c9f4a35 100644 --- a/src/lib/elc_naviframe.c +++ b/src/lib/elc_naviframe.c @@ -1021,6 +1021,16 @@ _item_new(Evas_Object *obj, return it; } +static Eina_Bool +_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next) +{ + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd || !wd->stack) return EINA_FALSE; + return elm_widget_focus_next_get(VIEW(elm_naviframe_top_item_get(obj)), + dir, + next); +} + EAPI Evas_Object * elm_naviframe_add(Evas_Object *parent) { @@ -1037,6 +1047,8 @@ elm_naviframe_add(Evas_Object *parent) elm_widget_disable_hook_set(obj, _disable_hook); elm_widget_theme_hook_set(obj, _theme_hook); elm_widget_signal_emit_hook_set(obj, _emit_hook); + elm_widget_can_focus_set(obj, EINA_FALSE); + elm_widget_focus_next_hook_set(obj, _focus_next_hook); //base wd->base = elm_layout_add(parent); @@ -1161,7 +1173,7 @@ elm_naviframe_item_pop(Evas_Object *obj) Evas_Object *content = NULL; wd = elm_widget_data_get(obj); - if (!wd) return NULL; + if (!wd || !wd->stack) return NULL; it = (Elm_Naviframe_Item *) elm_naviframe_top_item_get(obj); if (!it) return NULL; -- 2.7.4