aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/org.ayatana.indicator.session.gschema.xml.in5
-rw-r--r--src/backend-dbus/actions.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/data/org.ayatana.indicator.session.gschema.xml.in b/data/org.ayatana.indicator.session.gschema.xml.in
index 9e099fb..c46a738 100644
--- a/data/org.ayatana.indicator.session.gschema.xml.in
+++ b/data/org.ayatana.indicator.session.gschema.xml.in
@@ -20,6 +20,11 @@
<_summary>Remove the shutdown item from the session menu.</_summary>
<_description>Makes it so that the shutdown button doesn’t show in the session menu.</_description>
</key>
+ <key name="force-restart-menuitem" type="b">
+ <default>false</default>
+ <_summary>Force the visibility of Restart item in the session menu</_summary>
+ <_description>Makes it so that the restart shows in the session menu even in the environments where it should not show.</_description>
+ </key>
<key type="b" name="show-real-name-on-panel">
<default>false</default>
<summary>Determine the visibility of the User's real name on the panel</summary>
diff --git a/src/backend-dbus/actions.c b/src/backend-dbus/actions.c
index 88caf80..c83d352 100644
--- a/src/backend-dbus/actions.c
+++ b/src/backend-dbus/actions.c
@@ -414,6 +414,9 @@ my_can_reboot (IndicatorSessionActions * actions)
if (g_settings_get_boolean (p->indicator_settings, "suppress-restart-menuitem"))
return FALSE;
+ if (g_settings_get_boolean (p->indicator_settings, "force-restart-menuitem"))
+ return TRUE;
+
/* Shutdown and Restart are the same dialog prompt in Unity,
so disable the redundant 'Restart' menuitem in that mode */
if (!g_settings_get_boolean (p->indicator_settings, "suppress-shutdown-menuitem"))
@@ -1184,6 +1187,8 @@ indicator_session_actions_dbus_init (IndicatorSessionActionsDbus * self)
G_CALLBACK(indicator_session_actions_notify_can_reboot), self);
g_signal_connect_swapped (s, "changed::suppress-shutdown-menuitem",
G_CALLBACK(indicator_session_actions_notify_can_reboot), self);
+ g_signal_connect_swapped (s, "changed::force-restart-menuitem",
+ G_CALLBACK(indicator_session_actions_notify_can_reboot), self);
p->indicator_settings = s;
gnome_screen_saver_proxy_new_for_bus (G_BUS_TYPE_SESSION,