From: Zeeshan Ali (Khattak) Date: Fri, 19 Feb 2010 13:34:03 +0000 (+0200) Subject: tracker: CategoryContainer creates "All" container X-Git-Tag: RYGEL_0_5_0~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aeda2ffb2b5ae924e7b14c226d8493ed6fe4b52c;p=profile%2Fivi%2Frygel.git 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? --- 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)); }