From: cedric Date: Thu, 21 Jun 2012 06:38:51 +0000 (+0000) Subject: edje: fix previous breakage with auto unswallow. X-Git-Tag: submit/2.0alpha-wayland/20121127.221958~230 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b9f311dadcf14cafe078b7b754bff50b8e45ff7;p=profile%2Fivi%2Fedje.git edje: fix previous breakage with auto unswallow. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@72563 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/edje_util.c b/src/lib/edje_util.c index 4340d55..5ed93e0 100644 --- a/src/lib/edje_util.c +++ b/src/lib/edje_util.c @@ -95,14 +95,14 @@ _edje_user_definition_free(Edje_User_Defined *eud) rp->swallowed_object = NULL; rp->swallow_params.min.w = 0; rp->swallow_params.min.h = 0; - rp->swallow_params.max.w = 0; - rp->swallow_params.max.h = 0; + rp->swallow_params.max.w = 0; + rp->swallow_params.max.h = 0; rp->edje->dirty = 1; - rp->edje->recalc_call = 1; + rp->edje->recalc_call = 1; #ifdef EDJE_CALC_CACHE - rp->invalidate = 1; + rp->invalidate = 1; #endif - _edje_recalc(rp->edje); + _edje_recalc_do(rp->edje); break; case EDJE_USER_BOX_PACK: child = eud->u.box.child; @@ -2473,20 +2473,6 @@ edje_object_part_swallow(Evas_Object *obj, const char *part, Evas_Object *obj_sw // XXX: by Sachiel, January 21th 2009, 19:30 UTC _edje_recalc_do(ed); - EINA_LIST_FOREACH(ed->user_defined, l, eud) - if (eud->type == EDJE_USER_SWALLOW && !strcmp(part, eud->part)) - { - ed->user_defined = eina_list_remove_list(ed->user_defined, l); - if (!obj_swallow) - { - _edje_user_definition_free(eud); - l = NULL; - eud = NULL; - break; - } - break; - } - rp = evas_object_data_get(obj_swallow, "\377 edje.swallowing_part"); if (rp) { @@ -2825,7 +2811,7 @@ edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow) if (eud->type == EDJE_USER_SWALLOW && eud->u.swallow.child == obj_swallow) { _edje_user_definition_free(eud); - break; + return ; } } } @@ -5030,7 +5016,7 @@ _edje_real_part_swallow_hints_update(Edje_Real_Part *rp) } rp->swallow_params.aspect.w = aw; rp->swallow_params.aspect.h = ah; - evas_object_data_set(rp->swallowed_object, "\377 edje.swallowing_part", rp); + evas_object_data_set(rp->swallowed_object, "\377 edje.swallowing_part", rp); } #ifdef EDJE_CALC_CACHE @@ -5060,8 +5046,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp, { if (rp->swallowed_object != obj_swallow) { - _edje_real_part_swallow_clear(rp); - rp->swallowed_object = NULL; + edje_object_part_unswallow(rp->edje->obj, rp->swallowed_object); } else { @@ -5085,7 +5070,7 @@ _edje_real_part_swallow(Edje_Real_Part *rp, else evas_object_clip_set(rp->swallowed_object, rp->edje->base.clipper); evas_object_stack_above(rp->swallowed_object, rp->object); evas_object_event_callback_add(rp->swallowed_object, - EVAS_CALLBACK_FREE, + EVAS_CALLBACK_DEL, _edje_object_part_swallow_free_cb, rp); evas_object_event_callback_add(rp->swallowed_object, @@ -5123,7 +5108,7 @@ _edje_real_part_swallow_clear(Edje_Real_Part *rp) { evas_object_smart_member_del(rp->swallowed_object); evas_object_event_callback_del_full(rp->swallowed_object, - EVAS_CALLBACK_FREE, + EVAS_CALLBACK_DEL, _edje_object_part_swallow_free_cb, rp); evas_object_event_callback_del_full(rp->swallowed_object, @@ -5135,6 +5120,7 @@ _edje_real_part_swallow_clear(Edje_Real_Part *rp) if (rp->part->mouse_events) _edje_callbacks_del(rp->swallowed_object, rp->edje); _edje_callbacks_focus_del(rp->swallowed_object, rp->edje); + rp->swallowed_object = NULL; } static void