aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2013-03-06 16:29:26 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2013-03-06 16:29:26 +0100
commit88fbd6e9d3a47d4a45b5bb5987a6413008585852 (patch)
treec3a6e57bf66418c67f3231e61cae45db787a2b16 /src
parent146019d9c53b7d8cc31c67d069e7ec055f4002fa (diff)
downloadayatana-indicator-session-88fbd6e9d3a47d4a45b5bb5987a6413008585852.tar.gz
ayatana-indicator-session-88fbd6e9d3a47d4a45b5bb5987a6413008585852.tar.bz2
ayatana-indicator-session-88fbd6e9d3a47d4a45b5bb5987a6413008585852.zip
SessionMenuMgr: show the reboot menu item in shell-mode with no confirmation
Diffstat (limited to 'src')
-rw-r--r--src/session-menu-mgr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/session-menu-mgr.c b/src/session-menu-mgr.c
index 851f5b1..c7556bc 100644
--- a/src/session-menu-mgr.c
+++ b/src/session-menu-mgr.c
@@ -178,6 +178,8 @@ session_menu_mgr_init (SessionMenuMgr *mgr)
s = g_settings_new ("com.canonical.indicator.session");
g_signal_connect_swapped (s, "changed::suppress-logout-restart-shutdown",
G_CALLBACK(update_confirmation_labels), mgr);
+ g_signal_connect_swapped (s, "changed::suppress-logout-restart-shutdown",
+ G_CALLBACK(update_session_menuitems), mgr);
g_signal_connect_swapped (s, "changed::suppress-logout-menuitem",
G_CALLBACK(update_session_menuitems), mgr);
g_signal_connect_swapped (s, "changed::suppress-restart-menuitem",
@@ -511,8 +513,8 @@ update_session_menuitems (SessionMenuMgr * mgr)
&& mgr->allow_hibernate;
mi_set_visible (mgr->hibernate_mi, v);
- v = !mgr->shell_mode
- && HAVE_RESTART_CMD
+ v = (!mgr->shell_mode || g_settings_get_boolean (s, "suppress-logout-restart-shutdown"))
+ && (HAVE_RESTART_CMD || mgr->shell_mode)
&& !g_settings_get_boolean (s, "suppress-restart-menuitem");
mi_set_visible (mgr->restart_mi, v);