From 4f6e642670e84bc57f8d3df9bf9eb1f41e979b8c Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Thu, 17 Feb 2011 18:06:26 -0500 Subject: [PATCH] info: correctly detect the fallback session --- panels/info/cc-info-panel.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c index b2c7e6619..2a2d35848 100644 --- a/panels/info/cc-info-panel.c +++ b/panels/info/cc-info-panel.c @@ -377,7 +377,7 @@ get_current_is_fallback (CcInfoPanel *self) { GError *error; GVariant *reply; - GVariant *reply_bool; + GVariant *reply_str; gboolean is_fallback; error = NULL; @@ -386,7 +386,7 @@ get_current_is_fallback (CcInfoPanel *self) "/org/gnome/SessionManager", "org.freedesktop.DBus.Properties", "Get", - g_variant_new ("(ss)", "org.gnome.SessionManager", "fallback"), + g_variant_new ("(ss)", "org.gnome.SessionManager", "session-name"), (GVariantType*)"(v)", 0, -1, @@ -397,9 +397,9 @@ get_current_is_fallback (CcInfoPanel *self) return FALSE; } - g_variant_get (reply, "(v)", &reply_bool); - is_fallback = g_variant_get_boolean (reply_bool); - g_variant_unref (reply_bool); + g_variant_get (reply, "(v)", &reply_str); + is_fallback = g_strcmp0 ("gnome-fallback", g_variant_get_string (reply_str, NULL)) == 0; + g_variant_unref (reply_str); g_variant_unref (reply); return is_fallback;