[longomatch] Do signal connections connections manually intead of with Stetic



commit d7eae1eeeae237322a311ac5ef2e87ba7cc87614
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Sep 6 01:51:01 2010 +0200

    Do signal connections connections manually intead of with Stetic

 LongoMatch/Gui/Component/PlayersListTreeWidget.cs  |    6 ++-
 LongoMatch/Gui/Component/PlaysListTreeWidget.cs    |   15 ++++--
 LongoMatch/Gui/Component/TagsTreeWidget.cs         |    4 ++
 ...ngoMatch.Gui.Component.PlayersListTreeWidget.cs |    4 --
 ...LongoMatch.Gui.Component.PlaysListTreeWidget.cs |    7 ---
 .../LongoMatch.Gui.Component.TagsTreeWidget.cs     |    4 --
 LongoMatch/gtk-gui/gui.stetic                      |   15 ------
 LongoMatch/gtk-gui/objects.xml                     |   52 +++++++++++---------
 8 files changed, 48 insertions(+), 59 deletions(-)
---
diff --git a/LongoMatch/Gui/Component/PlayersListTreeWidget.cs b/LongoMatch/Gui/Component/PlayersListTreeWidget.cs
index 57bef7e..d535e82 100644
--- a/LongoMatch/Gui/Component/PlayersListTreeWidget.cs
+++ b/LongoMatch/Gui/Component/PlayersListTreeWidget.cs
@@ -43,6 +43,10 @@ namespace LongoMatch.Gui.Component
 		public PlayersListTreeWidget()
 		{
 			this.Build();
+			playerstreeview.TimeNodeChanged += OnTimeNodeChanged;
+            playerstreeview.TimeNodeSelected += OnTimeNodeSelected;
+            playerstreeview.PlayListNodeAdded += OnPlayListNodeAdded;
+            playerstreeview.SnapshotSeriesEvent += OnSnapshotSeriesEvent;
 		}
 
 		public Team Team {
@@ -128,7 +132,7 @@ namespace LongoMatch.Gui.Component
 				TimeNodeChanged(tNode, val);
 		}
 
-		protected virtual void OnPlayerstreeviewPlayListNodeAdded(LongoMatch.TimeNodes.MediaTimeNode tNode)
+		protected virtual void OnPlayListNodeAdded(LongoMatch.TimeNodes.MediaTimeNode tNode)
 		{
 			if (PlayListNodeAdded != null)
 				PlayListNodeAdded(tNode);
diff --git a/LongoMatch/Gui/Component/PlaysListTreeWidget.cs b/LongoMatch/Gui/Component/PlaysListTreeWidget.cs
index e7c2473..0912017 100644
--- a/LongoMatch/Gui/Component/PlaysListTreeWidget.cs
+++ b/LongoMatch/Gui/Component/PlaysListTreeWidget.cs
@@ -48,7 +48,13 @@ namespace LongoMatch.Gui.Component
 		public PlaysListTreeWidget()
 		{
 			this.Build();
-
+			treeview.TimeNodeChanged += OnTimeNodeChanged;
+            treeview.TimeNodeSelected += OnTimeNodeSelected;
+            treeview.TimeNodeDeleted += OnTimeNodeDeleted;
+            treeview.PlayListNodeAdded += OnPlayListNodeAdded;
+            treeview.SnapshotSeriesEvent += OnSnapshotSeriesEvent;
+            treeview.PlayersTagged += OnPlayersTagged;
+            treeview.TagPlay += OnTagPlay;
 		}		
 
 		public void DeletePlay(MediaTimeNode play, int section) {
@@ -143,20 +149,19 @@ namespace LongoMatch.Gui.Component
 				PlayListNodeAdded(tNode);
 		}
 
-		protected virtual void OnTreeviewSnapshotSeriesEvent(LongoMatch.TimeNodes.MediaTimeNode tNode)
+		protected virtual void OnSnapshotSeriesEvent(LongoMatch.TimeNodes.MediaTimeNode tNode)
 		{
 			if (SnapshotSeriesEvent != null)
 				SnapshotSeriesEvent(tNode);
 		}
 
-
-		protected virtual void OnTreeviewPlayersTagged(LongoMatch.TimeNodes.MediaTimeNode tNode, Team team)
+		protected virtual void OnPlayersTagged(LongoMatch.TimeNodes.MediaTimeNode tNode, Team team)
 		{
 			if (PlayersTagged != null)
 				PlayersTagged(tNode,team);
 		}
 
-		protected virtual void OnTreeviewTagPlay (LongoMatch.TimeNodes.MediaTimeNode tNode)
+		protected virtual void OnTagPlay (LongoMatch.TimeNodes.MediaTimeNode tNode)
 		{
 			if (TagPlay != null)
 				TagPlay(tNode);
diff --git a/LongoMatch/Gui/Component/TagsTreeWidget.cs b/LongoMatch/Gui/Component/TagsTreeWidget.cs
index c880b53..b8d20f1 100644
--- a/LongoMatch/Gui/Component/TagsTreeWidget.cs
+++ b/LongoMatch/Gui/Component/TagsTreeWidget.cs
@@ -65,6 +65,10 @@ namespace LongoMatch.Gui.Component
 			filtercombobox.InsertText ((int)FilterType.AND, Catalog.GetString(andFilter));
 			filtercombobox.Active = 0;
 			filterType = FilterType.OR;
+			treeview.TimeNodeChanged += OnTimeNodeChanged;
+            treeview.TimeNodeSelected += OnTimeNodeSelected;
+            treeview.PlayListNodeAdded += OnPlayListNodeAdded;
+            treeview.SnapshotSeriesEvent += OnSnapshotSeriesEvent;
 			
 		}
 		
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs
index 346af47..bf6fea1 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs
@@ -37,10 +37,6 @@ namespace LongoMatch.Gui.Component {
                 this.Child.ShowAll();
             }
             this.Show();
-            this.playerstreeview.TimeNodeSelected += new LongoMatch.Handlers.TimeNodeSelectedHandler(this.OnTimeNodeSelected);
-            this.playerstreeview.SnapshotSeriesEvent += new LongoMatch.Handlers.SnapshotSeriesHandler(this.OnSnapshotSeriesEvent);
-            this.playerstreeview.TimeNodeChanged += new LongoMatch.Handlers.TimeNodeChangedHandler(this.OnTimeNodeChanged);
-            this.playerstreeview.PlayListNodeAdded += new LongoMatch.Handlers.PlayListNodeAddedHandler(this.OnPlayerstreeviewPlayListNodeAdded);
         }
     }
 }
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlaysListTreeWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlaysListTreeWidget.cs
index fe73af7..e154dac 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlaysListTreeWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlaysListTreeWidget.cs
@@ -40,13 +40,6 @@ namespace LongoMatch.Gui.Component {
                 this.Child.ShowAll();
             }
             this.Show();
-            this.treeview.TimeNodeChanged += new LongoMatch.Handlers.TimeNodeChangedHandler(this.OnTimeNodeChanged);
-            this.treeview.TimeNodeSelected += new LongoMatch.Handlers.TimeNodeSelectedHandler(this.OnTimeNodeSelected);
-            this.treeview.TimeNodeDeleted += new LongoMatch.Handlers.TimeNodeDeletedHandler(this.OnTimeNodeDeleted);
-            this.treeview.PlayListNodeAdded += new LongoMatch.Handlers.PlayListNodeAddedHandler(this.OnPlayListNodeAdded);
-            this.treeview.SnapshotSeriesEvent += new LongoMatch.Handlers.SnapshotSeriesHandler(this.OnTreeviewSnapshotSeriesEvent);
-            this.treeview.PlayersTagged += new LongoMatch.Handlers.PlayersTaggedHandler(this.OnTreeviewPlayersTagged);
-            this.treeview.TagPlay += new LongoMatch.Handlers.TagPlayHandler(this.OnTreeviewTagPlay);
         }
     }
 }
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs
index 512b7ce..2dfe184 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs
@@ -122,10 +122,6 @@ namespace LongoMatch.Gui.Component {
                 this.Child.ShowAll();
             }
             this.Hide();
-            this.treeview.TimeNodeChanged += new LongoMatch.Handlers.TimeNodeChangedHandler(this.OnTimeNodeChanged);
-            this.treeview.TimeNodeSelected += new LongoMatch.Handlers.TimeNodeSelectedHandler(this.OnTimeNodeSelected);
-            this.treeview.PlayListNodeAdded += new LongoMatch.Handlers.PlayListNodeAddedHandler(this.OnPlayListNodeAdded);
-            this.treeview.SnapshotSeriesEvent += new LongoMatch.Handlers.SnapshotSeriesHandler(this.OnSnapshotSeriesEvent);
             this.AddFilterButton.Clicked += new System.EventHandler(this.OnAddFilter);
             this.filtercombobox.Changed += new System.EventHandler(this.OnFiltercomboboxChanged);
         }
diff --git a/LongoMatch/gtk-gui/gui.stetic b/LongoMatch/gtk-gui/gui.stetic
index c9e6c63..2fe008e 100644
--- a/LongoMatch/gtk-gui/gui.stetic
+++ b/LongoMatch/gtk-gui/gui.stetic
@@ -970,13 +970,6 @@
                 <property name="MemberName" />
                 <property name="CanFocus">True</property>
                 <property name="ShowScrollbars">True</property>
-                <signal name="TimeNodeChanged" handler="OnTimeNodeChanged" />
-                <signal name="TimeNodeSelected" handler="OnTimeNodeSelected" />
-                <signal name="TimeNodeDeleted" handler="OnTimeNodeDeleted" />
-                <signal name="PlayListNodeAdded" handler="OnPlayListNodeAdded" />
-                <signal name="SnapshotSeriesEvent" handler="OnTreeviewSnapshotSeriesEvent" />
-                <signal name="PlayersTagged" handler="OnTreeviewPlayersTagged" />
-                <signal name="TagPlay" handler="OnTreeviewTagPlay" />
               </widget>
             </child>
           </widget>
@@ -4118,10 +4111,6 @@ Hotkeys with a single key are also allowed with Ctrl+key.</property>
           <widget class="LongoMatch.Gui.Component.PlayersTreeView" id="playerstreeview">
             <property name="MemberName" />
             <property name="CanFocus">True</property>
-            <signal name="TimeNodeSelected" handler="OnTimeNodeSelected" />
-            <signal name="SnapshotSeriesEvent" handler="OnSnapshotSeriesEvent" />
-            <signal name="TimeNodeChanged" handler="OnTimeNodeChanged" />
-            <signal name="PlayListNodeAdded" handler="OnPlayerstreeviewPlayListNodeAdded" />
           </widget>
         </child>
       </widget>
@@ -5498,10 +5487,6 @@ You can add new tags using the text entry and clicking "Add Tag"</property>
                 <property name="MemberName" />
                 <property name="CanFocus">True</property>
                 <property name="ShowScrollbars">True</property>
-                <signal name="TimeNodeChanged" handler="OnTimeNodeChanged" />
-                <signal name="TimeNodeSelected" handler="OnTimeNodeSelected" />
-                <signal name="PlayListNodeAdded" handler="OnPlayListNodeAdded" />
-                <signal name="SnapshotSeriesEvent" handler="OnSnapshotSeriesEvent" />
               </widget>
             </child>
           </widget>
diff --git a/LongoMatch/gtk-gui/objects.xml b/LongoMatch/gtk-gui/objects.xml
index e95a6af..0b24db9 100644
--- a/LongoMatch/gtk-gui/objects.xml
+++ b/LongoMatch/gtk-gui/objects.xml
@@ -23,6 +23,9 @@
         <signal name="TimeNodeChanged" />
         <signal name="SnapshotSeriesEvent" />
         <signal name="PlayListNodeAdded" />
+        <signal name="TimeNodeDeleted" />
+        <signal name="PlayersTagged" />
+        <signal name="TagPlay" />
       </itemgroup>
     </signals>
   </object>
@@ -57,17 +60,6 @@
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.PlayersListTreeWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals>
-      <itemgroup label="PlayersListTreeWidget Signals">
-        <signal name="TimeNodeSelected" />
-        <signal name="TimeNodeChanged" />
-        <signal name="SnapshotSeriesEvent" />
-        <signal name="PlayListNodeAdded" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.CategoriesTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
     <itemgroups />
     <signals>
@@ -141,11 +133,14 @@
   <object type="LongoMatch.Gui.Component.TagsTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
     <itemgroups />
     <signals>
-      <itemgroup label="TagsTreeView Signals">
+      <itemgroup label="ListTreeViewBase Signals">
         <signal name="TimeNodeChanged" />
         <signal name="TimeNodeSelected" />
+        <signal name="TimeNodeDeleted" />
         <signal name="PlayListNodeAdded" />
         <signal name="SnapshotSeriesEvent" />
+        <signal name="PlayersTagged" />
+        <signal name="TagPlay" />
       </itemgroup>
     </signals>
   </object>
@@ -202,17 +197,6 @@
     <itemgroups />
     <signals />
   </object>
-  <object type="LongoMatch.Gui.Component.TagsTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals>
-      <itemgroup label="TagsTreeWidget Signals">
-        <signal name="TimeNodeSelected" />
-        <signal name="TimeNodeChanged" />
-        <signal name="PlayListNodeAdded" />
-        <signal name="SnapshotSeriesEvent" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.DrawingToolBox" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals>
@@ -248,6 +232,17 @@
       </itemgroup>
     </signals>
   </object>
+  <object type="LongoMatch.Gui.Component.PlayersListTreeWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals>
+      <itemgroup label="PlayersListTreeWidget Signals">
+        <signal name="TimeNodeSelected" />
+        <signal name="TimeNodeChanged" />
+        <signal name="PlayListNodeAdded" />
+        <signal name="SnapshotSeriesEvent" />
+      </itemgroup>
+    </signals>
+  </object>
   <object type="LongoMatch.Gui.Component.PlaysListTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals>
@@ -262,4 +257,15 @@
       </itemgroup>
     </signals>
   </object>
+  <object type="LongoMatch.Gui.Component.TagsTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals>
+      <itemgroup label="TagsTreeWidget Signals">
+        <signal name="TimeNodeSelected" />
+        <signal name="TimeNodeChanged" />
+        <signal name="PlayListNodeAdded" />
+        <signal name="SnapshotSeriesEvent" />
+      </itemgroup>
+    </signals>
+  </object>
 </objects>
\ No newline at end of file



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