From: Jaehwan Kim Date: Wed, 18 May 2011 10:29:43 +0000 (+0900) Subject: [elm_list] self delete bug fix X-Git-Tag: REL_I9200_20110603-1~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e713cb7ff48612648f4781184e29942ac5436fa;p=framework%2Fuifw%2Felementary.git [elm_list] self delete bug fix add comment Change-Id: I9c187c867caf0d3a1eabbc77c3176e81b0e94501 --- diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index 53fec14..f801889 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -425,6 +425,23 @@ _elm_list_unwalk(Widget_Data *wd) } } +// FIXME : This function might be unnecessary, fix self deletion bug then remove this function. +static void +_del_pre_hook(Evas_Object *obj) +{ + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return; + + if (wd->scr) + evas_object_event_callback_del_full + (wd->scr, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, + obj); + if (wd->box) + evas_object_event_callback_del_full + (wd->box, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, + obj); +} + static void _del_hook(Evas_Object *obj) { @@ -1291,6 +1308,7 @@ elm_list_add(Evas_Object *parent) elm_widget_sub_object_add(parent, obj); elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL); elm_widget_data_set(obj, wd); + elm_widget_del_pre_hook_set(obj, _del_pre_hook); elm_widget_del_hook_set(obj, _del_hook); elm_widget_theme_hook_set(obj, _theme_hook); elm_widget_disable_hook_set(obj, _disable_hook);