aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-06-26 11:40:14 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-06-26 11:40:14 -0500
commit951592e1349e863b721ca32273577e6f1b517d13 (patch)
treec3ac7cbc26babf9ee47ab309f9c7f7f6e3f92715
parent2d089b9e30b1d292ed8d1a7e84d0a0019aa10784 (diff)
downloadayatana-indicator-session-951592e1349e863b721ca32273577e6f1b517d13.tar.gz
ayatana-indicator-session-951592e1349e863b721ca32273577e6f1b517d13.tar.bz2
ayatana-indicator-session-951592e1349e863b721ca32273577e6f1b517d13.zip
fix regression that displayed the 'restart' button even when prompting was enabled and the user was running Unity
-rw-r--r--TODO2
-rw-r--r--src/service.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/TODO b/TODO
index 93ca1a0..eab0f56 100644
--- a/TODO
+++ b/TODO
@@ -12,5 +12,5 @@ cmake
x test schema installation
bugs
- - Suspend button should be hidden when shell is available
+ x Suspend button should be hidden when shell is available
- J Random User is showing up when we switch sessions
diff --git a/src/service.c b/src/service.c
index 7f90c9c..d8fc961 100644
--- a/src/service.c
+++ b/src/service.c
@@ -539,7 +539,9 @@ create_session_section (IndicatorSessionService * self)
if (indicator_session_actions_can_hibernate (p->backend_actions))
g_menu_append (menu, _("Hibernate"), "indicator.hibernate");
- if (!g_settings_get_boolean (s, "suppress-restart-menuitem"))
+ /* NB: check 'ellipsis' here to skip this item if prompting is enabled
+ because this shows the same prompt as 'Shut Down' in Unity */
+ if (!ellipsis && !g_settings_get_boolean (s, "suppress-restart-menuitem"))
{
const char * label = ellipsis ? _("Restart\342\200\246") : _("Restart");
g_menu_append (menu, label, "indicator.reboot");