server: Simple container to GObject-style.
authorKrzesimir Nowak <krnowak@openismus.com>
Wed, 16 Jan 2013 13:14:54 +0000 (14:14 +0100)
committerJens Georg <jensg@openismus.com>
Tue, 22 Jan 2013 14:10:09 +0000 (15:10 +0100)
src/librygel-server/rygel-simple-container.vala

index ee5ced5..5a1d6fb 100644 (file)
@@ -42,12 +42,19 @@ public class Rygel.SimpleContainer : Rygel.MediaContainer,
      *
      * @param id The ID of the item. This should be unique in the server.
      * @param parent The parent of the container.
-     * @param title The title of the container. 
+     * @param title The title of the container.
      */
     public SimpleContainer (string          id,
                             MediaContainer? parent,
                             string          title) {
-        base (id, parent, title, 0);
+        Object (id : id,
+                parent : parent,
+                title : title,
+                child_count : 0);
+    }
+
+    public override void constructed () {
+        base.constructed ();
 
         this.children = new MediaObjects ();
         this.empty_children = new MediaObjects ();
@@ -60,7 +67,10 @@ public class Rygel.SimpleContainer : Rygel.MediaContainer,
      * @param title The title of the container.
      */
     public SimpleContainer.root (string title) {
-        this ("0", null, title);
+        Object (id : "0",
+                parent : null,
+                title : title,
+                child_count : 0);
     }
 
     /**