tracker: Make use of default value magic in Vala
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sun, 20 Sep 2009 22:49:48 +0000 (01:49 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sun, 20 Sep 2009 22:49:48 +0000 (01:49 +0300)
Use default value for query_condition param of SearchContainer
construction method.

src/plugins/tracker/rygel-tracker-root-container.vala
src/plugins/tracker/rygel-tracker-search-container.vala

index 612364b..c520118 100644 (file)
@@ -37,20 +37,17 @@ public class Rygel.TrackerRootContainer : Rygel.SimpleContainer {
                                         "16",
                                         this,
                                         "Pictures",
-                                        TrackerImageItem.SERVICE,
-                                        null));
+                                        TrackerImageItem.SERVICE));
         this.children.add (new TrackerSearchContainer (
                                         "14",
                                         this,
                                         "Music",
-                                        TrackerMusicItem.SERVICE,
-                                        null));
+                                        TrackerMusicItem.SERVICE));
         this.children.add (new TrackerSearchContainer (
                                         "15",
                                         this,
                                         "Videos",
-                                        TrackerVideoItem.SERVICE,
-                                        null));
+                                        TrackerVideoItem.SERVICE));
         this.children.add (new TrackerMetadataValues ("Audio:Artist",
                                                       "17",
                                                       this,
index d0cf1fd..f56bb50 100644 (file)
@@ -54,18 +54,13 @@ public class Rygel.TrackerSearchContainer : Rygel.MediaContainer {
                                    MediaContainer parent,
                                    string         title,
                                    string         service,
-                                   string?        query_condition,
+                                   string         query_condition = "",
                                    string[]       keywords = new string[0]) {
         base (id, parent, title, 0);
 
         this.service = service;
         this.keywords = keywords;
-
-        if (query_condition != null) {
-            this.query_condition = query_condition;
-        } else {
-            this.query_condition = "";
-        }
+        this.query_condition = query_condition;
 
         try {
             this.create_proxies ();