From c192a46b38fc9910b214a2fc2ef1064f989c263f Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Thu, 26 Jan 2012 10:01:48 +0000 Subject: [PATCH] elementary/genlist - removed usage of widget_item_del_cb_set Because the API is exposed to users, don't use it internally. And looks don't need to use it actually. SVN revision: 67547 --- legacy/elementary/src/lib/elm_genlist.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c index aea67bbefd..94e8ae3c12 100644 --- a/legacy/elementary/src/lib/elm_genlist.c +++ b/legacy/elementary/src/lib/elm_genlist.c @@ -1653,15 +1653,6 @@ _item_cache_free(Item_Cache *itc) free(itc); } -static void -_item_del_hook(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) -{ - Elm_Gen_Item *it = event_info; - if (!it) return; - if (it->wd->last_selected_item == it) - it->wd->last_selected_item = NULL; -} - static void _item_text_realize(Elm_Gen_Item *it, Evas_Object *target, @@ -3293,7 +3284,6 @@ _item_new(Widget_Data *wd, it->item->flags = flags; if (flags & ELM_GENLIST_ITEM_GROUP) it->group++; it->item->expanded_depth = 0; - elm_widget_item_del_cb_set(it, _item_del_hook); ELM_GEN_ITEM_SETUP(it); if (it->parent) { @@ -5470,6 +5460,9 @@ _elm_genlist_item_del_serious(Elm_Gen_Item *it) if (it->wd->calc_job) ecore_job_del(it->wd->calc_job); it->wd->calc_job = ecore_job_add(it->wd->calc_cb, it->wd); free(it->item); + it->item = NULL; + if (it->wd->last_selected_item == it) + it->wd->last_selected_item = NULL; elm_widget_item_del(it); }