aboutsummaryrefslogtreecommitdiff
path: root/src/session-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-18 13:50:05 -0500
committerTed Gould <ted@gould.cx>2010-03-18 13:50:05 -0500
commitc4a714f3964fdea272f766f6e040eef664d6d97d (patch)
tree9bc035d45d3f8f570e05db9de411ae336b9a5d04 /src/session-service.c
parente6bf7bbff5e51b1c74a1e2f9c37c114d03b9c156 (diff)
parent6eea2650dc1b6b0ecc16b9de2b1c2471f90454e7 (diff)
downloadayatana-indicator-session-c4a714f3964fdea272f766f6e040eef664d6d97d.tar.gz
ayatana-indicator-session-c4a714f3964fdea272f766f6e040eef664d6d97d.tar.bz2
ayatana-indicator-session-c4a714f3964fdea272f766f6e040eef664d6d97d.zip
Only lock screensaver if the screensaver is set to lock.
Diffstat (limited to 'src/session-service.c')
-rw-r--r--src/session-service.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/session-service.c b/src/session-service.c
index d2c2c74..ee1a9af 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -509,14 +509,14 @@ rebuild_items (DbusmenuMenuitem *root,
/* Lock screen item */
if (can_lockscreen) {
lock_menuitem = dbusmenu_menuitem_new();
- dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Lock Screen"));
- g_signal_connect(G_OBJECT(lock_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(lock_screen), NULL);
- dbusmenu_menuitem_child_append(root, lock_menuitem);
- if (!will_lock_screen()) {
- dbusmenu_menuitem_property_set_bool(lock_menuitem, DBUSMENU_MENUITEM_PROP_ENABLED, FALSE);
+ if (will_lock_screen()) {
+ dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Lock Screen"));
} else {
- dbusmenu_menuitem_property_set_bool(lock_menuitem, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
+ dbusmenu_menuitem_property_set(lock_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, _("Start Screensaver"));
}
+ g_signal_connect(G_OBJECT(lock_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(lock_screen), NULL);
+ dbusmenu_menuitem_child_append(root, lock_menuitem);
+ lock_screen_update_item(lock_menuitem);
}
/* Build all of the user switching items */