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



commit 23db70d18d842e9c68b937f81f6edab29d2c84c5
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]