summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-04-12 14:41:54 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-01 10:39:01 -0700
commit8e107c991c50dd38cfbbf9b04221cc1b689e3a43 (patch)
treece229e0a7a28ecb82cee6988b0514627c4dc4824 /src
parentaf9b5f2f8553b62d9bc7b212ca7f1246268e6620 (diff)
efl: update Efl.Model to properly propagate EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED.
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore/efl_model_container.c2
-rw-r--r--src/lib/ecore/efl_model_item.c5
-rw-r--r--src/lib/eio/eio_model.c4
-rw-r--r--src/lib/eldbus/eldbus_model_connection.c4
-rw-r--r--src/lib/eldbus/eldbus_model_object.c4
-rw-r--r--src/lib/eldbus/eldbus_model_proxy.c2
6 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/ecore/efl_model_container.c b/src/lib/ecore/efl_model_container.c
index 7fd940f46c..0832a2f0dc 100644
--- a/src/lib/ecore/efl_model_container.c
+++ b/src/lib/ecore/efl_model_container.c
@@ -212,7 +212,7 @@ _efl_model_container_child_property_add(Eo *obj,
212 } 212 }
213 213
214 if (in_count > children_count) 214 if (in_count > children_count)
215 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, &in_count); 215 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL);
216 216
217 return EINA_TRUE; 217 return EINA_TRUE;
218 218
diff --git a/src/lib/ecore/efl_model_item.c b/src/lib/ecore/efl_model_item.c
index 84faf75ed4..e5058c10ff 100644
--- a/src/lib/ecore/efl_model_item.c
+++ b/src/lib/ecore/efl_model_item.c
@@ -171,7 +171,7 @@ _efl_model_item_efl_model_child_add(Eo *obj, Efl_Model_Item_Data *sd)
171 sd->childrens = eina_list_append(sd->childrens, child); 171 sd->childrens = eina_list_append(sd->childrens, child);
172 172
173 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILD_ADDED, &cevt); 173 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILD_ADDED, &cevt);
174 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, &cevt.index); 174 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL);
175 175
176 return child; 176 return child;
177} 177}
@@ -197,8 +197,7 @@ _efl_model_item_efl_model_child_del(Eo *obj, Efl_Model_Item_Data *sd, Eo *child)
197 197
198 efl_parent_set(child, NULL); 198 efl_parent_set(child, NULL);
199 199
200 i = eina_list_count(sd->childrens); 200 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL);
201 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, &i);
202 201
203 break; 202 break;
204 } 203 }
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 307d5a705c..e04db78eee 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -126,6 +126,7 @@ _efl_model_evt_added_ecore_cb(void *data, int type, void *event)
126 126
127 // Notify of the new child being added 127 // Notify of the new child being added
128 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILD_ADDED, &cevt); 128 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILD_ADDED, &cevt);
129 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL);
129 130
130 end: 131 end:
131 eina_stringshare_del(spath); 132 eina_stringshare_del(spath);
@@ -170,6 +171,7 @@ _efl_model_evt_deleted_ecore_cb(void *data, int type, void *event)
170 cevt.child = mi->object; 171 cevt.child = mi->object;
171 172
172 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILD_REMOVED, &cevt); 173 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILD_REMOVED, &cevt);
174 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL);
173 175
174 // Remove the entry from the files list 176 // Remove the entry from the files list
175 pd->files = eina_list_remove_list(pd->files, l); 177 pd->files = eina_list_remove_list(pd->files, l);
@@ -714,6 +716,8 @@ _eio_model_children_list(void *data, Eina_Array *entries)
714 716
715 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILD_ADDED, &cevt); 717 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILD_ADDED, &cevt);
716 } 718 }
719
720 efl_event_callback_call(obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL);
717} 721}
718 722
719static Eina_Value 723static Eina_Value
diff --git a/src/lib/eldbus/eldbus_model_connection.c b/src/lib/eldbus/eldbus_model_connection.c
index ef16f982a0..28f02423dc 100644
--- a/src/lib/eldbus/eldbus_model_connection.c
+++ b/src/lib/eldbus/eldbus_model_connection.c
@@ -105,7 +105,6 @@ _eldbus_model_connection_names_list_cb(void *data,
105 const char *error_name, *error_text; 105 const char *error_name, *error_text;
106 Eldbus_Message_Iter *array = NULL; 106 Eldbus_Message_Iter *array = NULL;
107 const char *bus; 107 const char *bus;
108 unsigned int count;
109 108
110 pd->pending = NULL; 109 pd->pending = NULL;
111 110
@@ -139,8 +138,7 @@ _eldbus_model_connection_names_list_cb(void *data,
139 138
140 pd->is_listed = EINA_TRUE; 139 pd->is_listed = EINA_TRUE;
141 140
142 count = eina_list_count(pd->childrens); 141 efl_event_callback_call(pd->obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL);
143 efl_event_callback_call(pd->obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, &count);
144 142
145 EINA_LIST_FREE(pd->requests, slice) 143 EINA_LIST_FREE(pd->requests, slice)
146 { 144 {
diff --git a/src/lib/eldbus/eldbus_model_object.c b/src/lib/eldbus/eldbus_model_object.c
index 5bb9269463..02bfc9778c 100644
--- a/src/lib/eldbus/eldbus_model_object.c
+++ b/src/lib/eldbus/eldbus_model_object.c
@@ -242,7 +242,6 @@ _eldbus_model_object_introspect_cb(void *data,
242 const char *error_text; 242 const char *error_text;
243 const char *xml = NULL; 243 const char *xml = NULL;
244 const char *current_path; 244 const char *current_path;
245 unsigned int count;
246 245
247 pd->pendings = eina_list_remove(pd->pendings, pending); 246 pd->pendings = eina_list_remove(pd->pendings, pending);
248 object = eldbus_pending_data_get(pending, "object"); 247 object = eldbus_pending_data_get(pending, "object");
@@ -276,8 +275,7 @@ _eldbus_model_object_introspect_cb(void *data,
276 275
277 if (eina_list_count(pd->pendings) != 0) return ; 276 if (eina_list_count(pd->pendings) != 0) return ;
278 277
279 count = eina_list_count(pd->childrens); 278 efl_event_callback_call(pd->obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL);
280 efl_event_callback_call(pd->obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, &count);
281 279
282 pd->is_listed = EINA_TRUE; 280 pd->is_listed = EINA_TRUE;
283 281
diff --git a/src/lib/eldbus/eldbus_model_proxy.c b/src/lib/eldbus/eldbus_model_proxy.c
index 229bcc0480..c1ab3b2565 100644
--- a/src/lib/eldbus/eldbus_model_proxy.c
+++ b/src/lib/eldbus/eldbus_model_proxy.c
@@ -375,6 +375,8 @@ _eldbus_model_proxy_listed(Eldbus_Model_Proxy_Data *pd)
375 { 375 {
376 _eldbus_model_proxy_create_methods_children(pd); 376 _eldbus_model_proxy_create_methods_children(pd);
377 _eldbus_model_proxy_create_signals_children(pd); 377 _eldbus_model_proxy_create_signals_children(pd);
378
379 efl_event_callback_call(pd->obj, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, NULL);
378 pd->is_listed = EINA_TRUE; 380 pd->is_listed = EINA_TRUE;
379 } 381 }
380} 382}