[blam] ChannelGroup: Also call Setup() on sub-channels



commit 171b66c796d168fc4d6c3d564c4a1c275f4f9bb6
Author: Carlos Martín Nieto <carlos cmartin tk>
Date:   Tue Mar 1 16:06:23 2011 +0100

    ChannelGroup: Also call Setup() on sub-channels
    
    Signed-off-by: Carlos Martín Nieto <carlos cmartin tk>

 src/Channel.cs           |    1 +
 src/ChannelCollection.cs |    1 +
 src/ChannelGroup.cs      |    7 +++++++
 3 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/Channel.cs b/src/Channel.cs
index 4f318c0..483ef55 100644
--- a/src/Channel.cs
+++ b/src/Channel.cs
@@ -22,6 +22,7 @@ namespace Imendio.Blam {
         Gtk.TreeIter Iter {get; set; }
         bool MarkAsRead();
         Item GetItem(string id);
+        void Setup();
         event ChannelEventHandler Updated;
         void RemoveItems();
     }
diff --git a/src/ChannelCollection.cs b/src/ChannelCollection.cs
index b1062c5..689d103 100644
--- a/src/ChannelCollection.cs
+++ b/src/ChannelCollection.cs
@@ -109,6 +109,7 @@ namespace Imendio.Blam {
              */
             foreach(ChannelGroup chan in collection.Groups){
                 chan.Updated += collection.Updated;
+                chan.Setup();
             }
             foreach(Channel chan in collection.mChannels){
                 chan.Updated += collection.Updated;
diff --git a/src/ChannelGroup.cs b/src/ChannelGroup.cs
index 11fce7d..5ff0c20 100644
--- a/src/ChannelGroup.cs
+++ b/src/ChannelGroup.cs
@@ -129,6 +129,13 @@ namespace Imendio.Blam
                 Channels = new ArrayList();
         }
 
+        public void Setup()
+        {
+            foreach(Channel chan in Channels){
+                chan.Setup();
+            }
+        }
+
         public bool MarkAsRead()
         {
             bool ret = false;



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