[rygel] media-export: Coding style fixes



commit daa70cf359d83ed1021974962f606140e4a667db
Author: Jens Georg <mail jensge org>
Date:   Sat May 15 01:16:15 2010 +0200

    media-export: Coding style fixes

 .../media-export/rygel-media-export-database.vala  |    2 +-
 .../media-export/rygel-media-export-harvester.vala |   10 +++++-----
 .../media-export/rygel-media-export-item.vala      |    4 ++--
 .../rygel-media-export-media-cache.vala            |    2 +-
 .../rygel-media-export-metadata-extractor.vala     |    2 +-
 .../rygel-media-export-null-container.vala         |    2 +-
 .../rygel-media-export-root-container.vala         |    6 +++---
 7 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-database.vala b/src/plugins/media-export/rygel-media-export-database.vala
index c447203..19015c6 100644
--- a/src/plugins/media-export/rygel-media-export-database.vala
+++ b/src/plugins/media-export/rygel-media-export-database.vala
@@ -145,7 +145,7 @@ internal class Rygel.MediaExport.Database : Object {
 
         if (values != null) {
             for (int i = 0; i < values.length; i++) {
-                if (values[i].holds(typeof (int))) {
+                if (values[i].holds (typeof (int))) {
                     rc = statement.bind_int (i + 1, values[i].get_int ());
                 } else if (values[i].holds (typeof (int64))) {
                     rc = statement.bind_int64 (i + 1, values[i].get_int64 ());
diff --git a/src/plugins/media-export/rygel-media-export-harvester.vala b/src/plugins/media-export/rygel-media-export-harvester.vala
index 0e51741..3721f20 100644
--- a/src/plugins/media-export/rygel-media-export-harvester.vala
+++ b/src/plugins/media-export/rygel-media-export-harvester.vala
@@ -90,7 +90,7 @@ public class Rygel.MediaExport.Harvester : GLib.Object {
     }
 
     private bool process_children (GLib.List<FileInfo>? list) {
-        if (list == null || this.cancellable.is_cancelled()) {
+        if (list == null || this.cancellable.is_cancelled ()) {
             return false;
         }
 
@@ -148,7 +148,7 @@ public class Rygel.MediaExport.Harvester : GLib.Object {
             warning (_("failed to enumerate folder: %s"), err.message);
         }
 
-        cleanup_database (this.containers.peek_head() as DummyContainer);
+        cleanup_database (this.containers.peek_head () as DummyContainer);
         this.do_update ();
     }
 
@@ -166,9 +166,9 @@ public class Rygel.MediaExport.Harvester : GLib.Object {
                 this.media_db.remove_by_id (child);
             }
         } catch (DatabaseError err) {
-            warning(_("Failed to get children of container %s: %s"),
-                    container.id,
-                    err.message);
+            warning (_("Failed to get children of container %s: %s"),
+                     container.id,
+                     err.message);
         }
 
     }
diff --git a/src/plugins/media-export/rygel-media-export-item.vala b/src/plugins/media-export/rygel-media-export-item.vala
index decd491..98fa7fb 100644
--- a/src/plugins/media-export/rygel-media-export-item.vala
+++ b/src/plugins/media-export/rygel-media-export-item.vala
@@ -60,7 +60,7 @@ public class Rygel.MediaExport.MediaExportItem : Rygel.MediaItem {
                             string content_type;
                             tag_list.get_string (MetadataExtractor.TAG_RYGEL_MIME,
                                                  out content_type);
-                            warning(_("File '%s' is of unknown format/type."),
+                            warning (_("File '%s' is of unknown format/type."),
                                     file.get_uri ());
                             warning (_("Trying to guess from content type %s"),
                                     content_type);
@@ -96,7 +96,7 @@ public class Rygel.MediaExport.MediaExportItem : Rygel.MediaItem {
             }
         } else {
             // throw error. Taglist can't be empty
-            warning(_("Got empty taglist for file %s"), file.get_uri ());
+            warning (_("Got empty taglist for file %s"), file.get_uri ());
 
             return null;
         }
diff --git a/src/plugins/media-export/rygel-media-export-media-cache.vala b/src/plugins/media-export/rygel-media-export-media-cache.vala
index e1062a1..5794ca5 100644
--- a/src/plugins/media-export/rygel-media-export-media-cache.vala
+++ b/src/plugins/media-export/rygel-media-export-media-cache.vala
@@ -326,7 +326,7 @@ public class Rygel.MediaExport.MediaCache : Object {
             children.add (get_object_from_statement (parent,
                                                      child_id,
                                                      statement));
-            children.last() .parent_ref = parent;
+            children.last () .parent_ref = parent;
 
             return true;
         };
diff --git a/src/plugins/media-export/rygel-media-export-metadata-extractor.vala b/src/plugins/media-export/rygel-media-export-metadata-extractor.vala
index 904490e..672d0f4 100644
--- a/src/plugins/media-export/rygel-media-export-metadata-extractor.vala
+++ b/src/plugins/media-export/rygel-media-export-metadata-extractor.vala
@@ -107,7 +107,7 @@ public class Rygel.MediaExport.MetadataExtractor: GLib.Object {
 
     private void create_playbin_factory () {
         debug ("Checking for gstreamer element 'playbin'...");
-        var factory = ElementFactory.find("playbin2");
+        var factory = ElementFactory.find ("playbin2");
         if (factory != null) {
             debug (_("Using playbin2"));
         } else {
diff --git a/src/plugins/media-export/rygel-media-export-null-container.vala b/src/plugins/media-export/rygel-media-export-null-container.vala
index b74e8c7..ac48544 100644
--- a/src/plugins/media-export/rygel-media-export-null-container.vala
+++ b/src/plugins/media-export/rygel-media-export-null-container.vala
@@ -35,6 +35,6 @@ internal class Rygel.NullContainer : MediaContainer {
                                         uint         max_count,
                                         Cancellable? cancellable)
                                         throws Error {
-        return new Gee.ArrayList<MediaObject>();
+        return new Gee.ArrayList<MediaObject> ();
     }
 }
diff --git a/src/plugins/media-export/rygel-media-export-root-container.vala b/src/plugins/media-export/rygel-media-export-root-container.vala
index d27e4e7..331f840 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -47,7 +47,7 @@ public class Rygel.MediaExport.RootContainer : Rygel.MediaExport.DBContainer {
 
         // either an error occured or the gconf key is not set
         if (uris.size == 0) {
-            debug(_("Nothing configured, using XDG special folders"));
+            debug (_("Nothing configured, using XDG special folders"));
             UserDirectory[] xdg_directories = { UserDirectory.MUSIC,
                                                 UserDirectory.PICTURES,
                                                 UserDirectory.VIDEOS };
@@ -67,12 +67,12 @@ public class Rygel.MediaExport.RootContainer : Rygel.MediaExport.DBContainer {
         return uris;
     }
 
-    public static MediaContainer get_instance() {
+    public static MediaContainer get_instance () {
         if (RootContainer.instance == null) {
             try {
                 RootContainer.instance = new RootContainer ();
             } catch (Error error) {
-                warning(_("Failed to create instance of database"));
+                warning (_("Failed to create instance of database"));
                 RootContainer.instance = new NullContainer ();
             }
         }



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