Merge lp:~verterok/unity-scope-home/handle-missing_info_hint_icon into lp:unity-scope-home

Proposed by Guillermo Gonzalez
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 160
Merged at revision: 160
Proposed branch: lp:~verterok/unity-scope-home/handle-missing_info_hint_icon
Merge into: lp:unity-scope-home
Diff against target: 19 lines (+7/-3)
1 file modified
src/smart-scopes-preview-parser.vala (+7/-3)
To merge this branch: bzr merge lp:~verterok/unity-scope-home/handle-missing_info_hint_icon
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+184166@code.launchpad.net

Commit message

Fix smart-scopes preview parser to display info hints if icon_hint is not provided or it's empty.

Description of the change

Fix smart-scopes preview parser to display info hints if icon_hint is not provided or it's empty.

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
Paweł Stołowski (stolowski) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/smart-scopes-preview-parser.vala'
2--- src/smart-scopes-preview-parser.vala 2013-09-03 10:08:46 +0000
3+++ src/smart-scopes-preview-parser.vala 2013-09-05 18:38:24 +0000
4@@ -89,9 +89,13 @@
5 var info_icon_hint = info_obj.get_string_member ("icon_hint");
6 var info_name = info_obj.get_string_member ("display_name");
7 var info_value = info_obj.get_string_member ("value");
8-
9- var icon_file = GLib.File.new_for_uri (info_icon_hint);
10- var info_icon = new GLib.FileIcon (icon_file);
11+
12+ GLib.Icon info_icon = null;
13+ if (info_icon_hint != null && info_icon_hint != "")
14+ {
15+ var icon_file = GLib.File.new_for_uri (info_icon_hint);
16+ info_icon = new GLib.FileIcon (icon_file);
17+ }
18
19 var info = new Unity.InfoHint (info_hint_id, info_name, info_icon, info_value);
20

Subscribers

People subscribed via source and target branches

to all changes: