From 4798abcce26899aff397d70ed049a22e609cd959 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Sat, 8 Jun 2013 18:17:16 +0900 Subject: [PATCH] elementary/naviframe - try to read the titles only when title is set and title_area is visible elementary/naviframe - return as soon as possible commit 9f16e2ff16c024c5053d2b508a59fb0925bbb733 Author: ChunEon Park @hermet.pe.kr> Date: Sat Jun 8 18:10:17 2013 +0900 commit e4617409c9e8a09497afa0203495da609d3e3d6c Author: ChunEon Park @hermet.pe.kr> Date: Sat Jun 8 18:11:09 2013 +0900 --- src/lib/elc_naviframe.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c index 0e18e0c..7d82983 100644 --- a/src/lib/elc_naviframe.c +++ b/src/lib/elc_naviframe.c @@ -337,11 +337,16 @@ static char * _access_info_cb(void *data, Evas_Object *obj __UNUSED__) { Evas_Object *layout; + Elm_Naviframe_Item *nit; Eina_Strbuf *buf; const char *info; char *ret; - layout = (Evas_Object *)data; + nit = data; + + if (!nit->title_visible) return NULL; + + layout = VIEW(nit); info = elm_object_part_text_get(layout, TITLE_PART); if (!info) return NULL; @@ -364,7 +369,7 @@ _access_obj_process(Elm_Naviframe_Item *it, Eina_Bool is_access) { Evas_Object *ao, *eo; - if (is_access) + if (is_access && (it->title_label || it->subtitle_label)) { ao = ((Elm_Widget_Item *)it)->access_obj; @@ -376,7 +381,7 @@ _access_obj_process(Elm_Naviframe_Item *it, Eina_Bool is_access) _elm_access_text_set(_elm_access_object_get(ao), ELM_ACCESS_TYPE, E_("title")); _elm_access_callback_set(_elm_access_object_get(ao), - ELM_ACCESS_INFO, _access_info_cb, VIEW(it)); + ELM_ACCESS_INFO, _access_info_cb, it); /* to access title access object, any idea? */ ((Elm_Widget_Item *)it)->access_obj = ao; @@ -384,13 +389,13 @@ _access_obj_process(Elm_Naviframe_Item *it, Eina_Bool is_access) } else { - if (it->title_label) - _elm_access_edje_object_part_object_unregister - (VIEW(it), elm_layout_edje_get(VIEW(it)), TITLE_ACCESS_PART); - /* to access title access object, any idea? */ ao = ((Elm_Widget_Item *)it)->access_obj; if (!ao) return; + + if (it->title_label || it->subtitle_label) + _elm_access_edje_object_part_object_unregister + (VIEW(it), elm_layout_edje_get(VIEW(it)), TITLE_ACCESS_PART); evas_object_del(ao); } } -- 2.7.4