tracker: Tags & Years create their own IDs
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fri, 19 Feb 2010 15:53:40 +0000 (17:53 +0200)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fri, 19 Feb 2010 15:53:40 +0000 (17:53 +0200)
src/plugins/tracker/rygel-tracker-music.vala
src/plugins/tracker/rygel-tracker-pictures.vala
src/plugins/tracker/rygel-tracker-tags.vala
src/plugins/tracker/rygel-tracker-videos.vala
src/plugins/tracker/rygel-tracker-years.vala

index 373234d..67797cc 100644 (file)
@@ -47,7 +47,7 @@ public class Rygel.TrackerMusic : Rygel.TrackerCategoryContainer {
                                                    "Albums",
                                                    this.item_factory,
                                                    key_chain));
-        this.add_child (new TrackerTags ("21", this, item_factory));
+        this.add_child (new TrackerTags (this, item_factory));
     }
 }
 
index fa48122..9778c95 100644 (file)
@@ -34,8 +34,8 @@ public class Rygel.TrackerPictures : Rygel.TrackerCategoryContainer {
                             string         title) {
         base (id, parent, title, new TrackerPictureItemFactory ());
 
-        this.add_child (new TrackerTags ("19", this, this.item_factory));
-        this.add_child (new TrackerYears ("22", this, this.item_factory));
+        this.add_child (new TrackerTags (this, this.item_factory));
+        this.add_child (new TrackerYears (this, this.item_factory));
     }
 }
 
index a8902b6..96cefd3 100644 (file)
@@ -33,10 +33,9 @@ public class Rygel.TrackerTags : Rygel.TrackerMetadataValues {
     private const string TITLE = "Tags";
     private const string[] KEY_CHAIN = { "nao:hasTag", "nao:prefLabel", null };
 
-    public TrackerTags (string             id,
-                        MediaContainer     parent,
+    public TrackerTags (MediaContainer     parent,
                         TrackerItemFactory item_factory) {
-        base (id, parent, TITLE, item_factory, KEY_CHAIN);
+        base (parent.id + TITLE, parent, TITLE, item_factory, KEY_CHAIN);
     }
 }
 
index 01507b2..1395203 100644 (file)
@@ -32,8 +32,8 @@ public class Rygel.TrackerVideos : Rygel.TrackerCategoryContainer {
                           string         title) {
         base (id, parent, title, new TrackerVideoItemFactory ());
 
-        this.add_child (new TrackerTags ("20", this, this.item_factory));
-        this.add_child (new TrackerYears ("23", this, this.item_factory));
+        this.add_child (new TrackerTags (this, this.item_factory));
+        this.add_child (new TrackerYears (this, this.item_factory));
     }
 }
 
index 975fdd7..92aeed4 100644 (file)
@@ -29,10 +29,9 @@ using Gee;
 public class Rygel.TrackerYears : Rygel.TrackerMetadataValues {
     private const string[] KEY_CHAIN = { "nie:contentCreated", null };
 
-    public TrackerYears (string             id,
-                         MediaContainer     parent,
+    public TrackerYears (MediaContainer     parent,
                          TrackerItemFactory item_factory) {
-        base (id,
+        base (parent.id + "Year",
               parent,
               "Year",
               item_factory,