aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-09-22 14:45:14 -0500
committerTed Gould <ted@gould.cx>2014-09-22 14:45:14 -0500
commit29fd0490ab7f2a03b87b34247743fa03e3278faf (patch)
tree10a5050c952a742b689f45c4e4977fd3e6581a7e /src
parent47f188360bd406d084935be0de209d69a7cec9e8 (diff)
downloadayatana-indicator-messages-29fd0490ab7f2a03b87b34247743fa03e3278faf.tar.gz
ayatana-indicator-messages-29fd0490ab7f2a03b87b34247743fa03e3278faf.tar.bz2
ayatana-indicator-messages-29fd0490ab7f2a03b87b34247743fa03e3278faf.zip
Fleshing out drawing attention
Diffstat (limited to 'src')
-rw-r--r--src/im-accounts-service.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/im-accounts-service.c b/src/im-accounts-service.c
index c7d3083..a993e6e 100644
--- a/src/im-accounts-service.c
+++ b/src/im-accounts-service.c
@@ -155,13 +155,33 @@ im_accounts_service_ref_default (void)
return g_object_ref(as);
}
+/* The draws attention setting is very legacy right now, we've patched and not changed
+ things much. We're gonna do better in the future, this function abstracts out the ugly */
void
im_accounts_service_set_draws_attention (ImAccountsService * service, gboolean draws_attention)
{
+ g_return_if_fail(IM_IS_ACCOUNTS_SERVICE(service));
+ ImAccountsServicePrivate * priv = IM_ACCOUNTS_SERVICE_GET_PRIVATE(service);
+ if (priv->touch_settings == NULL) {
+ return;
+ }
+ g_dbus_connection_call(g_dbus_proxy_get_connection(priv->touch_settings),
+ g_dbus_proxy_get_name(priv->touch_settings),
+ g_dbus_proxy_get_object_path(priv->touch_settings),
+ "org.freedesktop.Accounts.User",
+ "SetXHasMessages",
+ g_variant_new("(b)", draws_attention),
+ NULL, /* reply */
+ G_DBUS_CALL_FLAGS_NONE,
+ -1, /* timeout */
+ NULL, /* cancellable */
+ NULL, NULL); /* cb */
}
+/* Looks at the property that is set by settings. We default to off in any case
+ that we can or we don't know what the state is. */
gboolean
im_accounts_service_get_show_on_greeter (ImAccountsService * service)
{