ehhh maybe do this properly I guess
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 6 Nov 2011 15:24:50 +0000 (15:24 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 6 Nov 2011 15:24:50 +0000 (15:24 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@64826 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_gen.c

index 3ebd66d..f5f35a7 100644 (file)
@@ -121,6 +121,24 @@ _item_label_hook(Elm_Gen_Item *it, const char *part)
    return edje_object_part_text_get(VIEW(it), part);
 }
 
+static Evas_Object *
+_item_content_get_hook(Elm_Gen_Item *it, const char *part)
+{
+   return edje_object_part_swallow_get(VIEW(it), 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);
+}
+
+static Evas_Object *
+_item_content_unset_hook(Elm_Gen_Item *it, const char *part)
+{
+   return edje_object_part_unswallow(VIEW(it), part);
+}
+
 #if 0
 static Eina_Bool
 _deselect_all_items(Widget_Data *wd)
@@ -432,9 +450,9 @@ elm_gen_item_new(Widget_Data              *wd,
    it->parent = parent;
    it->func.func = func;
    it->func.data = func_data;
-   elm_widget_item_content_get_hook_set(it, edje_object_part_swallow_get);
-   elm_widget_item_content_set_hook_set(it, edje_object_part_swallow);
-   elm_widget_item_content_unset_hook_set(it, edje_object_part_unswallow);
+   elm_widget_item_content_get_hook_set(it, _item_content_get_hook);
+   elm_widget_item_content_set_hook_set(it, _item_content_set_hook);
+   elm_widget_item_content_unset_hook_set(it, _item_content_unset_hook);
    /* TEMPORARY */
    it->sel_cb = (Ecore_Cb)_item_select;