[rygel/wip/gobject: 16/19] server: Simple container to GObject-style.



commit e1fd8e88b1c641aef327c916052d184b4a9c22ba
Author: Krzesimir Nowak <krnowak openismus com>
Date:   Wed Jan 16 14:14:54 2013 +0100

    server: Simple container to GObject-style.

 src/librygel-server/rygel-simple-container.vala |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/librygel-server/rygel-simple-container.vala b/src/librygel-server/rygel-simple-container.vala
index ee5ced5..5a1d6fb 100644
--- a/src/librygel-server/rygel-simple-container.vala
+++ b/src/librygel-server/rygel-simple-container.vala
@@ -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);
     }
 
     /**



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