aboutsummaryrefslogtreecommitdiff
path: root/src/session-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/session-service.c')
-rw-r--r--src/session-service.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/session-service.c b/src/session-service.c
index c1c2e57..4fc12a1 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -545,7 +545,7 @@ rebuild_items (DbusmenuMenuitem *root,
dbusmenu_menuitem_property_set (guest_mi, USER_ITEM_PROP_NAME, _("Guest Session"));
dbusmenu_menuitem_property_set_bool (guest_mi, USER_ITEM_PROP_LOGGED_IN, FALSE);
dbusmenu_menuitem_child_append (root, guest_mi);
- g_signal_connect (G_OBJECT (guest_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_guest_session), NULL);
+ g_signal_connect (G_OBJECT (guest_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_guest_session), service);
users_service_dbus_set_guest_item(service, guest_mi);
}
@@ -637,7 +637,7 @@ rebuild_items (DbusmenuMenuitem *root,
if (can_suspend && allow_suspend) {
suspend_mi = dbusmenu_menuitem_new();
- dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Sleep"));
+ dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Suspend"));
dbusmenu_menuitem_child_append(root, suspend_mi);
g_signal_connect(G_OBJECT(suspend_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(machine_sleep), "Suspend");
}
@@ -656,6 +656,7 @@ rebuild_items (DbusmenuMenuitem *root,
} else {
dbusmenu_menuitem_property_set(restart_mi, RESTART_ITEM_LABEL, _("Restart..."));
}
+ dbusmenu_menuitem_property_set_bool(restart_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, show_restart());
dbusmenu_menuitem_child_append(root, restart_mi);
g_signal_connect(G_OBJECT(restart_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "restart");
@@ -665,6 +666,7 @@ rebuild_items (DbusmenuMenuitem *root,
} else {
dbusmenu_menuitem_property_set(shutdown_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Shut Down..."));
}
+ dbusmenu_menuitem_property_set_bool(shutdown_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, show_shutdown());
dbusmenu_menuitem_child_append(root, shutdown_mi);
g_signal_connect(G_OBJECT(shutdown_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "shutdown");
@@ -673,7 +675,7 @@ rebuild_items (DbusmenuMenuitem *root,
restart_shutdown_logout_mi->restart_mi = restart_mi;
restart_shutdown_logout_mi->shutdown_mi = shutdown_mi;
- update_menu_entries(restart_shutdown_logout_mi, logout_mi);
+ update_menu_entries(restart_shutdown_logout_mi);
if (g_file_test(DESKTOP_FILE, G_FILE_TEST_EXISTS)) {
GAppInfo * appinfo = G_APP_INFO(g_desktop_app_info_new_from_filename(DESKTOP_FILE));