Merge lp:~ted/indicator-session/upower-init-criticals into lp:indicator-session/12.10

Proposed by Ted Gould on 2012-09-28
Status: Merged
Approved by: Charles Kerr on 2012-10-01
Approved revision: 362
Merged at revision: 363
Proposed branch: lp:~ted/indicator-session/upower-init-criticals
Merge into: lp:indicator-session/12.10
Diff against target: 22 lines (+5/-1)
1 file modified
src/session-menu-mgr.c (+5/-1)
To merge this branch: bzr merge lp:~ted/indicator-session/upower-init-criticals
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve on 2012-10-01
Lars Karlitski (community) 2012-09-28 Approve on 2012-10-01
jenkins (community) continuous-integration Needs Fixing on 2012-09-28
Review via email: mp+127071@code.launchpad.net

Commit message

Move UPower settings init until after the items are created

Description of the change

If you're missing hibernate (like I am) and that happens at startup then having this in the _init will mean that you get a bunch of criticals on startup because the menu items aren't actually built yet. Moving it so the visibility is still correct, but the items exist.

To post a comment you must log in.
jenkins (martin-mrazik+qa) wrote :
review: Needs Fixing (continuous-integration)
Lars Karlitski (larsu) wrote :

Makes sense, thanks.

review: Approve
Charles Kerr (charlesk) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/session-menu-mgr.c'
2--- src/session-menu-mgr.c 2012-09-18 16:09:15 +0000
3+++ src/session-menu-mgr.c 2012-09-28 21:24:21 +0000
4@@ -318,7 +318,6 @@
5 g_clear_error (&error);
6 }
7
8- on_upower_properties_changed (mgr);
9 g_signal_connect_swapped (mgr->upower_proxy, "changed",
10 G_CALLBACK(on_upower_properties_changed), mgr);
11 }
12@@ -1193,6 +1192,11 @@
13 mgr->user_menuitem_index = n;
14 update_user_menuitems (mgr);
15 build_session_menuitems (mgr);
16+
17+ /* After we have the session menu items built we can look to
18+ align them with UPower */
19+ on_upower_properties_changed (mgr);
20+
21 return mgr;
22 }
23

Subscribers

People subscribed via source and target branches