diff options
author | Ted Gould <ted@gould.cx> | 2011-07-22 12:15:29 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-07-22 12:15:29 -0500 |
commit | 0e09129f85bcfba44880654507cb9093c4298f25 (patch) | |
tree | 81eedcfdeaaba5b7dce3dc7b209c5172d45eb357 /src/messages-service-dbus.c | |
parent | 3a5ded2687b74d61f3bffdfd5f1f44a4a1db240c (diff) | |
parent | 3fc0ec76ff87ba2249171a0dc5527b876df584c3 (diff) | |
download | ayatana-indicator-messages-0e09129f85bcfba44880654507cb9093c4298f25.tar.gz ayatana-indicator-messages-0e09129f85bcfba44880654507cb9093c4298f25.tar.bz2 ayatana-indicator-messages-0e09129f85bcfba44880654507cb9093c4298f25.zip |
Add a clear attention menu item and attach it to middle click
Diffstat (limited to 'src/messages-service-dbus.c')
-rw-r--r-- | src/messages-service-dbus.c | 9 |
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); } |