forked from enlightenment/efl
edje: fix big oopsie.
NOTE: this should unbreak your use of E17 clock widget and elm_list should still be fine. SVN revision: 72097
This commit is contained in:
parent
77e0f02f72
commit
1442bc1e74
|
@ -867,10 +867,13 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
|
|
||||||
EINA_LIST_FREE(collect, eud)
|
EINA_LIST_FREE(collect, eud)
|
||||||
{
|
{
|
||||||
|
Evas_Object *child = NULL;
|
||||||
|
|
||||||
switch (eud->type)
|
switch (eud->type)
|
||||||
{
|
{
|
||||||
case EDJE_USER_SWALLOW:
|
case EDJE_USER_SWALLOW:
|
||||||
edje_object_part_swallow(obj, eud->part, eud->u.swallow.child);
|
edje_object_part_swallow(obj, eud->part, eud->u.swallow.child);
|
||||||
|
child = eud->u.swallow.child;
|
||||||
break;
|
break;
|
||||||
case EDJE_USER_BOX_PACK:
|
case EDJE_USER_BOX_PACK:
|
||||||
boxes = eina_list_append(boxes, eud);
|
boxes = eina_list_append(boxes, eud);
|
||||||
|
@ -880,6 +883,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
edje_object_part_table_pack(obj, eud->part, eud->u.table.child,
|
edje_object_part_table_pack(obj, eud->part, eud->u.table.child,
|
||||||
eud->u.table.col, eud->u.table.row,
|
eud->u.table.col, eud->u.table.row,
|
||||||
eud->u.table.colspan, eud->u.table.rowspan);
|
eud->u.table.colspan, eud->u.table.rowspan);
|
||||||
|
child = eud->u.table.child;
|
||||||
break;
|
break;
|
||||||
case EDJE_USER_DRAG_STEP:
|
case EDJE_USER_DRAG_STEP:
|
||||||
edje_object_part_drag_step_set(obj, eud->part,
|
edje_object_part_drag_step_set(obj, eud->part,
|
||||||
|
@ -906,14 +910,14 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
eina_stringshare_del(eud->u.string.text);
|
eina_stringshare_del(eud->u.string.text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (eud) _edje_user_definition_free(eud);
|
if (eud) _edje_user_definition_remove(eud, child);
|
||||||
}
|
}
|
||||||
|
|
||||||
boxes = eina_list_sort(boxes, -1, _sort_defined_boxes);
|
boxes = eina_list_sort(boxes, -1, _sort_defined_boxes);
|
||||||
EINA_LIST_FREE(boxes, eud)
|
EINA_LIST_FREE(boxes, eud)
|
||||||
{
|
{
|
||||||
edje_object_part_box_append(obj, eud->part, eud->u.box.child);
|
edje_object_part_box_append(obj, eud->part, eud->u.box.child);
|
||||||
_edje_user_definition_free(eud);
|
_edje_user_definition_remove(eud, eud->u.box.child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2124,6 +2124,7 @@ Eina_Bool _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_n
|
||||||
|
|
||||||
void _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *state);
|
void _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *state);
|
||||||
|
|
||||||
|
void _edje_user_definition_remove(Edje_User_Defined *eud, Evas_Object *child);
|
||||||
void _edje_user_definition_free(Edje_User_Defined *eud);
|
void _edje_user_definition_free(Edje_User_Defined *eud);
|
||||||
|
|
||||||
#ifdef HAVE_LIBREMIX
|
#ifdef HAVE_LIBREMIX
|
||||||
|
|
|
@ -68,6 +68,16 @@ _edje_user_definition_new(Edje_User_Defined_Type type, const char *part, Edje *e
|
||||||
return eud;
|
return eud;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_edje_user_definition_remove(Edje_User_Defined *eud, Evas_Object *child)
|
||||||
|
{
|
||||||
|
eud->ed->user_defined = eina_list_remove(eud->ed->user_defined, eud);
|
||||||
|
|
||||||
|
if (child) evas_object_event_callback_del_full(child, EVAS_CALLBACK_DEL, _edje_user_def_del_cb, eud);
|
||||||
|
eina_stringshare_del(eud->part);
|
||||||
|
free(eud);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_edje_user_definition_free(Edje_User_Defined *eud)
|
_edje_user_definition_free(Edje_User_Defined *eud)
|
||||||
{
|
{
|
||||||
|
@ -80,7 +90,8 @@ _edje_user_definition_free(Edje_User_Defined *eud)
|
||||||
{
|
{
|
||||||
case EDJE_USER_SWALLOW:
|
case EDJE_USER_SWALLOW:
|
||||||
child = eud->u.swallow.child;
|
child = eud->u.swallow.child;
|
||||||
edje_object_part_unswallow(eud->ed->obj, child);
|
rp = _edje_real_part_recursive_get(eud->ed, eud->part);
|
||||||
|
_edje_real_part_swallow_clear(rp);
|
||||||
break;
|
break;
|
||||||
case EDJE_USER_BOX_PACK:
|
case EDJE_USER_BOX_PACK:
|
||||||
child = eud->u.box.child;
|
child = eud->u.box.child;
|
||||||
|
@ -100,9 +111,7 @@ _edje_user_definition_free(Edje_User_Defined *eud)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (child) evas_object_event_callback_del_full(child, EVAS_CALLBACK_DEL, _edje_user_def_del_cb, eud);
|
_edje_user_definition_remove(eud, child);
|
||||||
eina_stringshare_del(eud->part);
|
|
||||||
free(eud);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2810,21 +2819,7 @@ edje_object_part_unswallow(Evas_Object *obj, Evas_Object *obj_swallow)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
evas_object_smart_member_del(rp->swallowed_object);
|
_edje_real_part_swallow_clear(rp);
|
||||||
evas_object_event_callback_del_full(rp->swallowed_object,
|
|
||||||
EVAS_CALLBACK_FREE,
|
|
||||||
_edje_object_part_swallow_free_cb,
|
|
||||||
rp->edje->obj);
|
|
||||||
evas_object_event_callback_del_full(rp->swallowed_object,
|
|
||||||
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
|
||||||
_edje_object_part_swallow_changed_hints_cb,
|
|
||||||
rp);
|
|
||||||
evas_object_clip_unset(rp->swallowed_object);
|
|
||||||
evas_object_data_del(rp->swallowed_object, "\377 edje.swallowing_part");
|
|
||||||
|
|
||||||
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;
|
rp->swallowed_object = NULL;
|
||||||
rp->swallow_params.min.w = 0;
|
rp->swallow_params.min.w = 0;
|
||||||
|
@ -4918,10 +4913,22 @@ _edje_block_violate(Edje *ed)
|
||||||
void
|
void
|
||||||
_edje_object_part_swallow_free_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
_edje_object_part_swallow_free_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||||
{
|
{
|
||||||
Evas_Object *edje_obj;
|
Edje_Real_Part *rp;
|
||||||
|
Edje_User_Defined *eud;
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
|
rp = data;
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(rp->edje->user_defined, l, eud)
|
||||||
|
if (eud->type == EDJE_USER_SWALLOW && eud->u.swallow.child == obj)
|
||||||
|
{
|
||||||
|
_edje_user_definition_free(eud);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_edje_real_part_swallow_clear(rp);
|
||||||
|
rp->swallowed_object = NULL;
|
||||||
|
|
||||||
edje_obj = data;
|
|
||||||
edje_object_part_unswallow(edje_obj, obj);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5050,9 +5057,9 @@ _edje_real_part_swallow(Edje_Real_Part *rp,
|
||||||
else evas_object_clip_set(rp->swallowed_object, rp->edje->base.clipper);
|
else evas_object_clip_set(rp->swallowed_object, rp->edje->base.clipper);
|
||||||
evas_object_stack_above(rp->swallowed_object, rp->object);
|
evas_object_stack_above(rp->swallowed_object, rp->object);
|
||||||
evas_object_event_callback_add(rp->swallowed_object,
|
evas_object_event_callback_add(rp->swallowed_object,
|
||||||
EVAS_CALLBACK_DEL,
|
EVAS_CALLBACK_FREE,
|
||||||
_edje_object_part_swallow_free_cb,
|
_edje_object_part_swallow_free_cb,
|
||||||
rp->edje->obj);
|
rp);
|
||||||
evas_object_event_callback_add(rp->swallowed_object,
|
evas_object_event_callback_add(rp->swallowed_object,
|
||||||
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_edje_object_part_swallow_changed_hints_cb,
|
_edje_object_part_swallow_changed_hints_cb,
|
||||||
|
@ -5090,7 +5097,7 @@ _edje_real_part_swallow_clear(Edje_Real_Part *rp)
|
||||||
evas_object_event_callback_del_full(rp->swallowed_object,
|
evas_object_event_callback_del_full(rp->swallowed_object,
|
||||||
EVAS_CALLBACK_FREE,
|
EVAS_CALLBACK_FREE,
|
||||||
_edje_object_part_swallow_free_cb,
|
_edje_object_part_swallow_free_cb,
|
||||||
rp->edje->obj);
|
rp);
|
||||||
evas_object_event_callback_del_full(rp->swallowed_object,
|
evas_object_event_callback_del_full(rp->swallowed_object,
|
||||||
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_edje_object_part_swallow_changed_hints_cb,
|
_edje_object_part_swallow_changed_hints_cb,
|
||||||
|
|
Loading…
Reference in New Issue