summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorFlavio Ceolin <flavio.ceolin@gmail.com>2014-10-26 22:13:22 -0200
committerFlavio Ceolin <flavio.ceolin@gmail.com>2014-10-29 23:57:10 -0200
commit1324b2b07d36a5fed73837c769b0d3af57dff283 (patch)
tree3d67bb6bb9e240e597b3dc09b116f58bb5962665 /src/bin
parentd25435a066491ce2dd4d740313af3b4db817e450 (diff)
Using callbacks instead of Ecore_Events
Also the volume meter functionality was removed.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/main.c14
-rw-r--r--src/bin/playbacks_view.c110
-rw-r--r--src/bin/sinks_view.c79
-rw-r--r--src/bin/sources_view.c79
4 files changed, 109 insertions, 173 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index 276a0d4..2077176 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -16,10 +16,6 @@ elm_main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
16 EINA_SAFETY_ON_FALSE_RETURN_VAL(emixer_common_init("emixer"), EXIT_FAILURE); 16 EINA_SAFETY_ON_FALSE_RETURN_VAL(emixer_common_init("emixer"), EXIT_FAILURE);
17 EINA_SAFETY_ON_FALSE_RETURN_VAL(emix_init() == EINA_TRUE, EXIT_FAILURE); 17 EINA_SAFETY_ON_FALSE_RETURN_VAL(emix_init() == EINA_TRUE, EXIT_FAILURE);
18 18
19 win = main_window_add();
20 evas_object_resize(win, DEFAULT_WIDTH, DEFAULT_HEIGHT);
21 evas_object_show(win);
22
23 if (emix_backend_set("PULSEAUDIO") == EINA_FALSE) 19 if (emix_backend_set("PULSEAUDIO") == EINA_FALSE)
24 { 20 {
25 WRN("Could not load PULSEAUDIO, trying another one ..."); 21 WRN("Could not load PULSEAUDIO, trying another one ...");
@@ -37,9 +33,15 @@ elm_main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
37 else 33 else
38 backend_loaded = EINA_TRUE; 34 backend_loaded = EINA_TRUE;
39 35
40 if (backend_loaded) 36 if (!backend_loaded)
41 elm_run(); 37 goto end;
38
39 win = main_window_add();
40 evas_object_resize(win, DEFAULT_WIDTH, DEFAULT_HEIGHT);
41 evas_object_show(win);
42 elm_run();
42 43
44end:
43 emixer_common_shutdown(); 45 emixer_common_shutdown();
44 emix_shutdown(); 46 emix_shutdown();
45 return 0; 47 return 0;
diff --git a/src/bin/playbacks_view.c b/src/bin/playbacks_view.c
index 3483f06..43b818a 100644
--- a/src/bin/playbacks_view.c
+++ b/src/bin/playbacks_view.c
@@ -10,40 +10,27 @@ struct Playbacks_View
10 Evas_Object *self; 10 Evas_Object *self;
11 Evas_Object *genlist; 11 Evas_Object *genlist;
12 Elm_Genlist_Item_Class *itc; 12 Elm_Genlist_Item_Class *itc;
13
14 Ecore_Event_Handler *disconnected;
15 Ecore_Event_Handler *sink_input_added;
16 Ecore_Event_Handler *sink_input_changed;
17 Ecore_Event_Handler *sink_input_removed;
18 Ecore_Event_Handler *sink_added;
19 Ecore_Event_Handler *sink_removed;
20}; 13};
21 14
22 static Eina_Bool 15 static void
23_disconnected_cb(void *data, int type EINA_UNUSED, void *info EINA_UNUSED) 16_disconnected(void *data)
24{ 17{
25 struct Playbacks_View *pv = data; 18 struct Playbacks_View *pv = data;
26 elm_genlist_clear(pv->genlist); 19 elm_genlist_clear(pv->genlist);
27
28 return ECORE_CALLBACK_PASS_ON;
29} 20}
30 21
31static Eina_Bool 22static void
32_sink_input_add_cb(void *data, int type EINA_UNUSED, 23_sink_input_added(void *data, void *info)
33 void *info)
34{ 24{
35 struct Playbacks_View *pv = data; 25 struct Playbacks_View *pv = data;
36 Emix_Sink_Input *input = info; 26 Emix_Sink_Input *input = info;
37 27
38 elm_genlist_item_append(pv->genlist, pv->itc, input, NULL, 28 elm_genlist_item_append(pv->genlist, pv->itc, input, NULL,
39 ELM_GENLIST_ITEM_NONE, NULL, pv); 29 ELM_GENLIST_ITEM_NONE, NULL, pv);
40
41 return ECORE_CALLBACK_DONE;
42} 30}
43 31
44static Eina_Bool 32static void
45_sink_input_removed_cb(void *data, int type EINA_UNUSED, 33_sink_input_removed(void *data, void *info)
46 void *info)
47{ 34{
48 struct Playbacks_View *pv = data; 35 struct Playbacks_View *pv = data;
49 Emix_Sink_Input *ev = info; 36 Emix_Sink_Input *ev = info;
@@ -61,20 +48,17 @@ _sink_input_removed_cb(void *data, int type EINA_UNUSED,
61 } 48 }
62 while ((item = elm_genlist_item_next_get(item))); 49 while ((item = elm_genlist_item_next_get(item)));
63 } 50 }
64
65 return ECORE_CALLBACK_PASS_ON;
66} 51}
67 52
68static Eina_Bool 53static void
69_sink_input_changed_cb(void *data, int type EINA_UNUSED, 54_sink_input_changed(void *data, void *info)
70 void *info)
71{ 55{
72 struct Playbacks_View *pv = data; 56 struct Playbacks_View *pv = data;
73 Emix_Sink_Input *ev = info; 57 Emix_Sink_Input *ev = info;
74 Elm_Object_Item *item = elm_genlist_first_item_get(pv->genlist); 58 Elm_Object_Item *item = elm_genlist_first_item_get(pv->genlist);
75 Evas_Object *it; 59 Evas_Object *it;
76 60
77 while (item) 61 while (item)
78 { 62 {
79 if (ev == elm_object_item_data_get(item)) 63 if (ev == elm_object_item_data_get(item))
80 { 64 {
@@ -89,50 +73,46 @@ _sink_input_changed_cb(void *data, int type EINA_UNUSED,
89 } 73 }
90 item = elm_genlist_item_next_get(item); 74 item = elm_genlist_item_next_get(item);
91 } 75 }
92
93 return ECORE_CALLBACK_PASS_ON;
94} 76}
95 77
96static Eina_Bool 78static void
97_sink_added_cb(void *data, int type EINA_UNUSED, void *info EINA_UNUSED) 79_sink_event(void *data)
98{ 80{
99 struct Playbacks_View *pv = data; 81 struct Playbacks_View *pv = data;
100 elm_genlist_realized_items_update(pv->genlist); 82 elm_genlist_realized_items_update(pv->genlist);
101
102 return ECORE_CALLBACK_PASS_ON;
103} 83}
104 84
105static Eina_Bool 85static void
106_sink_removed_cb(void *data, int type EINA_UNUSED, void *info EINA_UNUSED) 86_events_cb(void *data, enum Emix_Event type, void *event_info)
107{ 87{
108 struct Playbacks_View *pv = data; 88 switch (type)
109 89 {
110 elm_genlist_realized_items_update(pv->genlist); 90 case EMIX_SINK_ADDED_EVENT:
111 return ECORE_CALLBACK_PASS_ON; 91 case EMIX_SINK_REMOVED_EVENT:
92 _sink_event(data);
93 break;
94 case EMIX_DISCONNECTED_EVENT:
95 _disconnected(data);
96 break;
97 case EMIX_SINK_INPUT_ADDED_EVENT:
98 _sink_input_added(data, event_info);
99 break;
100 case EMIX_SINK_INPUT_CHANGED_EVENT:
101 _sink_input_changed(data, event_info);
102 break;
103 case EMIX_SINK_INPUT_REMOVED_EVENT:
104 _sink_input_removed(data, event_info);
105 break;
106 default:
107 break;
108 }
112} 109}
113 110
114static void 111static void
115_del_cb(void *data, 112_del_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED,
116 Evas *e EINA_UNUSED,
117 Evas_Object *o EINA_UNUSED,
118 void *event_info EINA_UNUSED) 113 void *event_info EINA_UNUSED)
119{ 114{
120 struct Playbacks_View *pv = data; 115 emix_event_callback_del(_events_cb);
121
122#define ECORE_EVENT_HANDLER_DEL(_handle) \
123 if (pv->_handle) \
124 { \
125 ecore_event_handler_del(pv->_handle); \
126 pv->_handle = NULL; \
127 }
128
129 ECORE_EVENT_HANDLER_DEL(disconnected)
130 ECORE_EVENT_HANDLER_DEL(sink_input_added)
131 ECORE_EVENT_HANDLER_DEL(sink_input_changed)
132 ECORE_EVENT_HANDLER_DEL(sink_input_removed)
133 ECORE_EVENT_HANDLER_DEL(sink_removed)
134 ECORE_EVENT_HANDLER_DEL(sink_added)
135#undef ECORE_EVENT_HANDLER_DEL
136} 116}
137 117
138static char * 118static char *
@@ -267,18 +247,7 @@ playbacks_view_add(Evas_Object *parent)
267 pv->genlist = elm_genlist_add(layout); 247 pv->genlist = elm_genlist_add(layout);
268 EINA_SAFETY_ON_NULL_GOTO(pv->genlist, err_genlist); 248 EINA_SAFETY_ON_NULL_GOTO(pv->genlist, err_genlist);
269 249
270 pv->disconnected = ecore_event_handler_add(EMIX_DISCONNECTED_EVENT, 250 emix_event_callback_add(_events_cb, pv);
271 _disconnected_cb, pv);
272 pv->sink_input_added = ecore_event_handler_add(EMIX_SINK_INPUT_ADDED_EVENT,
273 _sink_input_add_cb, pv);
274 pv->sink_input_added = ecore_event_handler_add(EMIX_SINK_INPUT_CHANGED_EVENT,
275 _sink_input_changed_cb, pv);
276 pv->sink_input_removed = ecore_event_handler_add(EMIX_SINK_INPUT_REMOVED_EVENT,
277 _sink_input_removed_cb, pv);
278 pv->sink_removed = ecore_event_handler_add(EMIX_SINK_REMOVED_EVENT,
279 _sink_removed_cb, pv);
280 pv->sink_added = ecore_event_handler_add(EMIX_SINK_ADDED_EVENT,
281 _sink_added_cb, pv);
282 251
283 pv->itc = elm_genlist_item_class_new(); 252 pv->itc = elm_genlist_item_class_new();
284 EINA_SAFETY_ON_NULL_GOTO(pv->itc, err_genlist); 253 EINA_SAFETY_ON_NULL_GOTO(pv->itc, err_genlist);
@@ -303,11 +272,6 @@ playbacks_view_add(Evas_Object *parent)
303 return layout; 272 return layout;
304 273
305 err_genlist: 274 err_genlist:
306 ecore_event_handler_del(pv->sink_input_added);
307 ecore_event_handler_del(pv->sink_input_changed);
308 ecore_event_handler_del(pv->sink_input_removed);
309 ecore_event_handler_del(pv->sink_added);
310 ecore_event_handler_del(pv->sink_removed);
311 free(layout); 275 free(layout);
312 err: 276 err:
313 free(pv); 277 free(pv);
diff --git a/src/bin/sinks_view.c b/src/bin/sinks_view.c
index eb0c275..dbbfabc 100644
--- a/src/bin/sinks_view.c
+++ b/src/bin/sinks_view.c
@@ -9,36 +9,27 @@ struct Sinks_View
9 Evas_Object *self; 9 Evas_Object *self;
10 Evas_Object *genlist; 10 Evas_Object *genlist;
11 Elm_Genlist_Item_Class *itc; 11 Elm_Genlist_Item_Class *itc;
12
13 Ecore_Event_Handler *disconnected;
14 Ecore_Event_Handler *sink_added;
15 Ecore_Event_Handler *sink_changed;
16 Ecore_Event_Handler *sink_removed;
17}; 12};
18 13
19static Eina_Bool 14static void
20_disconnected_cb(void *data, int type EINA_UNUSED, void *info EINA_UNUSED) 15_disconnected(void *data)
21{ 16{
22 struct Sinks_View *sv = data; 17 struct Sinks_View *sv = data;
23 elm_genlist_clear(sv->genlist); 18 elm_genlist_clear(sv->genlist);
24
25 return ECORE_CALLBACK_PASS_ON;
26} 19}
27 20
28static Eina_Bool 21static void
29_sink_add_cb(void *data, int type EINA_UNUSED, void *info) 22_sink_added(void *data, void *info)
30{ 23{
31 struct Sinks_View *sv = data; 24 struct Sinks_View *sv = data;
32 Emix_Sink *sink = info; 25 Emix_Sink *sink = info;
33 26
34 elm_genlist_item_append(sv->genlist, sv->itc, sink, NULL, 27 elm_genlist_item_append(sv->genlist, sv->itc, sink, NULL,
35 ELM_GENLIST_ITEM_NONE, NULL, sv); 28 ELM_GENLIST_ITEM_NONE, NULL, sv);
36
37 return ECORE_CALLBACK_PASS_ON;
38} 29}
39 30
40static Eina_Bool 31static void
41_sink_removed_cb(void *data, int type EINA_UNUSED, void *info) 32_sink_removed(void *data, void *info)
42{ 33{
43 struct Sinks_View *sv = data; 34 struct Sinks_View *sv = data;
44 Emix_Sink *ev = info; 35 Emix_Sink *ev = info;
@@ -56,12 +47,10 @@ _sink_removed_cb(void *data, int type EINA_UNUSED, void *info)
56 } 47 }
57 while ((item = elm_genlist_item_next_get(item))); 48 while ((item = elm_genlist_item_next_get(item)));
58 } 49 }
59
60 return ECORE_CALLBACK_PASS_ON;
61} 50}
62 51
63static Eina_Bool 52static void
64_sink_changed_cb(void *data, int type EINA_UNUSED, void *info) 53_sink_changed(void *data, void *info)
65{ 54{
66 struct Sinks_View *sv = data; 55 struct Sinks_View *sv = data;
67 Emix_Sink *sink = info; 56 Emix_Sink *sink = info;
@@ -98,28 +87,35 @@ _sink_changed_cb(void *data, int type EINA_UNUSED, void *info)
98 } 87 }
99 item = elm_genlist_item_next_get(item); 88 item = elm_genlist_item_next_get(item);
100 } 89 }
101
102 return ECORE_CALLBACK_PASS_ON;
103} 90}
104 91
105static void 92static void
106_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, 93_events_cb(void *data, enum Emix_Event type, void *event_info)
107 void *event_info EINA_UNUSED)
108{ 94{
109 struct Sinks_View *sv = data; 95 switch (type)
110 96 {
111#define ECORE_EVENT_HANDLER_DEL(_handle) \ 97 case EMIX_SINK_ADDED_EVENT:
112 if (sv->_handle) \ 98 _sink_added(data, event_info);
113 { \ 99 break;
114 ecore_event_handler_del(sv->_handle); \ 100 case EMIX_SINK_CHANGED_EVENT:
115 sv->_handle = NULL; \ 101 _sink_changed(data, event_info);
102 break;
103 case EMIX_SINK_REMOVED_EVENT:
104 _sink_removed(data, event_info);
105 break;
106 case EMIX_DISCONNECTED_EVENT:
107 _disconnected(data);
108 break;
109 default:
110 break;
116 } 111 }
112}
117 113
118 ECORE_EVENT_HANDLER_DEL(disconnected) 114static void
119 ECORE_EVENT_HANDLER_DEL(sink_removed) 115_del_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED,
120 ECORE_EVENT_HANDLER_DEL(sink_changed) 116 void *event_info EINA_UNUSED)
121 ECORE_EVENT_HANDLER_DEL(sink_added) 117{
122#undef ECORE_EVENT_HANDLER_DEL 118 emix_event_callback_del(_events_cb);
123} 119}
124 120
125static char * 121static char *
@@ -231,7 +227,6 @@ _item_content_get(void *data, Evas_Object *obj, const char *part)
231 return item; 227 return item;
232} 228}
233 229
234
235Evas_Object * 230Evas_Object *
236sinks_view_add(Evas_Object *parent) 231sinks_view_add(Evas_Object *parent)
237{ 232{
@@ -251,14 +246,7 @@ sinks_view_add(Evas_Object *parent)
251 sv->genlist = elm_genlist_add(layout); 246 sv->genlist = elm_genlist_add(layout);
252 EINA_SAFETY_ON_NULL_GOTO(sv->genlist, err_genlist); 247 EINA_SAFETY_ON_NULL_GOTO(sv->genlist, err_genlist);
253 248
254 sv->disconnected = ecore_event_handler_add(EMIX_DISCONNECTED_EVENT, 249 emix_event_callback_add(_events_cb, sv);
255 _disconnected_cb, sv);
256 sv->sink_added = ecore_event_handler_add(EMIX_SINK_ADDED_EVENT,
257 _sink_add_cb, sv);
258 sv->sink_added = ecore_event_handler_add(EMIX_SINK_CHANGED_EVENT,
259 _sink_changed_cb, sv);
260 sv->sink_removed = ecore_event_handler_add(EMIX_SINK_REMOVED_EVENT,
261 _sink_removed_cb, sv);
262 250
263 sv->itc = elm_genlist_item_class_new(); 251 sv->itc = elm_genlist_item_class_new();
264 EINA_SAFETY_ON_NULL_GOTO(sv->itc, err_genlist); 252 EINA_SAFETY_ON_NULL_GOTO(sv->itc, err_genlist);
@@ -283,9 +271,6 @@ sinks_view_add(Evas_Object *parent)
283 return layout; 271 return layout;
284 272
285 err_genlist: 273 err_genlist:
286 ecore_event_handler_del(sv->sink_added);
287 ecore_event_handler_del(sv->sink_changed);
288 ecore_event_handler_del(sv->sink_removed);
289 free(layout); 274 free(layout);
290 err: 275 err:
291 free(sv); 276 free(sv);
diff --git a/src/bin/sources_view.c b/src/bin/sources_view.c
index 12b0f04..470dfba 100644
--- a/src/bin/sources_view.c
+++ b/src/bin/sources_view.c
@@ -9,36 +9,27 @@ struct Sources_View
9 Evas_Object *self; 9 Evas_Object *self;
10 Evas_Object *genlist; 10 Evas_Object *genlist;
11 Elm_Genlist_Item_Class *itc; 11 Elm_Genlist_Item_Class *itc;
12
13 Ecore_Event_Handler *disconnected;
14 Ecore_Event_Handler *source_added;
15 Ecore_Event_Handler *source_changed;
16 Ecore_Event_Handler *source_removed;
17}; 12};
18 13
19static Eina_Bool 14static void
20_disconnected_cb(void *data, int type EINA_UNUSED, void *info EINA_UNUSED) 15_disconnected(void *data)
21{ 16{
22 struct Sources_View *sv = data; 17 struct Sources_View *sv = data;
23 elm_genlist_clear(sv->genlist); 18 elm_genlist_clear(sv->genlist);
24
25 return ECORE_CALLBACK_PASS_ON;
26} 19}
27 20
28static Eina_Bool 21static void
29_source_add_cb(void *data, int type EINA_UNUSED, void *info) 22_source_added(void *data, void *info)
30{ 23{
31 struct Sources_View *sv = data; 24 struct Sources_View *sv = data;
32 Emix_Source *source= info; 25 Emix_Source *source= info;
33 26
34 elm_genlist_item_append(sv->genlist, sv->itc, source, NULL, 27 elm_genlist_item_append(sv->genlist, sv->itc, source, NULL,
35 ELM_GENLIST_ITEM_NONE, NULL, sv); 28 ELM_GENLIST_ITEM_NONE, NULL, sv);
36
37 return ECORE_CALLBACK_PASS_ON;
38} 29}
39 30
40static Eina_Bool 31static void
41_source_removed_cb(void *data, int type EINA_UNUSED, void *info) 32_source_removed(void *data, void *info)
42{ 33{
43 struct Sources_View *sv = data; 34 struct Sources_View *sv = data;
44 Emix_Source *source = info; 35 Emix_Source *source = info;
@@ -56,12 +47,10 @@ _source_removed_cb(void *data, int type EINA_UNUSED, void *info)
56 } 47 }
57 while ((item = elm_genlist_item_next_get(item))); 48 while ((item = elm_genlist_item_next_get(item)));
58 } 49 }
59
60 return ECORE_CALLBACK_PASS_ON;
61} 50}
62 51
63static Eina_Bool 52static void
64_source_changed_cb(void *data, int type EINA_UNUSED, void *info) 53_source_changed(void *data, void *info)
65{ 54{
66 struct Sources_View *sv = data; 55 struct Sources_View *sv = data;
67 Emix_Source *source = info; 56 Emix_Source *source = info;
@@ -83,28 +72,35 @@ _source_changed_cb(void *data, int type EINA_UNUSED, void *info)
83 } 72 }
84 item = elm_genlist_item_next_get(item); 73 item = elm_genlist_item_next_get(item);
85 } 74 }
86
87 return ECORE_CALLBACK_PASS_ON;
88} 75}
89 76
90static void 77static void
91_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, 78_events_cb(void *data, enum Emix_Event type, void *event_info)
92 void *event_info EINA_UNUSED)
93{ 79{
94 struct Sources_View *sv = data; 80 switch (type)
95 81 {
96#define ECORE_EVENT_HANDLER_DEL(_handle) \ 82 case EMIX_SOURCE_ADDED_EVENT:
97 if (sv->_handle) \ 83 _source_added(data, event_info);
98 { \ 84 break;
99 ecore_event_handler_del(sv->_handle); \ 85 case EMIX_SOURCE_CHANGED_EVENT:
100 sv->_handle = NULL; \ 86 _source_changed(data, event_info);
87 break;
88 case EMIX_SOURCE_REMOVED_EVENT:
89 _source_removed(data, event_info);
90 break;
91 case EMIX_DISCONNECTED_EVENT:
92 _disconnected(data);
93 break;
94 default:
95 break;
101 } 96 }
97}
102 98
103 ECORE_EVENT_HANDLER_DEL(disconnected) 99static void
104 ECORE_EVENT_HANDLER_DEL(source_removed) 100_del_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED,
105 ECORE_EVENT_HANDLER_DEL(source_changed) 101 void *event_info EINA_UNUSED)
106 ECORE_EVENT_HANDLER_DEL(source_added) 102{
107#undef ECORE_EVENT_HANDLER_DEL 103 emix_event_callback_del(_events_cb);
108} 104}
109 105
110static char * 106static char *
@@ -201,14 +197,7 @@ sources_view_add(Evas_Object *parent)
201 sv->genlist = elm_genlist_add(layout); 197 sv->genlist = elm_genlist_add(layout);
202 EINA_SAFETY_ON_NULL_GOTO(sv->genlist, err_genlist); 198 EINA_SAFETY_ON_NULL_GOTO(sv->genlist, err_genlist);
203 199
204 sv->disconnected = ecore_event_handler_add(EMIX_DISCONNECTED_EVENT, 200 emix_event_callback_add(_events_cb, sv);
205 _disconnected_cb, sv);
206 sv->source_added = ecore_event_handler_add(EMIX_SOURCE_ADDED_EVENT,
207 _source_add_cb, sv);
208 sv->source_added = ecore_event_handler_add(EMIX_SOURCE_CHANGED_EVENT,
209 _source_changed_cb, sv);
210 sv->source_removed = ecore_event_handler_add(EMIX_SOURCE_REMOVED_EVENT,
211 _source_removed_cb, sv);
212 201
213 sv->itc = elm_genlist_item_class_new(); 202 sv->itc = elm_genlist_item_class_new();
214 EINA_SAFETY_ON_NULL_GOTO(sv->itc, err_genlist); 203 EINA_SAFETY_ON_NULL_GOTO(sv->itc, err_genlist);
@@ -227,10 +216,6 @@ sources_view_add(Evas_Object *parent)
227 return layout; 216 return layout;
228 217
229 err_genlist: 218 err_genlist:
230 ecore_event_handler_del(sv->disconnected);
231 ecore_event_handler_del(sv->source_added);
232 ecore_event_handler_del(sv->source_changed);
233 ecore_event_handler_del(sv->source_removed);
234 free(layout); 219 free(layout);
235 err: 220 err:
236 free(sv); 221 free(sv);