summaryrefslogtreecommitdiff
path: root/src/examples/elementary/efl_ui_list_view_example_3.c
diff options
context:
space:
mode:
authorLarry Lira <larry@expertisesolutions.com.br>2018-11-29 15:11:51 -0200
committerChristopher Michael <cp.michael@samsung.com>2018-12-06 12:06:16 -0500
commitdb579aad3bab6d7d8c36d2aa024e5e0dbe098b85 (patch)
tree070c87b95627a65d6f2af86510993a5ed5fc63b3 /src/examples/elementary/efl_ui_list_view_example_3.c
parent50ce1338b165a9e733d02748371e4c28dcb781ce (diff)
Efl.Ui.List.View: fixed MVVM life-cycle
Fix bugs on Views and Model related with null items and proper ownership and life-cycle of components. Configure default theme for default factory on finalize.
Diffstat (limited to '')
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_3.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/examples/elementary/efl_ui_list_view_example_3.c b/src/examples/elementary/efl_ui_list_view_example_3.c
index 46d5ca5813..eaf5dc975a 100644
--- a/src/examples/elementary/efl_ui_list_view_example_3.c
+++ b/src/examples/elementary/efl_ui_list_view_example_3.c
@@ -66,7 +66,7 @@ _focused(void *data, const Efl_Event *event)
66} 66}
67 67
68static void 68static void
69_bt_add_clicked(void *data, Evas_Object *obj, void *event_info) 69_bt_add_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
70{ 70{
71 Priv_Data *priv = (Priv_Data*)data; 71 Priv_Data *priv = (Priv_Data*)data;
72 Eina_Value vtext, value; 72 Eina_Value vtext, value;
@@ -90,7 +90,7 @@ _bt_add_clicked(void *data, Evas_Object *obj, void *event_info)
90} 90}
91 91
92static void 92static void
93_bt_del_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 93_bt_del_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
94{ 94{
95 Priv_Data *priv = (Priv_Data*)data; 95 Priv_Data *priv = (Priv_Data*)data;
96 Eo *child = NULL; 96 Eo *child = NULL;
@@ -110,35 +110,35 @@ _bt_del_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
110} 110}
111 111
112static void 112static void
113_bt_none_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 113_bt_none_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
114{ 114{
115 Evas_Object *li = data; 115 Evas_Object *li = data;
116 efl_ui_list_view_select_mode_set(li, ELM_OBJECT_SELECT_MODE_NONE); 116 efl_ui_list_view_select_mode_set(li, ELM_OBJECT_SELECT_MODE_NONE);
117} 117}
118 118
119static void 119static void
120_bt_donly_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 120_bt_donly_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
121{ 121{
122 Evas_Object *li = data; 122 Evas_Object *li = data;
123 efl_ui_list_view_select_mode_set(li, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); 123 efl_ui_list_view_select_mode_set(li, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
124} 124}
125 125
126static void 126static void
127_bt_default_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 127_bt_default_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
128{ 128{
129 Evas_Object *li = data; 129 Evas_Object *li = data;
130 efl_ui_list_view_select_mode_set(li, ELM_OBJECT_SELECT_MODE_DEFAULT); 130 efl_ui_list_view_select_mode_set(li, ELM_OBJECT_SELECT_MODE_DEFAULT);
131} 131}
132 132
133static void 133static void
134_bt_set_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 134_bt_set_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
135{ 135{
136 Priv_Data *priv = data; 136 Priv_Data *priv = data;
137 efl_ui_view_model_set(priv->list2, priv->model); 137 efl_ui_view_model_set(priv->list2, priv->model);
138} 138}
139 139
140static void 140static void
141_bt_unset_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 141_bt_unset_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
142{ 142{
143 Evas_Object *li = data; 143 Evas_Object *li = data;
144 efl_ui_view_model_set(li, NULL); 144 efl_ui_view_model_set(li, NULL);
@@ -201,7 +201,7 @@ _make_model()
201} 201}
202 202
203EAPI_MAIN int 203EAPI_MAIN int
204elm_main(int argc, char **argv) 204elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
205{ 205{
206 Priv_Data *priv; 206 Priv_Data *priv;
207 Evas_Object *win, *bx, *vbx, *bt; 207 Evas_Object *win, *bx, *vbx, *bt;