Merge lp:~3v1n0/indicator-session/unity-reboot-visibility-fixes into lp:indicator-session/15.10

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Andrea Azzarone
Approved revision: 471
Merged at revision: 470
Proposed branch: lp:~3v1n0/indicator-session/unity-reboot-visibility-fixes
Merge into: lp:indicator-session/15.10
Diff against target: 53 lines (+14/-1)
2 files modified
data/com.canonical.indicator.session.gschema.xml.in (+5/-0)
src/backend-dbus/actions.c (+9/-1)
To merge this branch: bzr merge lp:~3v1n0/indicator-session/unity-reboot-visibility-fixes
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+291418@code.launchpad.net

Commit message

Ensure we request the UI to verify restart availability on unity state changes

add force-restart-menuitem option to make it visible in any environments

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Azzarone (azzar1) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/com.canonical.indicator.session.gschema.xml.in'
2--- data/com.canonical.indicator.session.gschema.xml.in 2014-03-19 17:40:24 +0000
3+++ data/com.canonical.indicator.session.gschema.xml.in 2016-04-08 20:51:21 +0000
4@@ -20,6 +20,11 @@
5 <_summary>Remove the shutdown item from the session menu</_summary>
6 <_description>Makes it so that the shutdown button doesn’t show in the session menu.</_description>
7 </key>
8+ <key name="force-restart-menuitem" type="b">
9+ <default>false</default>
10+ <_summary>Force the visibility of Restart item in the session menu</_summary>
11+ <_description>Makes it so that the restart shows in the session menu even in the environments where it should not show.</_description>
12+ </key>
13 <key type="b" name="show-real-name-on-panel">
14 <default>false</default>
15 <summary>Determine the visibility of the User's real name on the panel</summary>
16
17=== modified file 'src/backend-dbus/actions.c'
18--- src/backend-dbus/actions.c 2016-03-09 14:47:25 +0000
19+++ src/backend-dbus/actions.c 2016-04-08 20:51:21 +0000
20@@ -350,6 +350,9 @@
21 {
22 INDICATOR_SESSION_ACTIONS_DBUS(gself)->priv->end_session_dialog = end_session_dialog;
23
24+ g_signal_connect_swapped (end_session_dialog, "notify::g-name-owner",
25+ G_CALLBACK(indicator_session_actions_notify_can_switch), gself);
26+
27 indicator_session_actions_notify_can_prompt (INDICATOR_SESSION_ACTIONS(gself));
28 indicator_session_actions_notify_can_reboot (INDICATOR_SESSION_ACTIONS(gself));
29 }
30@@ -388,10 +391,13 @@
31 {
32 IndicatorSessionActionsDbus * self = INDICATOR_SESSION_ACTIONS_DBUS(actions);
33 priv_t * p = self->priv;
34-
35+
36 if (g_settings_get_boolean (p->indicator_settings, "suppress-restart-menuitem"))
37 return FALSE;
38
39+ if (g_settings_get_boolean (p->indicator_settings, "force-restart-menuitem"))
40+ return TRUE;
41+
42 /* Shutdown and Restart are the same dialog prompt in Unity,
43 so disable the redundant 'Restart' menuitem in that mode */
44 if (!g_settings_get_boolean (p->indicator_settings, "suppress-shutdown-menuitem"))
45@@ -1103,6 +1109,8 @@
46 G_CALLBACK(indicator_session_actions_notify_can_reboot), self);
47 g_signal_connect_swapped (s, "changed::suppress-shutdown-menuitem",
48 G_CALLBACK(indicator_session_actions_notify_can_reboot), self);
49+ g_signal_connect_swapped (s, "changed::force-restart-menuitem",
50+ G_CALLBACK(indicator_session_actions_notify_can_reboot), self);
51 p->indicator_settings = s;
52
53 gnome_screen_saver_proxy_new_for_bus (G_BUS_TYPE_SESSION,

Subscribers

People subscribed via source and target branches