summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-10 23:13:12 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-10 23:44:27 +0900
commit919abe724a2b7b9154d402c8c1dc588dd986c427 (patch)
treee4a9158d5dbc2bacf3af78378ec30708c9fff5d5
parent71213e894a32143ca1d3e0da793e480ba8031353 (diff)
downloadelementary-919abe724a2b7b9154d402c8c1dc588dd986c427.tar.gz
elm: call elm_widget_item_del instead of elm_object_item_del inside elementary.
This reduces only one more function call but this makes the elm code more consistent between widgets.
-rw-r--r--src/lib/elc_ctxpopup.c6
-rw-r--r--src/lib/elc_fileselector.c2
-rw-r--r--src/lib/elm_genlist.c2
-rw-r--r--src/lib/elm_menu.c2
-rw-r--r--src/lib/elm_segment_control.c2
5 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c
index 01dbf2f0c..7bacbd758 100644
--- a/src/lib/elc_ctxpopup.c
+++ b/src/lib/elc_ctxpopup.c
@@ -1041,14 +1041,16 @@ _item_del_pre_hook(Elm_Object_Item *it)
if (eina_list_count(elm_list_items_get(list)) < 2)
{
- elm_object_item_del(ctxpopup_it->list_item);
+ if (ctxpopup_it->list_item)
+ elm_widget_item_del(ctxpopup_it->list_item);
sd->items = eina_list_remove(sd->items, ctxpopup_it);
evas_object_hide(WIDGET(ctxpopup_it));
return EINA_TRUE;
}
- elm_object_item_del(ctxpopup_it->list_item);
+ if (ctxpopup_it->list_item)
+ elm_widget_item_del(ctxpopup_it->list_item);
sd->items = eina_list_remove(sd->items, ctxpopup_it);
if (sd->list_visible) elm_layout_sizing_eval(WIDGET(ctxpopup_it));
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index f2b97c6cc..1da1788f1 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -1295,7 +1295,7 @@ _resource_deleted(void *data, int type EINA_UNUSED, void *ev)
}
}
- if (it) elm_object_item_del(it);
+ if (it) elm_widget_item_del(it);
if (selected)
{
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 79cfb4ebc..333c949fd 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -728,7 +728,7 @@ _item_sub_items_clear(Elm_Gen_Item *it)
EINA_LIST_FOREACH(it->item->items, l, it2)
tl = eina_list_append(tl, it2);
EINA_LIST_FREE(tl, it2)
- elm_object_item_del(it2);
+ elm_widget_item_del(it2);
}
static void
diff --git a/src/lib/elm_menu.c b/src/lib/elm_menu.c
index fa1bd13bd..8dff13018 100644
--- a/src/lib/elm_menu.c
+++ b/src/lib/elm_menu.c
@@ -1112,7 +1112,7 @@ elm_menu_item_subitems_clear(Elm_Object_Item *it)
ELM_MENU_ITEM_CHECK_OR_RETURN(it);
EINA_LIST_FOREACH_SAFE(((Elm_Menu_Item *)it)->submenu.items,
l, l_next, sub_it)
- elm_object_item_del(sub_it);
+ elm_widget_item_del(sub_it);
}
EOLIAN static const Eina_List*
diff --git a/src/lib/elm_segment_control.c b/src/lib/elm_segment_control.c
index 62ad8b22f..fb7e8f183 100644
--- a/src/lib/elm_segment_control.c
+++ b/src/lib/elm_segment_control.c
@@ -733,7 +733,7 @@ _elm_segment_control_item_del_at(Eo *obj, Elm_Segment_Control_Data *_pd EINA_UNU
it = _item_find(obj, idx);
if (!it) return;
- elm_object_item_del((Elm_Object_Item *)it);
+ elm_widget_item_del((Elm_Object_Item *)it);
}
EOLIAN static const char*