Merge lp:~jconti/unity-greeter/check_null_indicator into lp:unity-greeter

Proposed by Jason Conti
Status: Merged
Merged at revision: 261
Proposed branch: lp:~jconti/unity-greeter/check_null_indicator
Merge into: lp:unity-greeter
Diff against target: 23 lines (+2/-0)
2 files modified
NEWS (+1/-0)
src/menubar.vala (+1/-0)
To merge this branch: bzr merge lp:~jconti/unity-greeter/check_null_indicator
Reviewer Review Type Date Requested Status
Robert Ancell Approve
Review via email: mp+90729@code.launchpad.net

Description of the change

indicator_object_new_from_file can fail to load an indicator and return null for a variety of reasons (missing file, version mismatch, ...). This branch checks for null and continues loading the remaining indicators.

I thought about adding an additional warning but indicator_object_new_from_file already emits a detailed warning based on the reason it failed and I am not sure there is more information we could add.

To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Looks good, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2012-01-24 16:06:51 +0000
3+++ NEWS 2012-01-30 16:46:27 +0000
4@@ -1,6 +1,7 @@
5 Overview of changes in unity-greeter 0.2.1
6
7 * Fix session menu button not showing for first user
8+ * Skip indicators that fail to load
9
10 Overview of changes in unity-greeter 0.2.0
11
12
13=== modified file 'src/menubar.vala'
14--- src/menubar.vala 2012-01-14 16:24:09 +0000
15+++ src/menubar.vala 2012-01-30 16:46:27 +0000
16@@ -296,6 +296,7 @@
17 foreach (var filename in filenames)
18 {
19 var io = new Indicator.Object.from_file (filename);
20+ if (io == null) continue;
21 indicator_objects.append (io);
22 io.entry_added.connect (indicator_added_cb);
23 io.entry_removed.connect (indicator_removed_cb);

Subscribers

People subscribed via source and target branches