aboutsummaryrefslogtreecommitdiff
path: root/src/session-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-16 16:02:04 -0500
committerTed Gould <ted@gould.cx>2010-03-16 16:02:04 -0500
commit9bf67d563e8b819364327c1635095ea885faf543 (patch)
treebae8270d7abd97f37dea2bacd5c52e72d75069d9 /src/session-service.c
parent1e43b72a71addb0dd45b0e7ea5dc195b0b250196 (diff)
downloadayatana-indicator-session-9bf67d563e8b819364327c1635095ea885faf543.tar.gz
ayatana-indicator-session-9bf67d563e8b819364327c1635095ea885faf543.tar.bz2
ayatana-indicator-session-9bf67d563e8b819364327c1635095ea885faf543.zip
Instead of making the item disabled, change the text when we won't lock the screen.
Diffstat (limited to 'src/session-service.c')
-rw-r--r--src/session-service.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/session-service.c b/src/session-service.c
index fb20f3b..5614ab4 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -509,14 +509,13 @@ 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);
}
/* Build all of the user switching items */