[rygel] core: for all children set container as parent



commit 7eecac89f87167fac6be60b9d47953d5aef9ada0
Author: Jens Georg <mail jensge org>
Date:   Sun Jun 21 01:28:51 2009 +0200

    core: for all children set container as parent

 .../rygel-database-backed-media-container.vala     |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/rygel/rygel-database-backed-media-container.vala b/src/rygel/rygel-database-backed-media-container.vala
index dd32a04..07f904c 100644
--- a/src/rygel/rygel-database-backed-media-container.vala
+++ b/src/rygel/rygel-database-backed-media-container.vala
@@ -25,7 +25,7 @@
 using Rygel;
 
 public class Rygel.DatabaseBackedMediaContainer : Rygel.MediaContainer {
-    private MediaDB media_db;
+    protected MediaDB media_db;
 
     public DatabaseBackedMediaContainer (Rygel.MediaDB media_db,
                                          string id,
@@ -50,7 +50,12 @@ public class Rygel.DatabaseBackedMediaContainer : Rygel.MediaContainer {
     public override Gee.List<MediaObject>? get_children_finish (
                                                            AsyncResult res)
                                                            throws GLib.Error {
-        return ((Rygel.SimpleAsyncResult<Gee.ArrayList<MediaObject>>)res).data;
+        var result = (Rygel.SimpleAsyncResult<Gee.ArrayList<MediaObject>>)res;
+
+        foreach (var obj in result.data) {
+            obj.parent = this;
+        }
+        return result.data;
     }
 
 



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