[rygel] tracker: CategoryContainer creates "All" container



commit aeda2ffb2b5ae924e7b14c226d8493ed6fe4b52c
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Feb 19 15:34:03 2010 +0200

    tracker: CategoryContainer creates "All" container
    
    Since "All" child is created/added by all category containers, why not
    create/add it in the base CategoryContainer class?

 .../tracker/rygel-tracker-category-container.vala  |    5 +++++
 src/plugins/tracker/rygel-tracker-music.vala       |    5 -----
 src/plugins/tracker/rygel-tracker-pictures.vala    |    4 ----
 src/plugins/tracker/rygel-tracker-videos.vala      |    4 ----
 4 files changed, 5 insertions(+), 13 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-category-container.vala b/src/plugins/tracker/rygel-tracker-category-container.vala
index d68e0f4..3f89ad8 100644
--- a/src/plugins/tracker/rygel-tracker-category-container.vala
+++ b/src/plugins/tracker/rygel-tracker-category-container.vala
@@ -37,6 +37,11 @@ public class Rygel.TrackerCategoryContainer : Rygel.SimpleContainer {
 
         this.item_factory = item_factory;
 
+        this.add_child (new TrackerSearchContainer (this.id + "All",
+                                                    this,
+                                                    "All",
+                                                    this.item_factory));
+
         try {
             var uri = Filename.to_uri (item_factory.upload_dir, null);
             this.uris.add (uri);
diff --git a/src/plugins/tracker/rygel-tracker-music.vala b/src/plugins/tracker/rygel-tracker-music.vala
index f935d29..373234d 100644
--- a/src/plugins/tracker/rygel-tracker-music.vala
+++ b/src/plugins/tracker/rygel-tracker-music.vala
@@ -32,11 +32,6 @@ public class Rygel.TrackerMusic : Rygel.TrackerCategoryContainer {
                          string         title) {
         base (id, parent, title, new TrackerMusicItemFactory ());
 
-        this.add_child (new TrackerSearchContainer ("26",
-                                                    this,
-                                                    "All",
-                                                    this.item_factory));
-
         var key_chain = new string[] { "nmm:performer",
                                        "nmm:artistName",
                                        null };
diff --git a/src/plugins/tracker/rygel-tracker-pictures.vala b/src/plugins/tracker/rygel-tracker-pictures.vala
index c575c97..fa48122 100644
--- a/src/plugins/tracker/rygel-tracker-pictures.vala
+++ b/src/plugins/tracker/rygel-tracker-pictures.vala
@@ -34,10 +34,6 @@ public class Rygel.TrackerPictures : Rygel.TrackerCategoryContainer {
                             string         title) {
         base (id, parent, title, new TrackerPictureItemFactory ());
 
-        this.add_child (new TrackerSearchContainer ("25",
-                                                    this,
-                                                    "All",
-                                                    this.item_factory));
         this.add_child (new TrackerTags ("19", this, this.item_factory));
         this.add_child (new TrackerYears ("22", this, this.item_factory));
     }
diff --git a/src/plugins/tracker/rygel-tracker-videos.vala b/src/plugins/tracker/rygel-tracker-videos.vala
index 9721cac..01507b2 100644
--- a/src/plugins/tracker/rygel-tracker-videos.vala
+++ b/src/plugins/tracker/rygel-tracker-videos.vala
@@ -32,10 +32,6 @@ public class Rygel.TrackerVideos : Rygel.TrackerCategoryContainer {
                           string         title) {
         base (id, parent, title, new TrackerVideoItemFactory ());
 
-        this.add_child (new TrackerSearchContainer ("24",
-                                                    this,
-                                                    "All",
-                                                    this.item_factory));
         this.add_child (new TrackerTags ("20", this, this.item_factory));
         this.add_child (new TrackerYears ("23", this, this.item_factory));
     }



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