summaryrefslogtreecommitdiff
path: root/unsorted
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2018-08-01 18:42:13 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2018-08-01 19:37:37 -0300
commit095d4200b4789f5dba4b954021fa70ec935cfdc3 (patch)
tree88b6eb80bb26c860cc78765d089cf167af9391b6 /unsorted
parent3631f36cb0c013a4c165c40120eddae1175e3d77 (diff)
Efl.Ui.Layout.Factory: added missing factory_model_connect
Summary: connect factory to edje part name when create a new layout connect a factory to it change example to use the factory_model_connect Reviewers: felipealmeida Differential Revision: https://phab.enlightenment.org/D6667
Diffstat (limited to 'unsorted')
-rw-r--r--unsorted/elementary/efl_ui_view_list_example_2.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/unsorted/elementary/efl_ui_view_list_example_2.c b/unsorted/elementary/efl_ui_view_list_example_2.c
index de4d2599..310aa269 100644
--- a/unsorted/elementary/efl_ui_view_list_example_2.c
+++ b/unsorted/elementary/efl_ui_view_list_example_2.c
@@ -14,25 +14,13 @@
14 14
15#define EFL_MODEL_TEST_FILENAME_PATH "/tmp" 15#define EFL_MODEL_TEST_FILENAME_PATH "/tmp"
16 16
17static void
18_realized_cb(void *data, const Efl_Event *event)
19{
20 Efl_Ui_View_List_Item_Event *ie = event->info;
21 Eo *imf = data;
22 printf("realize %d\n", ie->index);
23
24 evas_object_size_hint_weight_set(ie->layout, EVAS_HINT_EXPAND, 0);
25 evas_object_size_hint_align_set(ie->layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
26
27 efl_ui_factory_model_connect(ie->layout, "efl.icon", imf);
28}
29
30EAPI_MAIN int 17EAPI_MAIN int
31elm_main(int argc, char **argv) 18elm_main(int argc, char **argv)
32{ 19{
33 Efl_Ui_Layout_Factory *factory; 20 Efl_Ui_Layout_Factory *factory;
21 Efl_Ui_Image_Factory *imgf;
34 Evas_Object *win; 22 Evas_Object *win;
35 Eo *imf, *model, *li; 23 Eo *model, *li;
36 char *dirname; 24 char *dirname;
37 25
38 win = elm_win_util_standard_add("viewlist", "Viewlist"); 26 win = elm_win_util_standard_add("viewlist", "Viewlist");
@@ -56,9 +44,9 @@ elm_main(int argc, char **argv)
56 evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL); 44 evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
57 45
58 46
59 imf = efl_add(EFL_UI_IMAGE_FACTORY_CLASS, win); 47 imgf = efl_add(EFL_UI_IMAGE_FACTORY_CLASS, win);
60 efl_ui_model_connect(imf, "", "path"); //connect to "path" property 48 efl_ui_model_connect(imgf, "", "path"); //connect to "path" property
61 efl_event_callback_add(li, EFL_UI_VIEW_LIST_EVENT_ITEM_REALIZED, _realized_cb, imf); 49 efl_ui_factory_model_connect(factory, "efl.icon", imgf);
62 50
63 elm_win_resize_object_add(win, li); 51 elm_win_resize_object_add(win, li);
64 52