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



commit b81d6994cd83a9d58fcd3ba5e2fc383909968c0a
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]