rygel r326 - trunk/src/plugins/tracker



Author: zeeshanak
Date: Sun Dec 14 20:20:46 2008
New Revision: 326
URL: http://svn.gnome.org/viewvc/rygel?rev=326&view=rev

Log:
Reflect the correct number of children in the root container.

Do create the root container before creating it's child containers but
update the number of children when we know it.

Modified:
   trunk/src/plugins/tracker/rygel-media-tracker.vala

Modified: trunk/src/plugins/tracker/rygel-media-tracker.vala
==============================================================================
--- trunk/src/plugins/tracker/rygel-media-tracker.vala	(original)
+++ trunk/src/plugins/tracker/rygel-media-tracker.vala	Sun Dec 14 20:20:46 2008
@@ -45,9 +45,7 @@
         // Chain-up to base first
         base.constructed ();
 
-        this.root_container = new MediaContainer.root
-                                    ("MediaTracker",
-                                     this.containers.length ());
+        this.root_container = new MediaContainer.root ("MediaTracker", 0);
 
         this.containers = new List<TrackerContainer> ();
         this.containers.append
@@ -72,6 +70,9 @@
                                                MediaItem.VIDEO_CLASS,
                                                context));
 
+        // Now we know how many top-level containers we have
+        this.root_container.child_count = this.containers.length ();
+
         this.search_parser = new SearchCriteriaParser ();
 
         weak string home_dir = Environment.get_home_dir ();



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