[rygel] tracker: SearchContainer() takes query as argument



commit c59fae2bdd753527b857ba34c2c13bca8e24ee9b
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Sat Sep 19 04:17:50 2009 +0300

    tracker: SearchContainer() takes query as argument
    
    SearchContainer construction method now takes RDF query as argument.

 .../tracker/rygel-tracker-root-container.vala      |    9 ++++++---
 .../tracker/rygel-tracker-search-container.vala    |   10 ++++++++--
 2 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-root-container.vala b/src/plugins/tracker/rygel-tracker-root-container.vala
index 48edc97..cc308c0 100644
--- a/src/plugins/tracker/rygel-tracker-root-container.vala
+++ b/src/plugins/tracker/rygel-tracker-root-container.vala
@@ -37,17 +37,20 @@ public class Rygel.TrackerRootContainer : Rygel.SimpleContainer {
                                         "16",
                                         this,
                                         "Pictures",
-                                        TrackerImageItem.SERVICE));
+                                        TrackerImageItem.SERVICE,
+                                        null));
         this.children.add (new TrackerSearchContainer (
                                         "14",
                                         this,
                                         "Music",
-                                        TrackerMusicItem.SERVICE));
+                                        TrackerMusicItem.SERVICE,
+                                        null));
         this.children.add (new TrackerSearchContainer (
                                         "15",
                                         this,
                                         "Videos",
-                                        TrackerVideoItem.SERVICE));
+                                        TrackerVideoItem.SERVICE,
+                                        null));
         this.children.add (new TrackerMetadataValues ("Audio:Artist",
                                                       "17",
                                                       this,
diff --git a/src/plugins/tracker/rygel-tracker-search-container.vala b/src/plugins/tracker/rygel-tracker-search-container.vala
index 068b2c1..10e0438 100644
--- a/src/plugins/tracker/rygel-tracker-search-container.vala
+++ b/src/plugins/tracker/rygel-tracker-search-container.vala
@@ -51,11 +51,17 @@ public class Rygel.TrackerSearchContainer : Rygel.MediaContainer {
     public TrackerSearchContainer (string         id,
                                    MediaContainer parent,
                                    string         title,
-                                   string         service) {
+                                   string         service,
+                                   string?        query_condition) {
         base (id, parent, title, 0);
 
         this.service = service;
-        this.query_condition = "";
+
+        if (query_condition != null) {
+            this.query_condition = query_condition;
+        } else {
+            this.query_condition = "";
+        }
 
         try {
             this.create_proxies ();



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