aboutsummaryrefslogtreecommitdiff
path: root/src/messages-service-dbus.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-08-11 14:14:39 -0400
committerKen VanDine <ken.vandine@canonical.com>2011-08-11 14:14:39 -0400
commit2d1a071b3357517db74dbecb4a70a8233756f6f0 (patch)
treef74f9f13dac6e58bfcd813a7ab2a20ef178b3db2 /src/messages-service-dbus.c
parent191be4ed4601ce62c3197eb14b4044c89a26a0cd (diff)
parent52de3eb2a2a7cc6a1ed8272d85585f1463f836d9 (diff)
downloadayatana-indicator-messages-2d1a071b3357517db74dbecb4a70a8233756f6f0.tar.gz
ayatana-indicator-messages-2d1a071b3357517db74dbecb4a70a8233756f6f0.tar.bz2
ayatana-indicator-messages-2d1a071b3357517db74dbecb4a70a8233756f6f0.zip
* New upstream release.
* Add an item to clear the alert * Choose mail applications based on the default application * Clear based on middle click * Merge new upstream from Ubuntu. * Standards-Version: 3.9.2 * Merge new upstream from Ubuntu. * Fix 0.3.11-0ubuntu3 changelog entry (missed a space), so that bzr builddeb won't go crazy (see Debian Bug #620242) * Fix debian/copyright, was refering to libdbusmenu by mistake.
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);
}