From 3954d1adfc231183da507afdc6361fa76834ffa9 Mon Sep 17 00:00:00 2001 From: Jaehwan Kim 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. SVN revision: 74304 --- 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 1c869c7..f683bd7 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -377,8 +377,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 { @@ -1078,8 +1081,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