From e1c98a8ad492feeea2c86f7cdb26d0c06cab2182 Mon Sep 17 00:00:00 2001 From: Artem Garmash Date: Sat, 6 Feb 2010 23:34:04 +0200 Subject: [PATCH] Use service in el callback to ignore not relevant events --- src/el-home-applet.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/el-home-applet.c b/src/el-home-applet.c index c21f681..0e683f9 100644 --- a/src/el-home-applet.c +++ b/src/el-home-applet.c @@ -1041,7 +1041,7 @@ make_query (RTComEl *el, gint event_id) rtcom_el_query_prepare (query, "is-read", FALSE, RTCOM_EL_OP_EQUAL, "service", conv_services, RTCOM_EL_OP_IN_STRV, - /* "event-type", conv_event_types, RTCOM_EL_OP_IN_STRV, */ + "event-type", conv_event_types, RTCOM_EL_OP_IN_STRV, NULL); } it = rtcom_el_get_events (el, query); @@ -1440,20 +1440,21 @@ new_event_cb (RTComEl *backend, ELHomeApplet *self) { g_warning ("%s %s %s %s", local_uid, remote_uid, remote_ebook_uid, service); -#if 0 - const gchar** conv_service = conv_services; + + if (service && service[0] != '\0') { + const gchar** conv_service = conv_services; g_warning ("%s", service); - do { - g_warning ("%s", *conv_service); - if (!g_strcmp0 (*conv_service, service)) { - add_new_idle (self); - return; + do { + g_warning ("%s", *conv_service); + if (!g_strcmp0 (*conv_service, service)) { + add_new_idle (self); + return; + } } + while(*++conv_service); } - while(*++conv_service); -#else - add_new_idle (self); -#endif + else + add_new_idle (self); } static gboolean -- 1.7.9.5