summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousa@expertisesolutions.com.br>2018-11-06 10:42:11 -0200
committerCedric BAIL <cedric@osg.samsung.com>2018-11-29 15:36:17 -0800
commitc4af12164fa690ccf10a6f8594c2a51423cd49c8 (patch)
tree3275a3d64cce986887156aeba94d992f4019545a /src/lib/ecore
parentefab1e03b6784c03febf7b5afc29dc7a33d2792c (diff)
ecore: forward internal Efl.Model events to Efl.Model.Composite
Diffstat (limited to 'src/lib/ecore')
-rw-r--r--src/lib/ecore/efl_model_composite.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/lib/ecore/efl_model_composite.c b/src/lib/ecore/efl_model_composite.c
index dfb3019cbd..225f83d647 100644
--- a/src/lib/ecore/efl_model_composite.c
+++ b/src/lib/ecore/efl_model_composite.c
@@ -20,8 +20,16 @@ struct _Efl_Model_Composite_Data
20static void 20static void
21_efl_model_composite_efl_object_destructor(Eo *obj, Efl_Model_Composite_Data *pd) 21_efl_model_composite_efl_object_destructor(Eo *obj, Efl_Model_Composite_Data *pd)
22{ 22{
23 efl_unref(pd->source); 23 if (pd->source)
24 pd->source = NULL; 24 {
25 efl_event_callback_forwarder_del(pd->source, EFL_MODEL_EVENT_CHILD_ADDED, obj);
26 efl_event_callback_forwarder_del(pd->source, EFL_MODEL_EVENT_CHILD_REMOVED, obj);
27 efl_event_callback_forwarder_del(pd->source, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, obj);
28 efl_event_callback_forwarder_del(pd->source, EFL_MODEL_EVENT_PROPERTIES_CHANGED, obj);
29
30 efl_unref(pd->source);
31 pd->source = NULL;
32 }
25 33
26 efl_destructor(efl_super(obj, EFL_MODEL_COMPOSITE_CLASS)); 34 efl_destructor(efl_super(obj, EFL_MODEL_COMPOSITE_CLASS));
27} 35}
@@ -47,6 +55,11 @@ _efl_model_composite_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Efl_Model_Compos
47 return ; 55 return ;
48 } 56 }
49 pd->source = efl_ref(model); 57 pd->source = efl_ref(model);
58
59 efl_event_callback_forwarder_add(model, EFL_MODEL_EVENT_CHILD_ADDED, obj);
60 efl_event_callback_forwarder_add(model, EFL_MODEL_EVENT_CHILD_REMOVED, obj);
61 efl_event_callback_forwarder_add(model, EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED, obj);
62 efl_event_callback_forwarder_add(model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, obj);
50} 63}
51 64
52static Efl_Model * 65static Efl_Model *