e_flowlayout is just not done correctly at all...some fixes here to make it not crash on deletion at least :/

SVN revision: 84263
This commit is contained in:
Mike Blumenkrantz 2013-02-20 10:47:49 +00:00
parent 95f0b520ac
commit 8e9aea2307
1 changed files with 6 additions and 11 deletions

View File

@ -482,7 +482,7 @@ _e_flowlayout_smart_adopt(E_Smart_Data *sd, Evas_Object *obj)
evas_object_clip_set(obj, sd->clip); evas_object_clip_set(obj, sd->clip);
evas_object_smart_member_add(obj, bi->sd->obj); evas_object_smart_member_add(obj, bi->sd->obj);
evas_object_data_set(obj, "e_flowlayout_data", bi); evas_object_data_set(obj, "e_flowlayout_data", bi);
evas_object_event_callback_add(obj, EVAS_CALLBACK_FREE, evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
_e_flowlayout_smart_item_del_hook, NULL); _e_flowlayout_smart_item_del_hook, NULL);
if ((!evas_object_visible_get(sd->clip)) && if ((!evas_object_visible_get(sd->clip)) &&
(evas_object_visible_get(sd->obj))) (evas_object_visible_get(sd->obj)))
@ -503,7 +503,7 @@ _e_flowlayout_smart_disown(Evas_Object *obj)
evas_object_hide(bi->sd->clip); evas_object_hide(bi->sd->clip);
} }
evas_object_event_callback_del(obj, evas_object_event_callback_del(obj,
EVAS_CALLBACK_FREE, EVAS_CALLBACK_DEL,
_e_flowlayout_smart_item_del_hook); _e_flowlayout_smart_item_del_hook);
evas_object_smart_member_del(obj); evas_object_smart_member_del(obj);
evas_object_clip_unset(obj); evas_object_clip_unset(obj);
@ -940,20 +940,15 @@ static void
_e_flowlayout_smart_del(Evas_Object *obj) _e_flowlayout_smart_del(Evas_Object *obj)
{ {
E_Smart_Data *sd; E_Smart_Data *sd;
Evas_Object *child;
sd = evas_object_smart_data_get(obj); sd = evas_object_smart_data_get(obj);
if (!sd) return; if (!sd) return;
/* FIXME: this gets into an infinite loop when changin basic->advanced on EINA_LIST_FREE(sd->items, child)
* ibar config dialog
*/
while (sd->items)
{ {
Evas_Object *child; evas_object_event_callback_del(child, EVAS_CALLBACK_DEL, _e_flowlayout_smart_item_del_hook);
free(evas_object_data_get(child, "e_flowlayout_data"));
child = eina_list_data_get(sd->items);
e_flowlayout_unpack(child);
} }
evas_object_del(sd->clip);
free(sd); free(sd);
} }