Index: src/Banshee.Plugins/Daap/DaapContainerSource.cs
===================================================================
RCS file: src/Banshee.Plugins/Daap/DaapContainerSource.cs
diff -N src/Banshee.Plugins/Daap/DaapContainerSource.cs
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ src/Banshee.Plugins/Daap/DaapContainerSource.cs	21 Oct 2006 16:56:55 -0000
@@ -0,0 +1,62 @@
+/***************************************************************************
+ *  DaapContainer.cs
+ *
+ *  Copyright (C) 2005-2006 Novell, Inc.
+ *  Written by Scott Peterson <lunchtimemama@gmail.com>
+ ****************************************************************************/
+
+/*  THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW: 
+ *
+ *  Permission is hereby granted, free of charge, to any person obtaining a
+ *  copy of this software and associated documentation files (the "Software"),  
+ *  to deal in the Software without restriction, including without limitation  
+ *  the rights to use, copy, modify, merge, publish, distribute, sublicense,  
+ *  and/or sell copies of the Software, and to permit persons to whom the  
+ *  Software is furnished to do so, subject to the following conditions:
+ *
+ *  The above copyright notice and this permission notice shall be included in 
+ *  all copies or substantial portions of the Software.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+ *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+ *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
+ *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+ *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+ *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
+ *  DEALINGS IN THE SOFTWARE.
+ */
+ 
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Collections;
+using Mono.Unix;
+using DAAP;
+
+using Banshee.Base;
+using Banshee.Sources;
+
+namespace Banshee.Plugins.Daap
+{
+    public class DaapContainerSource : Source
+    {
+
+        public DaapContainerSource() : base("Shared Music", 300)
+        {
+        }
+
+        public override int Count {
+            get { return DaapCore.ServerCount; }
+        }
+
+        private static Gdk.Pixbuf icon = IconThemeUtils.LoadIcon(22, "network-server", Gtk.Stock.Network); 
+
+        public override Gdk.Pixbuf Icon {
+            get { return icon; }
+        }
+        
+        public override bool AutoExpand {
+            get { return false; }
+        }
+    }
+}
Index: src/Banshee.Plugins/Daap/DaapCore.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/Banshee.Plugins/Daap/DaapCore.cs,v
retrieving revision 1.13
diff -u -8 -p -r1.13 DaapCore.cs
--- src/Banshee.Plugins/Daap/DaapCore.cs	25 Sep 2006 17:04:39 -0000	1.13
+++ src/Banshee.Plugins/Daap/DaapCore.cs	21 Oct 2006 16:56:56 -0000
@@ -41,39 +41,42 @@ namespace Banshee.Plugins.Daap
     {
         private static DaapPlugin plugin;
         private static Server server;
         private static DAAP.Database database;
         private static ServiceLocator locator;
         private static DaapProxyWebServer proxy_server;
         private static Hashtable source_map;
         private static int collision_count;
+        private static DaapContainerSource container_source;
         
         private static bool initial_db_committed = false;
         
         internal static void Initialize(DaapPlugin plugin)
         {
             DaapCore.plugin = plugin;
             
+            container_source = new DaapContainerSource();
+            SourceManager.AddSource(container_source);
+            
             source_map = new Hashtable();
             locator = new ServiceLocator();
             locator.Found += OnServiceFound;
             locator.Removed += OnServiceRemoved;
             locator.ShowLocalServices = true;
             locator.Start();
             
             proxy_server = new DaapProxyWebServer();
             proxy_server.Start();
             
             string share_name = null;
             
             try {
                 share_name = Globals.Configuration.Get(plugin.ConfigurationKeys["ShareName"]) as string;
-            } catch {
-            }
+            } catch {}
             
             if(share_name == null || share_name == String.Empty) {
                 share_name = Catalog.GetString("Banshee Music Share");
             }
             collision_count = 0;
             
             database = new DAAP.Database(share_name);
             server = new Server(share_name);
@@ -119,42 +122,43 @@ namespace Banshee.Plugins.Daap
         }
         
         private static void OnServiceFound(object o, ServiceArgs args)
         {
             if (args.Service.Name == ServerName)
                 return;
             
             try {
-                Source source = new DaapSource(args.Service);
+                DaapSource source = new DaapSource(args.Service);
                 int collision = 0;
                 string service_name = args.Service.Name;
                 
                 if(service_name.ToLower().Contains("jono")) {
                     return;
                 }
                 
                 while (source_map.Contains(service_name))
                     service_name = args.Service.Name + " [" + ++collision + "]";
                 source_map.Add(service_name, source);
-                SourceManager.AddSource(source);
+                container_source.AddChildSource(source);
+                
             } catch(InvalidSourceException) {
             }
         }
         
         private static void OnServiceRemoved(object o, ServiceArgs args)
         {
             DaapSource source = source_map[args.Service.Name] as DaapSource;
             if(source == null) {
                 return;
             }
-
+            
             source.Disconnect (false);
             source.Dispose();
-            SourceManager.RemoveSource(source);
+            container_source.RemoveChildSource(source);
             source_map.Remove(args.Service.Name);
         }
         
         internal static void StartServer()
         {
             Console.WriteLine("Starting DAAP Server");
             try {
                 server.Start();
@@ -247,14 +251,16 @@ namespace Banshee.Plugins.Daap
                     server.Name = value;
                     database.Name = value;
                     Globals.Configuration.Set(plugin.ConfigurationKeys["ShareName"], value);
                 }
             }
         }
         
         internal static bool IsServerRunning {
-            get {
-                return server.IsRunning;
-            }
+            get { return server.IsRunning; }
+        }
+        
+        internal static int ServerCount {
+            get { return source_map.Count; }
         }
     }
 }
Index: src/Banshee.Plugins/Daap/DaapSource.cs
===================================================================
RCS file: /cvs/gnome/banshee/src/Banshee.Plugins/Daap/DaapSource.cs,v
retrieving revision 1.10
diff -u -8 -p -r1.10 DaapSource.cs
--- src/Banshee.Plugins/Daap/DaapSource.cs	25 Sep 2006 16:42:13 -0000	1.10
+++ src/Banshee.Plugins/Daap/DaapSource.cs	21 Oct 2006 16:56:56 -0000
@@ -33,53 +33,55 @@ using System.Collections;
 using Mono.Unix;
 using DAAP;
 
 using Banshee.Base;
 using Banshee.Sources;
 
 namespace Banshee.Plugins.Daap
 {
-    public class DaapSource : Source, IImportable, IImportSource
-    {
+    
+    public class DaapSource : ChildSource, IImportable, IImportSource
+    {        
         private Service service;
         private Client client;
         private DAAP.Database database;
         private DatabaseProxy database_proxy;
         private bool is_activating;
         
         public DaapSource(Service service) : base(service.Name, 300)
         {
             this.service = service;
             is_activating = false;
             database_proxy = new DatabaseProxy();
         }
         
         public override void Activate()
         {
-            if(client == null && !is_activating) {
-                is_activating = true;
-                Console.WriteLine("Connecting to DAAP share: " + service);
-                ThreadAssist.Spawn(delegate {
-                    client = new Client(service);
-                    client.Updated += OnClientUpdated;
-                    try {
-                        if(client.AuthenticationMethod == AuthenticationMethod.None) {
-                            client.Login();
-                        } else {
-                            ThreadAssist.ProxyToMain(PromptLogin);
-                        }
-                    } catch(Exception e) {
-                        LogCore.Instance.PushError(Catalog.GetString("Cannot login to DAAP share"),
-                            e.Message);
-                    }
-                    
-                    is_activating = false;
-                });
+            if(client != null || is_activating) {
+            	return;
             }
+            is_activating = true;
+            Console.WriteLine("Connecting to DAAP share: " + service);
+            ThreadAssist.Spawn(delegate {
+                client = new Client(service);
+                client.Updated += OnClientUpdated;
+                try {
+                    if(client.AuthenticationMethod == AuthenticationMethod.None) {
+                        client.Login();
+                    } else {
+                        ThreadAssist.ProxyToMain(PromptLogin);
+                    }
+                } catch(Exception e) {
+                    LogCore.Instance.PushError(Catalog.GetString("Cannot login to DAAP share"),
+                        e.Message);
+                }
+               
+                is_activating = false;
+            });
         }
 
         private void AddPlaylistSources ()
         {
             foreach (Playlist pl in database.Playlists) {
                 AddPlaylistSource (pl);
             }
         }
@@ -121,17 +123,17 @@ namespace Banshee.Plugins.Daap
             Unmap();
         }
 
         internal bool Disconnect (bool logout)
         {
             if(client != null) {
                 if (logout)
                     client.Logout();
-                
+
                 client.Dispose();
                 client = null;
                 database = null;
             }
             
             if(database != null) {
                 database.TrackAdded -= OnDatabaseTrackAdded;
                 database.TrackRemoved -= OnDatabaseTrackRemoved;
@@ -195,16 +197,20 @@ namespace Banshee.Plugins.Daap
         
         public override int Count {
             get { return database == null ? -1 : database.TrackCount; }
         }
         
         private static Gdk.Pixbuf icon = IconThemeUtils.LoadIcon(22, "network-server", Gtk.Stock.Network); 
         public override Gdk.Pixbuf Icon {
             get { return icon; }
+        }
+        
+        public override bool AutoExpand {
+            get { return false; }
         }
 
         public void Import()
         {
             Activate ();
 
             // omg this is so crappy
             while (is_activating)
Index: src/Banshee.Plugins/Daap/Makefile.am
===================================================================
RCS file: /cvs/gnome/banshee/src/Banshee.Plugins/Daap/Makefile.am,v
retrieving revision 1.12
diff -u -8 -p -r1.12 Makefile.am
--- src/Banshee.Plugins/Daap/Makefile.am	19 Oct 2006 21:35:37 -0000	1.12
+++ src/Banshee.Plugins/Daap/Makefile.am	21 Oct 2006 16:56:56 -0000
@@ -6,16 +6,17 @@ ASSEMBLY = $(ASSEMBLY_NAME).dll
 
 daapdir = $(pkglibdir)/Banshee.Plugins
 daap_SCRIPTS = $(ASSEMBLY) $(ASSEMBLY).mdb $(ASSEMBLY).config
 
 ASSEMBLY_SOURCES = \
 	$(top_srcdir)/src/AssemblyInfo.cs \
 	$(srcdir)/DaapPlugin.cs \
 	$(srcdir)/DaapCore.cs \
+	$(srcdir)/DaapContainerSource.cs \
 	$(srcdir)/DaapSource.cs \
 	$(srcdir)/DaapTrackInfo.cs \
 	$(srcdir)/DaapLoginDialog.cs \
 	$(srcdir)/DatabaseProxy.cs \
 	$(srcdir)/DaapPlaylistSource.cs \
 	$(srcdir)/DaapProxyWebServer.cs \
 	$(srcdir)/DaapConfigPage.cs \
 	$(srcdir)/daap-sharp/*.cs \
