aboutsummaryrefslogtreecommitdiff
path: root/src/messages-service-dbus.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-08-11 09:27:46 -0500
committerTed Gould <ted@gould.cx>2011-08-11 09:27:46 -0500
commit6deeec596bef04ffaf469dfcf5197b36b41813cf (patch)
tree2266572ee35c31d2b2cff06fd36742f49f80a4d2 /src/messages-service-dbus.c
parente4522e407e617103d5f4af75ddcc3f9cf726bedc (diff)
parent3e347a0dba56074bcd4023450afb1982e16e1684 (diff)
downloadayatana-indicator-messages-6deeec596bef04ffaf469dfcf5197b36b41813cf.tar.gz
ayatana-indicator-messages-6deeec596bef04ffaf469dfcf5197b36b41813cf.tar.bz2
ayatana-indicator-messages-6deeec596bef04ffaf469dfcf5197b36b41813cf.zip
Import upstream version 0.4.93
Diffstat (limited to 'src/messages-service-dbus.c')
-rw-r--r--src/messages-service-dbus.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/messages-service-dbus.c b/src/messages-service-dbus.c
index 6cc33e0..1585ac0 100644
--- a/src/messages-service-dbus.c
+++ b/src/messages-service-dbus.c
@@ -200,7 +200,10 @@ message_service_dbus_new (void)
static void
bus_method_call (GDBusConnection * connection, const gchar * sender, const gchar * path, const gchar * interface, const gchar * method, GVariant * params, GDBusMethodInvocation * invocation, gpointer user_data)
{
- MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(user_data);
+ MessageServiceDbus * ms = MESSAGE_SERVICE_DBUS(user_data);
+ if (ms == NULL) { return; }
+
+ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(ms);
if (g_strcmp0("AttentionRequested", method) == 0) {
g_dbus_method_invocation_return_value(invocation, g_variant_new("(b)", priv->dot));
@@ -208,6 +211,10 @@ bus_method_call (GDBusConnection * connection, const gchar * sender, const gchar
} else if (g_strcmp0("IconShown", method) == 0) {
g_dbus_method_invocation_return_value(invocation, g_variant_new("(b)", priv->hidden));
return;
+ } else if (g_strcmp0("ClearAttention", method) == 0) {
+ message_service_dbus_set_attention(ms, FALSE);
+ g_dbus_method_invocation_return_value(invocation, NULL);
+ return;
} else {
g_warning("Unknown function call '%s'", method);
}