[rygel] tracker: Keep "All" container as the first one in the list



commit c43e2aeaa20689f33ef8ac485d4ba7070f9c7efb
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Feb 17 12:38:59 2010 +0200

    tracker: Keep "All" container as the first one in the list
    
    This is to improve the performance of searches. If the items being
    searched are all in the same category (e.g give me all songs from
    Michael Jackson & Madona), they will all be present in "All" search
    container and we can fetch them all using only one D-Bus method.

 src/plugins/tracker/rygel-tracker-music.vala    |    9 +++++----
 src/plugins/tracker/rygel-tracker-pictures.vala |    4 ++--
 src/plugins/tracker/rygel-tracker-videos.vala   |    4 ++--
 3 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-music.vala b/src/plugins/tracker/rygel-tracker-music.vala
index a922ac9..f935d29 100644
--- a/src/plugins/tracker/rygel-tracker-music.vala
+++ b/src/plugins/tracker/rygel-tracker-music.vala
@@ -32,6 +32,11 @@ 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 };
@@ -48,10 +53,6 @@ public class Rygel.TrackerMusic : Rygel.TrackerCategoryContainer {
                                                    this.item_factory,
                                                    key_chain));
         this.add_child (new TrackerTags ("21", this, item_factory));
-        this.add_child (new TrackerSearchContainer ("26",
-                                                    this,
-                                                    "All",
-                                                    this.item_factory));
     }
 }
 
diff --git a/src/plugins/tracker/rygel-tracker-pictures.vala b/src/plugins/tracker/rygel-tracker-pictures.vala
index 387126f..c575c97 100644
--- a/src/plugins/tracker/rygel-tracker-pictures.vala
+++ b/src/plugins/tracker/rygel-tracker-pictures.vala
@@ -34,12 +34,12 @@ 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 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 1660a90..9721cac 100644
--- a/src/plugins/tracker/rygel-tracker-videos.vala
+++ b/src/plugins/tracker/rygel-tracker-videos.vala
@@ -32,12 +32,12 @@ 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 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]