~indicator-applet-developers/indicator-session/trunk.15.10

« back to all changes in this revision

Viewing changes to src/backend-dbus/actions.c

  • Committer: Marco Trevisan (Treviño)
  • Date: 2016-04-08 20:49:07 UTC
  • mto: This revision was merged to the branch mainline in revision 470.
  • Revision ID: mail@3v1n0.net-20160408204907-wa6z114036zbogs4
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

Show diffs side-by-side

added added

removed removed

Lines of Context:
395
395
  if (g_settings_get_boolean (p->indicator_settings, "suppress-restart-menuitem"))
396
396
    return FALSE;
397
397
 
 
398
  if (g_settings_get_boolean (p->indicator_settings, "force-restart-menuitem"))
 
399
    return TRUE;
 
400
 
398
401
  /* Shutdown and Restart are the same dialog prompt in Unity,
399
402
     so disable the redundant 'Restart' menuitem in that mode */
400
403
  if (!g_settings_get_boolean (p->indicator_settings, "suppress-shutdown-menuitem"))
1106
1109
                            G_CALLBACK(indicator_session_actions_notify_can_reboot), self);
1107
1110
  g_signal_connect_swapped (s, "changed::suppress-shutdown-menuitem",
1108
1111
                            G_CALLBACK(indicator_session_actions_notify_can_reboot), self);
 
1112
  g_signal_connect_swapped (s, "changed::force-restart-menuitem",
 
1113
                            G_CALLBACK(indicator_session_actions_notify_can_reboot), self);
1109
1114
  p->indicator_settings = s;
1110
1115
 
1111
1116
  gnome_screen_saver_proxy_new_for_bus (G_BUS_TYPE_SESSION,