diff options
author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2016-04-08 22:49:07 +0200 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-06-22 23:20:07 +0200 |
commit | 44fb1ec00d9c1ed129574fa3efd631a663b096a0 (patch) | |
tree | 245b785921a8ce28c478d4e8c24288a5e619bf29 /src/backend-dbus/actions.c | |
parent | dd4e19f35bfe81395d20f3a8f52805ab138a5c1e (diff) | |
download | ayatana-indicator-session-44fb1ec00d9c1ed129574fa3efd631a663b096a0.tar.gz ayatana-indicator-session-44fb1ec00d9c1ed129574fa3efd631a663b096a0.tar.bz2 ayatana-indicator-session-44fb1ec00d9c1ed129574fa3efd631a663b096a0.zip |
Actions: add force-restart-menuitem option to make it visible in any environments
Basically it allows to see the "Reboot..." option when indicator-session is in unity
Diffstat (limited to 'src/backend-dbus/actions.c')
-rw-r--r-- | src/backend-dbus/actions.c | 5 |
1 files changed, 5 insertions, 0 deletions
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, |