[blam: 1/5] ChannelList: use our reference to the collection



commit 290b94de0906a3565c7378ba1e40828ad09e080b
Author: Carlos Martín Nieto <cmn dwim me>
Date:   Tue Jun 18 19:04:25 2013 +0200

    ChannelList: use our reference to the collection

 src/ChannelList.cs |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/ChannelList.cs b/src/ChannelList.cs
index fb06d17..a89449c 100644
--- a/src/ChannelList.cs
+++ b/src/ChannelList.cs
@@ -143,7 +143,7 @@ namespace Imendio.Blam {
 
                }
 
-               private void DragDataReceivedHandler(object o, DragDataReceivedArgs args)
+               void DragDataReceivedHandler(object o, DragDataReceivedArgs args)
                {
                        TreePath path;
                        TreeViewDropPosition pos;
@@ -169,15 +169,15 @@ namespace Imendio.Blam {
                                        return;
                                }
 
-                               Blam.Application.TheApp.CCollection.Remove(src);
+                               Collection.Remove(src);
 
                                Model.GetIter(out tmp_iter, tmp_path);
                                IChannel drop_parent = Model.GetValue(tmp_iter, 0) as IChannel;
                                //System.Console.WriteLine("dp: {0} depth:{1}", drop_parent.GetType(), 
path.Depth);
                                if(path.Depth == 2 && drop_parent is ChannelGroup){ // Dropped inside a group.
-                                       Blam.Application.TheApp.CCollection.Add(drop_parent as ChannelGroup, 
src);
+                                       Collection.Add((ChannelGroup)drop_parent, src);
                                } else{
-                                       Blam.Application.TheApp.CCollection.Add(src);
+                                       Collection.Add(src);
                                }
                        /* Directly over a channel. */
                        } else {
@@ -188,8 +188,8 @@ namespace Imendio.Blam {
 
                                if(dst is Channel && path.Depth == 1 && // dst is top-level
                                   src is Channel && Model.GetPath(src.Iter).Depth == 2){ // src is in a group
-                                       Blam.Application.TheApp.CCollection.Remove(src);
-                                       Blam.Application.TheApp.CCollection.Add(src);
+                                       Collection.Remove(src);
+                                       Collection.Add(src);
                                }
 
                                /*
@@ -203,7 +203,7 @@ namespace Imendio.Blam {
                                        return;
                                }
 
-                               Blam.Application.TheApp.CCollection.Remove(src);
+                               Collection.Remove(src);
                                /*
                                 * If we drop on a channel which is inside a group, we add that channel to
                                 * the group.
@@ -214,7 +214,7 @@ namespace Imendio.Blam {
                                        dst = Model.GetValue(tmp_iter, 0) as ChannelGroup;
                                }
 
-                               Blam.Application.TheApp.CCollection.Add(dst as ChannelGroup, src);
+                               Collection.Add(dst as ChannelGroup, src);
                        }
                }
 


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