summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-11-25 21:54:24 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-11-25 21:54:26 +0900
commitc32593cc89df2c79f5d6c030a36c34e951042b28 (patch)
tree00f9f380e8e561ea64c9ad0815e568348f1c65b0
parenta6aee02dca252cc74ac33fad399f62cd857cf863 (diff)
hoversel, popup, colorselector: Optimize eo item usage.
Remove unnecessary pointer reference.
-rw-r--r--src/lib/elc_hoversel.c7
-rw-r--r--src/lib/elc_popup.c4
-rw-r--r--src/lib/elm_colorselector.c6
3 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c
index f5602615a..cb93c4b21 100644
--- a/src/lib/elc_hoversel.c
+++ b/src/lib/elc_hoversel.c
@@ -104,9 +104,10 @@ _on_item_clicked(void *data,
104{ 104{
105 Elm_Hoversel_Item_Data *item = data; 105 Elm_Hoversel_Item_Data *item = data;
106 Evas_Object *obj2 = WIDGET(item); 106 Evas_Object *obj2 = WIDGET(item);
107 Elm_Object_Item *eo_it = EO_OBJ(item);
107 108
108 if (item->func) item->func((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(item)), obj2, EO_OBJ(item)); 109 if (item->func) item->func((void *)WIDGET_ITEM_DATA_GET(eo_it), obj2, eo_it);
109 evas_object_smart_callback_call(obj2, SIG_SELECTED, EO_OBJ(item)); 110 evas_object_smart_callback_call(obj2, SIG_SELECTED, eo_it);
110 elm_hoversel_hover_end(obj2); 111 elm_hoversel_hover_end(obj2);
111} 112}
112 113
@@ -466,7 +467,7 @@ _elm_hoversel_item_add(Eo *obj, Elm_Hoversel_Data *sd, const char *label, const
466 item->icon_file = eina_stringshare_add(icon_file); 467 item->icon_file = eina_stringshare_add(icon_file);
467 item->icon_type = icon_type; 468 item->icon_type = icon_type;
468 item->func = func; 469 item->func = func;
469 WIDGET_ITEM_DATA_SET(EO_OBJ(item), data); 470 WIDGET_ITEM_DATA_SET(eo_item, data);
470 471
471 sd->items = eina_list_append(sd->items, eo_item); 472 sd->items = eina_list_append(sd->items, eo_item);
472 473
diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c
index 52f72095f..9c54473ee 100644
--- a/src/lib/elc_popup.c
+++ b/src/lib/elc_popup.c
@@ -1658,7 +1658,7 @@ _elm_popup_item_append(Eo *obj, Elm_Popup_Data *sd, const char *label, Evas_Obje
1658 _list_add(obj); 1658 _list_add(obj);
1659 1659
1660 it->func = func; 1660 it->func = func;
1661 WIDGET_ITEM_DATA_SET(EO_OBJ(it), data); 1661 WIDGET_ITEM_DATA_SET(eo_it, data);
1662 1662
1663 _item_new(it); 1663 _item_new(it);
1664 _item_icon_set(it, icon); 1664 _item_icon_set(it, icon);
@@ -1670,7 +1670,7 @@ _elm_popup_item_append(Eo *obj, Elm_Popup_Data *sd, const char *label, Evas_Obje
1670 _scroller_size_calc(obj); 1670 _scroller_size_calc(obj);
1671 elm_layout_sizing_eval(obj); 1671 elm_layout_sizing_eval(obj);
1672 1672
1673 return EO_OBJ(it); 1673 return eo_it;
1674} 1674}
1675 1675
1676static void 1676static void
diff --git a/src/lib/elm_colorselector.c b/src/lib/elm_colorselector.c
index 56aafcc45..3d13d0716 100644
--- a/src/lib/elm_colorselector.c
+++ b/src/lib/elm_colorselector.c
@@ -1505,7 +1505,7 @@ _palette_colors_load(Evas_Object *obj)
1505 (item->color->b * item->color->a) / 255, 1505 (item->color->b * item->color->a) / 255,
1506 item->color->a); 1506 item->color->a);
1507 1507
1508 sd->items = eina_list_append(sd->items, EO_OBJ(item)); 1508 sd->items = eina_list_append(sd->items, eo_item);
1509 } 1509 }
1510 1510
1511 sd->config_load = EINA_TRUE; 1511 sd->config_load = EINA_TRUE;
@@ -1779,7 +1779,7 @@ _key_action_move(Evas_Object *obj, const char *params)
1779 (WIDGET(item), item->color->r, item->color->g, item->color->b, 1779 (WIDGET(item), item->color->r, item->color->g, item->color->b,
1780 item->color->a); 1780 item->color->a);
1781 evas_object_smart_callback_call 1781 evas_object_smart_callback_call
1782 (WIDGET(item), SIG_COLOR_ITEM_SELECTED, EO_OBJ(item)); 1782 (WIDGET(item), SIG_COLOR_ITEM_SELECTED, eo_item);
1783 sd->selected = cl; 1783 sd->selected = cl;
1784 } 1784 }
1785 else if (!cl && sd->focused == ELM_COLORSELECTOR_PALETTE) 1785 else if (!cl && sd->focused == ELM_COLORSELECTOR_PALETTE)
@@ -2086,7 +2086,7 @@ _elm_colorselector_palette_color_add(Eo *obj, Elm_Colorselector_Data *sd, int r,
2086 2086
2087 elm_layout_sizing_eval(obj); 2087 elm_layout_sizing_eval(obj);
2088 2088
2089 return EO_OBJ(item); 2089 return eo_item;
2090} 2090}
2091 2091
2092EOLIAN static void 2092EOLIAN static void