From 60a17a17d353a49bf2a80d9c48045431830d9b92 Mon Sep 17 00:00:00 2001 From: jaehwan Date: Mon, 23 Jul 2012 01:59:41 +0000 Subject: [PATCH] The label should be inserted and the visible signal should be emitted, only when the text exists. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@74304 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_toolbar.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c index 4ac44f4..6bbebb6 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -378,8 +378,11 @@ _theme_hook_item(Evas_Object *obj, Elm_Toolbar_Item *it, double scale, int icon_ edje_object_part_swallow(view, "elm.swallow.icon", it->icon); edje_object_signal_emit(VIEW(it), "elm,state,icon,visible", "elm"); } - edje_object_part_text_escaped_set(view, "elm.text", it->label); - edje_object_signal_emit(VIEW(it), "elm,state,text,visible", "elm"); + if (it->label) + { + edje_object_part_text_escaped_set(view, "elm.text", it->label); + edje_object_signal_emit(VIEW(it), "elm,state,text,visible", "elm"); + } } else { @@ -1083,8 +1086,11 @@ _item_reorder_start(Elm_Toolbar_Item *item) evas_object_show(it->icon); elm_widget_sub_object_add(obj, it->icon); } - edje_object_part_text_escaped_set(VIEW(it), "elm.text", it->label); - edje_object_signal_emit(VIEW(it), "elm,state,text,visible", "elm"); + if (it->label) + { + edje_object_part_text_escaped_set(VIEW(it), "elm.text", it->label); + edje_object_signal_emit(VIEW(it), "elm,state,text,visible", "elm"); + } edje_object_signal_emit(VIEW(it), "elm,state,moving", "elm"); -- 2.7.4