summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2012-04-12 07:14:21 +0000
committerDaniel Juyung Seo <seojuyung2@gmail.com>2012-04-12 07:14:21 +0000
commit06e23fa5a1a472634f9f86110f1396e38da57c1c (patch)
tree1a3786acb185b7b85d71bd508f9743ac922eb344 /src/lib
parent3c6b599c4cf984d196a638a5f3c056f2fd6a7b1e (diff)
elm genlist: genlist/gengrid do not support elm_object_item_part_text/content_set/unset. Use normal callback systems.
SVN revision: 70122
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elm_genlist.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 0027ef7b1..f3156404d 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -3638,29 +3638,21 @@ _item_content_get_hook(Elm_Gen_Item *it, const char *part)
3638} 3638}
3639 3639
3640static void 3640static void
3641_item_content_set_hook(Elm_Gen_Item *it, const char *part, Evas_Object *content) 3641_item_content_set_hook(Elm_Gen_Item *it __UNUSED__,
3642 const char *part __UNUSED__,
3643 Evas_Object *content __UNUSED__)
3642{ 3644{
3643 Evas_Object *prev_obj; 3645 WRN("genlist/gengrid do not support elm_object_item_part_content_set.\n"
3644 3646 "Use normal genlist/gengrid content_get callback model.");
3645 if (content && part)
3646 {
3647 if (eina_list_data_find(it->content_objs, content)) return;
3648 prev_obj = _item_content_unset_hook(it, part);
3649 if (prev_obj) evas_object_del(prev_obj);
3650 it->content_objs = eina_list_append(it->content_objs, content);
3651 edje_object_part_swallow(VIEW(it), part, content);
3652 }
3653} 3647}
3654 3648
3655static Evas_Object * 3649static Evas_Object *
3656_item_content_unset_hook(Elm_Gen_Item *it, const char *part) 3650_item_content_unset_hook(Elm_Gen_Item *it __UNUSED__,
3651 const char *part __UNUSED__)
3657{ 3652{
3658 Evas_Object *obj; 3653 WRN("genlist/gengrid do not support elm_object_item_part_content_set.\n"
3659 obj = edje_object_part_swallow_get(VIEW(it), part); 3654 "Use normal genlist/gengrid content_get callback model.");
3660 if (!obj) return NULL; 3655 return NULL;
3661 it->content_objs = eina_list_remove(it->content_objs, obj);
3662 edje_object_part_unswallow(VIEW(it), obj);
3663 return obj;
3664} 3656}
3665 3657
3666static const char * 3658static const char *
@@ -3671,6 +3663,15 @@ _item_text_get_hook(Elm_Gen_Item *it, const char *part)
3671} 3663}
3672 3664
3673static void 3665static void
3666_item_text_set_hook(Elm_Object_Item *it __UNUSED__,
3667 const char *part __UNUSED__,
3668 const char *text __UNUSED__)
3669{
3670 WRN("genlist/gengrid do not support elm_object_item_part_text_set.\n"
3671 "Use normal genlist/gengrid text_get callback model.");
3672}
3673
3674static void
3674_item_disable_hook(Elm_Object_Item *it) 3675_item_disable_hook(Elm_Object_Item *it)
3675{ 3676{
3676 Eina_List *l; 3677 Eina_List *l;
@@ -3762,6 +3763,7 @@ _elm_genlist_item_new(Widget_Data *wd,
3762 elm_widget_item_content_set_hook_set(it, _item_content_set_hook); 3763 elm_widget_item_content_set_hook_set(it, _item_content_set_hook);
3763 elm_widget_item_content_unset_hook_set(it, _item_content_unset_hook); 3764 elm_widget_item_content_unset_hook_set(it, _item_content_unset_hook);
3764 elm_widget_item_text_get_hook_set(it, _item_text_get_hook); 3765 elm_widget_item_text_get_hook_set(it, _item_text_get_hook);
3766 elm_widget_item_text_set_hook_set(it, _item_text_set_hook);
3765 elm_widget_item_disable_hook_set(it, _item_disable_hook); 3767 elm_widget_item_disable_hook_set(it, _item_disable_hook);
3766 elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook); 3768 elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook);
3767 elm_widget_item_signal_emit_hook_set(it, _item_signal_emit_hook); 3769 elm_widget_item_signal_emit_hook_set(it, _item_signal_emit_hook);