summaryrefslogtreecommitdiff
path: root/src/bin/elementary/test_ui_collection.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-16 12:54:44 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-21 07:50:47 +0200
commitc36d374c69cb630d892e2c249717398dcfb29cec (patch)
tree261b066fcd3ec463cb6276c7d1d843b0f0534746 /src/bin/elementary/test_ui_collection.c
parent3ce3b3d48ca8aa34ef8100d3dadb7cb5405e6667 (diff)
elm_test: rename file and remove wrong names
additionally, we can just use efl_ui_list and grid class here, no need for more complex stuff Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D9584
Diffstat (limited to '')
-rw-r--r--src/bin/elementary/test_ui_collection.c (renamed from src/bin/elementary/test_ui_item_container.c)9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/bin/elementary/test_ui_item_container.c b/src/bin/elementary/test_ui_collection.c
index ec2b2df..f049fb0 100644
--- a/src/bin/elementary/test_ui_item_container.c
+++ b/src/bin/elementary/test_ui_collection.c
@@ -158,7 +158,7 @@ _select_value_cb(void *data, const Efl_Event *ev)
158 efl_ui_select_mode_set(c, efl_ui_radio_group_selected_value_get(ev->object)); 158 efl_ui_select_mode_set(c, efl_ui_radio_group_selected_value_get(ev->object));
159} 159}
160 160
161void create_item_container_ui(Efl_Ui_Position_Manager_Entity *manager, const Efl_Class *item, const char *name) 161void create_item_container_ui(const Efl_Class *collection_class, const Efl_Class *item, const char *name)
162{ 162{
163 Efl_Ui_Win *win, *o, *tbl, *item_container, *bx; 163 Efl_Ui_Win *win, *o, *tbl, *item_container, *bx;
164 Match_Content_Ctx *ctx = calloc(1, sizeof(*ctx)); 164 Match_Content_Ctx *ctx = calloc(1, sizeof(*ctx));
@@ -170,8 +170,7 @@ void create_item_container_ui(Efl_Ui_Position_Manager_Entity *manager, const Efl
170 tbl = efl_add(EFL_UI_TABLE_CLASS, win); 170 tbl = efl_add(EFL_UI_TABLE_CLASS, win);
171 efl_content_set(win, tbl); 171 efl_content_set(win, tbl);
172 172
173 item_container = o = efl_add(EFL_UI_COLLECTION_CLASS, win, 173 item_container = o = efl_add(collection_class, win);
174 efl_ui_collection_position_manager_set(efl_added, manager));
175 efl_key_data_set(o, "__item_class", item); 174 efl_key_data_set(o, "__item_class", item);
176 efl_event_callback_add(o, EFL_EVENT_DEL, _widget_del_cb, ctx); 175 efl_event_callback_add(o, EFL_EVENT_DEL, _widget_del_cb, ctx);
177 for (int i = 0; i < 2000; ++i) 176 for (int i = 0; i < 2000; ++i)
@@ -278,12 +277,12 @@ void test_efl_ui_collection_grid(void *data EINA_UNUSED,
278 Evas_Object *obj EINA_UNUSED, 277 Evas_Object *obj EINA_UNUSED,
279 void *event_info EINA_UNUSED) 278 void *event_info EINA_UNUSED)
280{ 279{
281 create_item_container_ui(efl_new(EFL_UI_POSITION_MANAGER_GRID_CLASS), EFL_UI_GRID_DEFAULT_ITEM_CLASS, "Efl.Ui.Item_Container Grid"); 280 create_item_container_ui(EFL_UI_GRID_CLASS, EFL_UI_GRID_DEFAULT_ITEM_CLASS, "Efl.Ui.Grid");
282} 281}
283 282
284void test_efl_ui_collection_list(void *data EINA_UNUSED, 283void test_efl_ui_collection_list(void *data EINA_UNUSED,
285 Evas_Object *obj EINA_UNUSED, 284 Evas_Object *obj EINA_UNUSED,
286 void *event_info EINA_UNUSED) 285 void *event_info EINA_UNUSED)
287{ 286{
288 create_item_container_ui(efl_new(EFL_UI_POSITION_MANAGER_LIST_CLASS), EFL_UI_LIST_DEFAULT_ITEM_CLASS, "Efl.Ui.Item_Container List"); 287 create_item_container_ui(EFL_UI_LIST_CLASS, EFL_UI_LIST_DEFAULT_ITEM_CLASS, "Efl.Ui.List");
289} 288}