diff options
author | Cody Russell <crussell@canonical.com> | 2010-02-08 11:08:09 -0600 |
---|---|---|
committer | Cody Russell <crussell@canonical.com> | 2010-02-08 11:08:09 -0600 |
commit | 6335f484c1ebe1ee6f0c940614bf4dbdfaeb2e8d (patch) | |
tree | 1cce72a50eebb10d7a8f614ff532816d4125e3c2 /src | |
parent | eedadcc3cf3a3f76fbe7b308a9ae7f0fa1f888d7 (diff) | |
download | ayatana-indicator-session-6335f484c1ebe1ee6f0c940614bf4dbdfaeb2e8d.tar.gz ayatana-indicator-session-6335f484c1ebe1ee6f0c940614bf4dbdfaeb2e8d.tar.bz2 ayatana-indicator-session-6335f484c1ebe1ee6f0c940614bf4dbdfaeb2e8d.zip |
Fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/session-service.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/session-service.c b/src/session-service.c index 62987f2..621ab72 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -109,7 +109,7 @@ lockdown_changed (GConfClient *client, } else { - dbusmenu_menuitem_property_set_bool (switch_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE); + dbusmenu_menuitem_property_set_bool (switch_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); } } } @@ -494,12 +494,18 @@ rebuild_items (DbusmenuMenuitem *root, { ensure_gconf_client (); + switch_menuitem = dbusmenu_menuitem_new (); + dbusmenu_menuitem_property_set (switch_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Switch User...")); + dbusmenu_menuitem_child_append (root, switch_menuitem); + g_signal_connect (G_OBJECT (switch_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_new_session), NULL); + if (gconf_client_get_bool (gconf_client, LOCKDOWN_KEY, NULL)) { - switch_menuitem = dbusmenu_menuitem_new (); - dbusmenu_menuitem_property_set (switch_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Switch User...")); - dbusmenu_menuitem_child_append (root, switch_menuitem); - g_signal_connect (G_OBJECT (switch_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_new_session), NULL); + dbusmenu_menuitem_property_set_bool (switch_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE); + } + else + { + dbusmenu_menuitem_property_set_bool (switch_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE); } } } |