[rygel] tracker: Tags & Years create their own IDs



commit c4e170acd6898520385e395f6bde12e036742f0d
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Feb 19 17:53:40 2010 +0200

    tracker: Tags & Years create their own IDs

 src/plugins/tracker/rygel-tracker-music.vala    |    2 +-
 src/plugins/tracker/rygel-tracker-pictures.vala |    4 ++--
 src/plugins/tracker/rygel-tracker-tags.vala     |    5 ++---
 src/plugins/tracker/rygel-tracker-videos.vala   |    4 ++--
 src/plugins/tracker/rygel-tracker-years.vala    |    5 ++---
 5 files changed, 9 insertions(+), 11 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-music.vala b/src/plugins/tracker/rygel-tracker-music.vala
index 373234d..67797cc 100644
--- a/src/plugins/tracker/rygel-tracker-music.vala
+++ b/src/plugins/tracker/rygel-tracker-music.vala
@@ -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));
     }
 }
 
diff --git a/src/plugins/tracker/rygel-tracker-pictures.vala b/src/plugins/tracker/rygel-tracker-pictures.vala
index fa48122..9778c95 100644
--- a/src/plugins/tracker/rygel-tracker-pictures.vala
+++ b/src/plugins/tracker/rygel-tracker-pictures.vala
@@ -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));
     }
 }
 
diff --git a/src/plugins/tracker/rygel-tracker-tags.vala b/src/plugins/tracker/rygel-tracker-tags.vala
index a8902b6..96cefd3 100644
--- a/src/plugins/tracker/rygel-tracker-tags.vala
+++ b/src/plugins/tracker/rygel-tracker-tags.vala
@@ -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);
     }
 }
 
diff --git a/src/plugins/tracker/rygel-tracker-videos.vala b/src/plugins/tracker/rygel-tracker-videos.vala
index 01507b2..1395203 100644
--- a/src/plugins/tracker/rygel-tracker-videos.vala
+++ b/src/plugins/tracker/rygel-tracker-videos.vala
@@ -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));
     }
 }
 
diff --git a/src/plugins/tracker/rygel-tracker-years.vala b/src/plugins/tracker/rygel-tracker-years.vala
index 975fdd7..92aeed4 100644
--- a/src/plugins/tracker/rygel-tracker-years.vala
+++ b/src/plugins/tracker/rygel-tracker-years.vala
@@ -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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]