aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-15 21:51:14 -0500
committerTed Gould <ted@gould.cx>2010-03-15 21:51:14 -0500
commitae2c94b40826bfa0274a3eae8ae515d99b07adb5 (patch)
treefab144877d9adc07edaab187fc69104c034bed11 /src
parent868fd5ed54d3d3e5ce8c054c9381602a2671e34d (diff)
downloadayatana-indicator-session-ae2c94b40826bfa0274a3eae8ae515d99b07adb5.tar.gz
ayatana-indicator-session-ae2c94b40826bfa0274a3eae8ae515d99b07adb5.tar.bz2
ayatana-indicator-session-ae2c94b40826bfa0274a3eae8ae515d99b07adb5.zip
Add in checking whether the logout button is shown, and get it changing with the others.
Diffstat (limited to 'src')
-rw-r--r--src/session-service.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/session-service.c b/src/session-service.c
index fa90da2..6f27d2c 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -554,6 +554,7 @@ rebuild_items (DbusmenuMenuitem *root,
} else {
dbusmenu_menuitem_property_set(logout_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Log Out..."));
}
+ dbusmenu_menuitem_property_set_bool(logout_mi, DBUSMENU_MENUITEM_PROP_VISIBLE, show_logout());
dbusmenu_menuitem_child_append(root, logout_mi);
g_signal_connect(G_OBJECT(logout_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "logout");
@@ -593,7 +594,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);
+ update_menu_entries(restart_shutdown_logout_mi, 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));