From: woohyun Date: Tue, 3 Apr 2012 11:40:06 +0000 (+0000) Subject: elementary : Removing duplicate codes when _content_unset. X-Git-Tag: sbs/armel/slp2-target~36^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dec286d3cfece1e43e6ee41c5dfd7eafbfc6f0f6;p=framework%2Fuifw%2Felementary.git elementary : Removing duplicate codes when _content_unset. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69894 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elc_dayselector.c b/src/lib/elc_dayselector.c index 681eb6f..68f351b 100644 --- a/src/lib/elc_dayselector.c +++ b/src/lib/elc_dayselector.c @@ -368,6 +368,7 @@ _content_unset_hook(Evas_Object *obj, const char *item) { content = VIEW(it); wd->items = eina_list_remove(wd->items, it); + elm_widget_sub_object_del(obj, VIEW(it)); evas_object_smart_callback_del(VIEW(it), "changed", _item_clicked_cb); evas_object_event_callback_del(VIEW(it), EVAS_CALLBACK_DEL, _item_del_cb); edje_object_part_unswallow(wd->base, VIEW(it)); diff --git a/src/lib/elm_check.c b/src/lib/elm_check.c index 9349c04..e74447f 100644 --- a/src/lib/elm_check.c +++ b/src/lib/elm_check.c @@ -283,11 +283,7 @@ _content_unset_hook(Evas_Object *obj, const char *part) if (!wd->icon) return NULL; Evas_Object *icon = wd->icon; elm_widget_sub_object_del(obj, wd->icon); - evas_object_event_callback_del_full(wd->icon, - EVAS_CALLBACK_CHANGED_SIZE_HINTS, - _changed_size_hints, obj); - edje_object_part_unswallow(wd->chk, wd->icon); - wd->icon = NULL; + edje_object_part_unswallow(wd->chk, icon); return icon; } diff --git a/src/lib/elm_flip.c b/src/lib/elm_flip.c index 57ccf9b..48f6f17 100644 --- a/src/lib/elm_flip.c +++ b/src/lib/elm_flip.c @@ -1625,11 +1625,7 @@ _content_front_unset(Evas_Object *obj) Evas_Object *content = wd->front.content; evas_object_clip_unset(content); elm_widget_sub_object_del(obj, content); - evas_object_event_callback_del_full(content, - EVAS_CALLBACK_CHANGED_SIZE_HINTS, - _changed_size_hints, obj); evas_object_smart_member_del(content); - wd->front.content = NULL; return content; } @@ -1642,11 +1638,7 @@ _content_back_unset(Evas_Object *obj) Evas_Object *content = wd->back.content; evas_object_clip_unset(content); elm_widget_sub_object_del(obj, content); - evas_object_event_callback_del_full(content, - EVAS_CALLBACK_CHANGED_SIZE_HINTS, - _changed_size_hints, obj); evas_object_smart_member_del(content); - wd->back.content = NULL; return content; } diff --git a/src/lib/elm_frame.c b/src/lib/elm_frame.c index 2f8c093..61b323a 100644 --- a/src/lib/elm_frame.c +++ b/src/lib/elm_frame.c @@ -188,11 +188,7 @@ _content_unset_hook(Evas_Object *obj, const char *part) if (!wd || !wd->content) return NULL; content = wd->content; elm_widget_sub_object_del(obj, wd->content); - evas_object_event_callback_del_full(wd->content, - EVAS_CALLBACK_CHANGED_SIZE_HINTS, - _changed_size_hints, obj); - edje_object_part_unswallow(wd->frm, wd->content); - wd->content = NULL; + edje_object_part_unswallow(wd->frm, content); return content; } diff --git a/src/lib/elm_hover.c b/src/lib/elm_hover.c index b3aea0d..ec92a9c 100644 --- a/src/lib/elm_hover.c +++ b/src/lib/elm_hover.c @@ -681,16 +681,18 @@ static void _elm_hover_sub_obj_unparent(Evas_Object *obj) { Widget_Data *wd; + Evas_Object *smt_sub; wd = elm_widget_data_get(obj); + if (!wd) return; + smt_sub = wd->smt_sub; elm_widget_sub_object_del(obj, wd->smt_sub); - evas_object_event_callback_del_full(wd->smt_sub, + evas_object_event_callback_del_full(smt_sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _elm_hover_sub_obj_placement_eval_cb, obj); - edje_object_part_unswallow(wd->cov, wd->smt_sub); - wd->smt_sub = NULL; + edje_object_part_unswallow(wd->cov, smt_sub); } EAPI const char * @@ -841,9 +843,7 @@ _content_unset_hook(Evas_Object *obj, const char *swallow) if (!wd->subs[i].obj) return NULL; Evas_Object *content = wd->subs[i].obj; elm_widget_sub_object_del(obj, wd->subs[i].obj); - edje_object_part_unswallow(wd->cov, wd->subs[i].obj); - wd->subs[i].obj = NULL; - + edje_object_part_unswallow(wd->cov, content); return content; } } diff --git a/src/lib/elm_mapbuf.c b/src/lib/elm_mapbuf.c index d2fdce4..44b1f36 100644 --- a/src/lib/elm_mapbuf.c +++ b/src/lib/elm_mapbuf.c @@ -198,14 +198,10 @@ _content_unset_hook(Evas_Object *obj, const char *part) if (!wd->content) return NULL; content = wd->content; elm_widget_sub_object_del(obj, content); - evas_object_event_callback_add(content, - EVAS_CALLBACK_CHANGED_SIZE_HINTS, - _changed_size_hints, obj); evas_object_smart_member_del(content); evas_object_color_set(wd->clip, 0, 0, 0, 0); evas_object_clip_unset(content); evas_object_data_del(content, "_elm_leaveme"); - wd->content = NULL; return content; } diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c index c27b17f..1b68390 100644 --- a/src/lib/elm_notify.c +++ b/src/lib/elm_notify.c @@ -459,13 +459,7 @@ _content_unset_hook(Evas_Object *obj, const char *part) if (!wd->content) return NULL; content = wd->content; elm_widget_sub_object_del(obj, wd->content); - evas_object_event_callback_del_full(wd->content, - EVAS_CALLBACK_CHANGED_SIZE_HINTS, - _changed_size_hints, obj); - evas_object_event_callback_del_full(wd->content, EVAS_CALLBACK_RESIZE, - _content_resize, obj); - edje_object_part_unswallow(wd->notify, wd->content); - wd->content = NULL; + edje_object_part_unswallow(wd->notify, content); return content; }