#define NOTIFICATION_UI_DBUS_PATH "/org/freedesktop/Telepathy/Client/NotificationUI"
#define NOTIFICATION_UI_DBUS_IFACE "com.nokia.RtcomNotificationUi"
+static const gchar *conv_services[] = {"RTCOM_EL_SERVICE_SMS",
+ "RTCOM_EL_SERVICE_CHAT",
+ NULL};
+static const gchar *conv_event_types[] = {"RTCOM_EL_EVENTTYPE_SMS_INBOUND",
+ "RTCOM_EL_EVENTTYPE_CHAT_INBOUND",
+ NULL};
+
typedef enum {
SELECTED_NONE,
SELECTED_HEADER,
RTComElQuery *query = NULL;
RTComElIter *it = NULL;
- static const gchar *services[] = {"RTCOM_EL_SERVICE_SMS",
- "RTCOM_EL_SERVICE_CHAT",
- NULL};
- static const gchar *event_types[] = {"RTCOM_EL_EVENTTYPE_SMS_INBOUND",
- "RTCOM_EL_EVENTTYPE_CHAT_INBOUND",
- NULL};
-
query = rtcom_el_query_new (el);
rtcom_el_query_set_limit (query, 1);
if (event_id >= 0) {
rtcom_el_query_prepare (query,
- "is-read", FALSE, RTCOM_EL_OP_EQUAL,
"id", event_id, RTCOM_EL_OP_EQUAL,
- "service", services, RTCOM_EL_OP_IN_STRV,
- "event-type", event_types, RTCOM_EL_OP_IN_STRV,
NULL);
}
else {
rtcom_el_query_prepare (query,
"is-read", FALSE, RTCOM_EL_OP_EQUAL,
- "service", services, RTCOM_EL_OP_IN_STRV,
- "event-type", event_types, RTCOM_EL_OP_IN_STRV,
+ "service", conv_services, RTCOM_EL_OP_IN_STRV,
+ "event-type", conv_event_types, RTCOM_EL_OP_IN_STRV,
NULL);
}
it = rtcom_el_get_events (el, query);
const gchar *service,
ELHomeApplet *self)
{
- /* TODO: avoid updating if not related */
- add_new_idle (self);
+ const gchar** conv_service = conv_services;
+
+ do {
+ if (!g_strcmp0 (*conv_service, service)) {
+ add_new_idle (self);
+ return;
+ }
+ }
+ while(++conv_service);
}
static gboolean