~ubuntu-branches/ubuntu/oneiric/unity-lens-music/oneiric

« back to all changes in this revision

Viewing changes to src/daemon.vala

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2011-09-08 20:12:26 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: package-import@ubuntu.com-20110908201226-f7osm37t76m8quc4
Tags: upstream-0.1.4
ImportĀ upstreamĀ versionĀ 0.1.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
    private void populate_filters ()
54
54
    {
55
 
      Unity.Filter[] filters = {};
 
55
      var filters = new GLib.List<Unity.Filter> ();
56
56
 
57
57
      /* Decade filter */
58
58
      {
61
61
        filter.add_option ("0", _("Old"));
62
62
        filter.add_option ("1960", _("60s"));
63
63
        filter.add_option ("1970", _("70s"));
64
 
        filter.add_option ("1990", _("80s"));
 
64
        filter.add_option ("1980", _("80s"));
 
65
        filter.add_option ("1990", _("90s"));
65
66
        filter.add_option ("2000", _("00s"));
66
67
        filter.add_option ("2010", _("10s"));
67
68
 
68
 
        filters += filter;
 
69
        filters.append (filter);
69
70
      }
70
71
 
71
72
      /* Genre filter */
91
92
        filter.add_option (Genre.TECHNO_ID, _("Techno"));
92
93
        filter.add_option (Genre.OTHER_ID, _("Other"));
93
94
 
94
 
        filters += filter;
 
95
        filters.append (filter);
95
96
      }
96
97
 
97
98
      lens.filters = filters;
100
101
    // FIXME icons
101
102
    private void populate_categories ()
102
103
    {
103
 
      Unity.Category[] categories = {};
104
 
 
105
 
      var cat = new Unity.Category (_("Songs"), ICON_PATH + "group-mostused.svg");
106
 
      categories += cat;
107
 
 
108
 
      cat =  new Unity.Category (_("Albums"), ICON_PATH + "group-favoritefolders.svg");
109
 
      categories += cat;
110
 
 
111
 
      cat = new Unity.Category (_("Available for Purchase"), ICON_PATH + "group-available.svg");
112
 
      categories += cat;
 
104
      var categories = new GLib.List<Unity.Category> ();
 
105
      var icon_dir = File.new_for_path (ICON_PATH);
 
106
 
 
107
      var cat = new Unity.Category (_("Songs"),
 
108
                                    new FileIcon (icon_dir.get_child ("group-songs.svg")));
 
109
      categories.append (cat);
 
110
 
 
111
      cat =  new Unity.Category (_("Albums"),
 
112
                                 new FileIcon (icon_dir.get_child ("group-albums.svg")));
 
113
      categories.append (cat);
 
114
 
 
115
      cat = new Unity.Category (_("Available for Purchase"),
 
116
                                new FileIcon (icon_dir.get_child ("group-available.svg")));
 
117
      categories.append (cat);
113
118
 
114
119
      lens.categories = categories;
115
120
    }