Merge lp:~kamstrup/unity-lens-music/gi-friendly-api-tweaks into lp:unity-lens-music

Proposed by Mikkel Kamstrup Erlandsen
Status: Merged
Approved by: Neil J. Patel
Approved revision: 34
Merged at revision: 34
Proposed branch: lp:~kamstrup/unity-lens-music/gi-friendly-api-tweaks
Merge into: lp:unity-lens-music
Diff against target: 61 lines (+17/-13)
1 file modified
src/daemon.vala (+17/-13)
To merge this branch: bzr merge lp:~kamstrup/unity-lens-music/gi-friendly-api-tweaks
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Review via email: mp+74599@code.launchpad.net

Description of the change

See attached bug. Reflect latest API breaks in libunity

To post a comment you must log in.
Revision history for this message
Neil J. Patel (njpatel) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/daemon.vala'
2--- src/daemon.vala 2011-09-02 16:20:13 +0000
3+++ src/daemon.vala 2011-09-08 13:18:43 +0000
4@@ -52,7 +52,7 @@
5
6 private void populate_filters ()
7 {
8- Unity.Filter[] filters = {};
9+ var filters = new GLib.List<Unity.Filter> ();
10
11 /* Decade filter */
12 {
13@@ -66,7 +66,7 @@
14 filter.add_option ("2000", _("00s"));
15 filter.add_option ("2010", _("10s"));
16
17- filters += filter;
18+ filters.append (filter);
19 }
20
21 /* Genre filter */
22@@ -92,7 +92,7 @@
23 filter.add_option (Genre.TECHNO_ID, _("Techno"));
24 filter.add_option (Genre.OTHER_ID, _("Other"));
25
26- filters += filter;
27+ filters.append (filter);
28 }
29
30 lens.filters = filters;
31@@ -101,16 +101,20 @@
32 // FIXME icons
33 private void populate_categories ()
34 {
35- Unity.Category[] categories = {};
36-
37- var cat = new Unity.Category (_("Songs"), ICON_PATH + "group-songs.svg");
38- categories += cat;
39-
40- cat = new Unity.Category (_("Albums"), ICON_PATH + "group-albums.svg");
41- categories += cat;
42-
43- cat = new Unity.Category (_("Available for Purchase"), ICON_PATH + "group-available.svg");
44- categories += cat;
45+ var categories = new GLib.List<Unity.Category> ();
46+ var icon_dir = File.new_for_path (ICON_PATH);
47+
48+ var cat = new Unity.Category (_("Songs"),
49+ new FileIcon (icon_dir.get_child ("group-songs.svg")));
50+ categories.append (cat);
51+
52+ cat = new Unity.Category (_("Albums"),
53+ new FileIcon (icon_dir.get_child ("group-albums.svg")));
54+ categories.append (cat);
55+
56+ cat = new Unity.Category (_("Available for Purchase"),
57+ new FileIcon (icon_dir.get_child ("group-available.svg")));
58+ categories.append (cat);
59
60 lens.categories = categories;
61 }

Subscribers

People subscribed via source and target branches