From 67157348f36c15c19d4267e794f45f9db9eb1e3f Mon Sep 17 00:00:00 2001 From: Michael BOUCHAUD Date: Tue, 7 Feb 2012 16:33:22 +0000 Subject: [PATCH] elementary: fix content set and unset hooks for genlist gengrid items SVN revision: 67737 --- src/lib/elm_genlist.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 12a5692..d5e75be 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -3222,16 +3222,20 @@ _item_content_get_hook(Elm_Gen_Item *it, const char *part) static void _item_content_set_hook(Elm_Gen_Item *it, const char *part, Evas_Object *content) { - edje_object_part_swallow(VIEW(it), part, content); + if (content && part) + { + it->content_objs = eina_list_append(it->content_objs, content); + edje_object_part_swallow(VIEW(it), part, content); + } } static Evas_Object * _item_content_unset_hook(Elm_Gen_Item *it, const char *part) { Evas_Object *obj; - obj = edje_object_part_swallow_get(VIEW(it), part); if (!obj) return NULL; + it->content_objs = eina_list_remove(it->content_objs, obj); edje_object_part_unswallow(VIEW(it), obj); return obj; } -- 2.7.4