aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/session-service.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/session-service.c b/src/session-service.c
index 24623aa..b976236 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -73,6 +73,7 @@ static UsersServiceDbus *dbus_interface = NULL;
static SessionDbus *session_dbus = NULL;
static DbusmenuMenuitem *lock_menuitem = NULL;
+static DbusmenuMenuitem *lock_separator = NULL;
static DbusmenuMenuitem *switch_menuitem = NULL;
static DbusmenuMenuitem * root_menuitem = NULL;
@@ -116,9 +117,11 @@ lockdown_changed (GConfClient *client,
} else if (g_strcmp0 (key, LOCKDOWN_KEY_SCREENSAVER) == 0) {
if (lock_menuitem != NULL) {
if (gconf_value_get_bool (value)) {
- dbusmenu_menuitem_property_set_bool (lock_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
+ dbusmenu_menuitem_property_set_bool (lock_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
+ dbusmenu_menuitem_property_set_bool (lock_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
} else {
- dbusmenu_menuitem_property_set_bool (lock_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
+ dbusmenu_menuitem_property_set_bool (lock_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
+ dbusmenu_menuitem_property_set_bool (lock_separator, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
}
}
}
@@ -464,12 +467,14 @@ rebuild_items (DbusmenuMenuitem *root,
} else {
dbusmenu_menuitem_property_set_bool(lock_menuitem, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
}
+ lock_separator = NULL;
if (can_activate == TRUE)
{
DbusmenuMenuitem * separator1 = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set(separator1, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
dbusmenu_menuitem_child_append(root, separator1);
+ lock_separator = separator1;
if (check_guest_session ())
{
@@ -554,6 +559,9 @@ rebuild_items (DbusmenuMenuitem *root,
DbusmenuMenuitem * separator = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set(separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
dbusmenu_menuitem_child_append(root, separator);
+ if (lock_separator == NULL) {
+ lock_separator = separator;
+ }
logout_mi = dbusmenu_menuitem_new();
if (supress_confirmations()) {