summaryrefslogtreecommitdiff
path: root/src/examples/elementary/filemvc.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-03-15 12:50:20 -0400
committerCedric Bail <cedric@osg.samsung.com>2018-03-20 17:20:56 -0700
commit4c4177ac207f982de8139c47c7afedd26ff9e15a (patch)
tree1913e890dc525621f4dec3ce281b340d81608a72 /src/examples/elementary/filemvc.c
parenta1bf513920e813037756e01cc2e01770befea77c (diff)
efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Diffstat (limited to 'src/examples/elementary/filemvc.c')
-rw-r--r--src/examples/elementary/filemvc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/examples/elementary/filemvc.c b/src/examples/elementary/filemvc.c
index f09657bafc..657148c0e0 100644
--- a/src/examples/elementary/filemvc.c
+++ b/src/examples/elementary/filemvc.c
@@ -67,7 +67,7 @@ _promise_then(void *data, const Efl_Event *event)
67 Eina_Value* value = info->value; 67 Eina_Value* value = info->value;
68 68
69 eina_value_get(value, &path); 69 eina_value_get(value, &path);
70 model = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, path)); 70 model = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, path));
71 elm_view_list_model_set(priv->fileview, model); 71 elm_view_list_model_set(priv->fileview, model);
72} 72}
73 73
@@ -150,12 +150,12 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
150 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 150 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
151 151
152 //treemodel 152 //treemodel
153 priv.treemodel = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname)); 153 priv.treemodel = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname));
154 eio_model_children_filter_set(priv.treemodel, _filter_cb, NULL); 154 eio_model_children_filter_set(priv.treemodel, _filter_cb, NULL);
155 155
156 //treeview 156 //treeview
157 genlist = elm_genlist_add(win); 157 genlist = elm_genlist_add(win);
158 priv.treeview = efl_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_TREE, NULL)); 158 priv.treeview = efl_add_ref(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_TREE, NULL));
159 elm_view_list_property_connect(priv.treeview, "filename", "elm.text"); 159 elm_view_list_property_connect(priv.treeview, "filename", "elm.text");
160 elm_view_list_property_connect(priv.treeview, "icon", "elm.swallow.icon"); 160 elm_view_list_property_connect(priv.treeview, "icon", "elm.swallow.icon");
161 elm_view_list_model_set(priv.treeview, priv.treemodel); 161 elm_view_list_model_set(priv.treeview, priv.treemodel);
@@ -170,7 +170,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
170 170
171 //listview 171 //listview
172 genlist = elm_genlist_add(win); 172 genlist = elm_genlist_add(win);
173 priv.fileview = efl_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, "double_label")); 173 priv.fileview = efl_add_ref(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, "double_label"));
174 elm_view_list_property_connect(priv.fileview, "filename", "elm.text"); 174 elm_view_list_property_connect(priv.fileview, "filename", "elm.text");
175 elm_view_list_property_connect(priv.fileview, "mime_type", "elm.text.sub"); 175 elm_view_list_property_connect(priv.fileview, "mime_type", "elm.text.sub");
176 176
@@ -184,7 +184,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
184 bxr = elm_box_add(win); 184 bxr = elm_box_add(win);
185 _widget_init(bxr); 185 _widget_init(bxr);
186 elm_object_part_content_set(vpanes, "right", bxr); 186 elm_object_part_content_set(vpanes, "right", bxr);
187 priv.formview = efl_add(ELM_VIEW_FORM_CLASS, NULL); 187 priv.formview = efl_add_ref(ELM_VIEW_FORM_CLASS, NULL);
188 188
189 /*Label widget */ 189 /*Label widget */
190 elm_view_form_widget_add(priv.formview, "filename", _label_init(win, bxr, "File Name")); 190 elm_view_form_widget_add(priv.formview, "filename", _label_init(win, bxr, "File Name"));