summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-18 22:03:29 +0100
committerinfirit <[email protected]>2014-11-18 22:03:29 +0100
commitbfd71deec2b345ba1cbef98e3f4dfac052957c46 (patch)
tree747589d2a5ab18f62d507b1779462ce0ffec2038
parent42c5b914135e2265e46c45abbb71ea819b07ab37 (diff)
downloadmate-session-manager-bfd71deec2b345ba1cbef98e3f4dfac052957c46.tar.bz2
mate-session-manager-bfd71deec2b345ba1cbef98e3f4dfac052957c46.tar.xz
logout-dialog: Fix stupid mistake in ccfc0f67de5e6b15a1c7e33f45c671bc2cebd4b4
-rw-r--r--mate-session/gsm-logout-dialog.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mate-session/gsm-logout-dialog.c b/mate-session/gsm-logout-dialog.c
index cd03139..464101b 100644
--- a/mate-session/gsm-logout-dialog.c
+++ b/mate-session/gsm-logout-dialog.c
@@ -246,21 +246,22 @@ static gboolean
gsm_logout_supports_switch_user (GsmLogoutDialog *logout_dialog)
{
GSettings *settings;
- gboolean ret;
+ gboolean ret = FALSE;
+ gboolean locked;
settings = g_settings_new (LOCKDOWN_SCHEMA);
- if (g_settings_get_boolean (settings, KEY_USER_SWITCHING_DISABLE))
- ret = FALSE;
+ locked = g_settings_get_boolean (settings, KEY_USER_SWITCHING_DISABLE);
g_object_unref (settings);
- if (ret)
+ if (!locked) {
#ifdef HAVE_SYSTEMD
if (LOGIND_RUNNING())
ret = gsm_systemd_can_switch_user (logout_dialog->priv->systemd);
else
#endif
ret = gsm_consolekit_can_switch_user (logout_dialog->priv->consolekit);
+ }
return ret;
}