aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-09-22 14:35:51 -0500
committerTed Gould <ted@gould.cx>2014-09-22 14:35:51 -0500
commit47f188360bd406d084935be0de209d69a7cec9e8 (patch)
tree4acab8af3c3c5901a29cdc4506514a1950c87dd0 /src
parente44aeafe24ab18e07a23e8fc7f3cf53a7b1431f8 (diff)
downloadayatana-indicator-messages-47f188360bd406d084935be0de209d69a7cec9e8.tar.gz
ayatana-indicator-messages-47f188360bd406d084935be0de209d69a7cec9e8.tar.bz2
ayatana-indicator-messages-47f188360bd406d084935be0de209d69a7cec9e8.zip
Get the value on whether we should show on the welcome screen
Diffstat (limited to 'src')
-rw-r--r--src/im-accounts-service.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/im-accounts-service.c b/src/im-accounts-service.c
index cea5866..c7d3083 100644
--- a/src/im-accounts-service.c
+++ b/src/im-accounts-service.c
@@ -165,6 +165,20 @@ im_accounts_service_set_draws_attention (ImAccountsService * service, gboolean d
gboolean
im_accounts_service_get_show_on_greeter (ImAccountsService * service)
{
+ g_return_val_if_fail(IM_IS_ACCOUNTS_SERVICE(service), FALSE);
- return FALSE;
+ ImAccountsServicePrivate * priv = IM_ACCOUNTS_SERVICE_GET_PRIVATE(service);
+
+ if (priv->touch_settings == NULL) {
+ return FALSE;
+ }
+
+ GVariant * val = g_dbus_proxy_get_cached_property(priv->touch_settings, "MessagesWelcomeScreen");
+ if (val == NULL) {
+ return FALSE;
+ }
+
+ gboolean retval = g_variant_get_boolean(val);
+ g_variant_unref(val);
+ return retval;
}