summaryrefslogtreecommitdiff
path: root/src/lib/elm_toolbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elm_toolbar.c')
-rw-r--r--src/lib/elm_toolbar.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index c68a2872e..024493927 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -2354,16 +2354,10 @@ _item_new(Evas_Object *obj,
2354 2354
2355 ELM_TOOLBAR_DATA_GET(obj, sd); 2355 ELM_TOOLBAR_DATA_GET(obj, sd);
2356 2356
2357 icon_obj = elm_icon_add(obj);
2358 elm_icon_order_lookup_set(icon_obj, sd->lookup_order);
2359 if (!icon_obj) return NULL;
2360
2361 Eo *eo_it = eo_add(ELM_TOOLBAR_ITEM_CLASS, obj); 2357 Eo *eo_it = eo_add(ELM_TOOLBAR_ITEM_CLASS, obj);
2362 if (!eo_it) 2358
2363 { 2359 if (!eo_it) return NULL;
2364 evas_object_del(icon_obj); 2360
2365 return NULL;
2366 }
2367 ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it); 2361 ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it);
2368 2362
2369 it->label = eina_stringshare_add(label); 2363 it->label = eina_stringshare_add(label);
@@ -2377,6 +2371,9 @@ _item_new(Evas_Object *obj,
2377 VIEW(it) = elm_layout_add(obj); 2371 VIEW(it) = elm_layout_add(obj);
2378 evas_object_data_set(VIEW(it), "item", it); 2372 evas_object_data_set(VIEW(it), "item", it);
2379 2373
2374 icon_obj = elm_icon_add(VIEW(it));
2375 elm_icon_order_lookup_set(icon_obj, sd->lookup_order);
2376
2380 if (_elm_config->access_mode == ELM_ACCESS_MODE_ON) 2377 if (_elm_config->access_mode == ELM_ACCESS_MODE_ON)
2381 _access_widget_item_register(it); 2378 _access_widget_item_register(it);
2382 2379
@@ -2411,7 +2408,6 @@ _item_new(Evas_Object *obj,
2411 it); 2408 it);
2412 evas_object_event_callback_add 2409 evas_object_event_callback_add
2413 (VIEW(it), EVAS_CALLBACK_MOUSE_UP, (Evas_Object_Event_Cb)_mouse_up_cb, it); 2410 (VIEW(it), EVAS_CALLBACK_MOUSE_UP, (Evas_Object_Event_Cb)_mouse_up_cb, it);
2414 elm_widget_sub_object_add(obj, VIEW(it));
2415 2411
2416 if (it->icon) 2412 if (it->icon)
2417 { 2413 {