[longomatch/redesign3: 71/143] Small fixes after rebasing against master



commit 1467329be9303270232a80116dc0a29fbb7f829b
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Feb 6 02:01:29 2011 +0100

    Small fixes after rebasing against master

 LongoMatch/Gui/Component/CategoriesScale.cs        |    8 +-
 LongoMatch/Gui/Component/PlayerProperties.cs       |    4 +-
 LongoMatch/Gui/Component/TimeLineWidget.cs         |    4 -
 LongoMatch/Gui/Component/TimeScale.cs              |    4 +-
 .../Gui/TreeView/PlayerPropertiesTreeView.cs       |    2 +-
 LongoMatch/LongoMatch.mdp                          |    3 -
 LongoMatch/gtk-gui/objects.xml                     |  125 +++++++++-----------
 7 files changed, 65 insertions(+), 85 deletions(-)
---
diff --git a/LongoMatch/Gui/Component/CategoriesScale.cs b/LongoMatch/Gui/Component/CategoriesScale.cs
index 111c284..226e32b 100644
--- a/LongoMatch/Gui/Component/CategoriesScale.cs
+++ b/LongoMatch/Gui/Component/CategoriesScale.cs
@@ -21,8 +21,8 @@ using Gtk;
 using Gdk;
 using Pango;
 using LongoMatch.Common;
-using LongoMatch.TimeNodes;
-using LongoMatch.DB;
+using LongoMatch.Store;
+using LongoMatch.Store.Templates;
 
 namespace LongoMatch.Gui.Component
 {
@@ -43,7 +43,7 @@ namespace LongoMatch.Gui.Component
 			layout.Alignment = Pango.Alignment.Left;
 		}
 		
-		public Sections Categories {
+		public Categories Categories {
 			get;
 			set;
 		}	
@@ -73,7 +73,7 @@ namespace LongoMatch.Gui.Component
 				return;
 			
 			using(Cairo.Context g = Gdk.CairoHelper.Create(win)) {
-				foreach (SectionsTimeNode cat in Categories.SectionsTimeNodes) {
+				foreach (Category cat in Categories) {
 					int y = LINE_WIDTH/2 + i * SECTION_HEIGHT - (int)Scroll;
 					CairoUtils.DrawRoundedRectangle (g, 2, y + 3 , Allocation.Width - 3,
 					                                 SECTION_HEIGHT - 3, SECTION_HEIGHT/7,
diff --git a/LongoMatch/Gui/Component/PlayerProperties.cs b/LongoMatch/Gui/Component/PlayerProperties.cs
index c2525d0..7a8760b 100644
--- a/LongoMatch/Gui/Component/PlayerProperties.cs
+++ b/LongoMatch/Gui/Component/PlayerProperties.cs
@@ -62,7 +62,7 @@ namespace LongoMatch.Gui.Component
 				weightspinbutton.Value = value.Weight;
 				heightspinbutton.Value = value.Height;
 				image.Pixbuf = value.Photo;
-				playscombobox.Active = value.Discarded ? 1 : 0;
+				playscombobox.Active = value.Playing ? 0 : 1;
 			}
 			get {
 				return player;
@@ -166,7 +166,7 @@ namespace LongoMatch.Gui.Component
 		
 		protected virtual void OnPlayscomboboxChanged (object sender, System.EventArgs e)
 		{
-			player.Discarded = playscombobox.ActiveText == Catalog.GetString("No");
+			player.Playing = playscombobox.ActiveText == Catalog.GetString("Yes");
 		}
 		
 		
diff --git a/LongoMatch/Gui/Component/TimeLineWidget.cs b/LongoMatch/Gui/Component/TimeLineWidget.cs
index f84b652..208dfd0 100644
--- a/LongoMatch/Gui/Component/TimeLineWidget.cs
+++ b/LongoMatch/Gui/Component/TimeLineWidget.cs
@@ -149,7 +149,6 @@ namespace LongoMatch.Gui.Component {
 					return;
 				}
 				hasProject = true;
-				frames = value.File.GetFrames();
 				categories = value.Categories;
 				tsList = new Dictionary<Category, TimeScale>();
 				frames = value.Description.File.GetFrames();
@@ -159,9 +158,6 @@ namespace LongoMatch.Gui.Component {
 
 				tr.Frames = frames;
 				tr.FrameRate = value.Description.File.Fps;
-				ushort fps = value.Description.File.Fps;
-				tr = new TimeReferenceWidget(frames,fps);
-				vbox1.PackStart(tr,false,false,0);
 				tr.Show();
 				
 				foreach (Category cat in  categories) {
diff --git a/LongoMatch/Gui/Component/TimeScale.cs b/LongoMatch/Gui/Component/TimeScale.cs
index 1fe7924..d880757 100644
--- a/LongoMatch/Gui/Component/TimeScale.cs
+++ b/LongoMatch/Gui/Component/TimeScale.cs
@@ -78,7 +78,7 @@ namespace LongoMatch.Gui.Component
 			this.list = list;
 			HeightRequest= SECTION_HEIGHT;
 			Size((int)(frames/pixelRatio),SECTION_HEIGHT);
-			this.color = CairoUtils.RGBToCairoColor(color);
+			this.color = new Cairo.Color(0, 0, 1);
 			this.color.A = ALPHA;
 			Events = EventMask.PointerMotionMask | EventMask.ButtonPressMask | EventMask.ButtonReleaseMask ;
 
@@ -182,7 +182,7 @@ namespace LongoMatch.Gui.Component
 						CairoUtils.DrawRoundedRectangle(g,selected.StartFrame/pixelRatio,3,
 						                                selected.TotalFrames/pixelRatio,height-6,
 						                                SECTION_HEIGHT/7, color, borderColor);
-						if (selected.HasDrawing) {
+						if (selected.HasDrawings) {
 							g.MoveTo(selected.KeyFrame/pixelRatio,3);
 							g.LineTo(selected.KeyFrame/pixelRatio,SECTION_HEIGHT-3);
 							g.StrokePreserve();
diff --git a/LongoMatch/Gui/TreeView/PlayerPropertiesTreeView.cs b/LongoMatch/Gui/TreeView/PlayerPropertiesTreeView.cs
index 7f52d07..5e7468f 100644
--- a/LongoMatch/Gui/TreeView/PlayerPropertiesTreeView.cs
+++ b/LongoMatch/Gui/TreeView/PlayerPropertiesTreeView.cs
@@ -125,7 +125,7 @@ namespace LongoMatch.Gui.Component
 		{
 			Player player = (Player) model.GetValue(iter, 0);
 
-			(cell as Gtk.CellRendererText).Text = player.Discarded ? Catalog.GetString("No") : Catalog.GetString("Yes");
+			(cell as Gtk.CellRendererText).Text = player.Playing ? Catalog.GetString("Yes") : Catalog.GetString("No");
 		}
 
 		private void RenderNationality(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
diff --git a/LongoMatch/LongoMatch.mdp b/LongoMatch/LongoMatch.mdp
index 0b902c9..0c49473 100644
--- a/LongoMatch/LongoMatch.mdp
+++ b/LongoMatch/LongoMatch.mdp
@@ -163,8 +163,6 @@
     <File subtype="Code" buildaction="Compile" name="Common/GStreamer.cs" />
     <File subtype="Directory" buildaction="Compile" name="Compat" />
     <File subtype="Code" buildaction="Compile" name="IO/XMLReader.cs" />
-    <File subtype="Code" buildaction="Compile" name="IO/SectionsReader.cs" />
-    <File subtype="Code" buildaction="Compile" name="IO/SectionsWriter.cs" />
     <File subtype="Directory" buildaction="Compile" name="Store" />
     <File subtype="Directory" buildaction="Compile" name="DB" />
     <File subtype="Directory" buildaction="Compile" name="DB" />
@@ -197,7 +195,6 @@
     <File subtype="Code" buildaction="Compile" name="Store/TimeNode.cs" />
     <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="Compile" name="Store/Templates/TeamTemplate.cs" />
-    <File subtype="Code" buildaction="Compile" name="IO/XMLReader.cs" />
     <File subtype="Code" buildaction="Compile" name="Common/SerializableObject.cs" />
     <File subtype="Code" buildaction="Compile" name="Store/SubCategory.cs" />
     <File subtype="Code" buildaction="Compile" name="Store/Templates/SubCategoriesTemplate.cs" />
diff --git a/LongoMatch/gtk-gui/objects.xml b/LongoMatch/gtk-gui/objects.xml
index 429ea8a..e8d2c4e 100644
--- a/LongoMatch/gtk-gui/objects.xml
+++ b/LongoMatch/gtk-gui/objects.xml
@@ -36,23 +36,8 @@
     <itemgroups />
     <signals>
       <itemgroup label="CategoriesTreeView Signals">
-        <signal name="SectionClicked" />
-        <signal name="SectionsSelected" />
-      </itemgroup>
-    </signals>
-  </object>
-  <object type="LongoMatch.Gui.Component.TimeLineWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups>
-      <itemgroup label="TimeLineWidget Properties">
-        <property name="CurrentFrame" />
-      </itemgroup>
-    </itemgroups>
-    <signals>
-      <itemgroup label="TimeLineWidget Signals">
-        <signal name="TimeNodeChanged" />
-        <signal name="TimeNodeSelected" />
-        <signal name="TimeNodeDeleted" />
-        <signal name="NewMarkEvent" />
+        <signal name="CategoryClicked" />
+        <signal name="CategoriesSelected" />
       </itemgroup>
     </signals>
   </object>
@@ -83,23 +68,6 @@
     </itemgroups>
     <signals />
   </object>
-  <object type="LongoMatch.Gui.Component.TeamTemplateWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups>
-      <itemgroup label="TeamTemplateWidget Properties">
-        <property name="Edited" />
-      </itemgroup>
-    </itemgroups>
-    <signals />
-  </object>
-  <object type="LongoMatch.Gui.Component.TimeAdjustWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals>
-      <itemgroup label="TimeAdjustWidget Signals">
-        <signal name="LeadTimeChanged" />
-        <signal name="LagTimeChanged" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.PlayerProperties" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals />
@@ -123,27 +91,6 @@
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.DrawingToolBox" palette-category="General" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals>
-      <itemgroup label="DrawingToolBox Signals">
-        <signal name="LineWidthChanged" />
-        <signal name="DrawToolChanged" />
-        <signal name="ColorChanged" />
-        <signal name="VisibilityChanged" />
-        <signal name="ClearDrawing" />
-        <signal name="TransparencyChanged" />
-      </itemgroup>
-    </signals>
-  </object>
-  <object type="LongoMatch.Gui.Component.ProjectTemplateWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups>
-      <itemgroup label="ProjectTemplateWidget Properties">
-        <property name="Edited" />
-      </itemgroup>
-    </itemgroups>
-    <signals />
-  </object>
   <object type="LongoMatch.Gui.Component.PlayersListTreeWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals>
@@ -171,7 +118,11 @@
     <signals />
   </object>
   <object type="LongoMatch.Gui.Component.TagsTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
-    <itemgroups />
+    <itemgroups>
+      <itemgroup label="ListTreeViewBase Properties">
+        <property name="Colors" />
+      </itemgroup>
+    </itemgroups>
     <signals>
       <itemgroup label="ListTreeViewBase Signals">
         <signal name="TimeNodeChanged" />
@@ -185,7 +136,11 @@
     </signals>
   </object>
   <object type="LongoMatch.Gui.Component.PlayersTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
-    <itemgroups />
+    <itemgroups>
+      <itemgroup label="ListTreeViewBase Properties">
+        <property name="Colors" />
+      </itemgroup>
+    </itemgroups>
     <signals>
       <itemgroup label="ListTreeViewBase Signals">
         <signal name="TimeNodeChanged" />
@@ -199,7 +154,11 @@
     </signals>
   </object>
   <object type="LongoMatch.Gui.Component.PlaysTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
-    <itemgroups />
+    <itemgroups>
+      <itemgroup label="ListTreeViewBase Properties">
+        <property name="Colors" />
+      </itemgroup>
+    </itemgroups>
     <signals>
       <itemgroup label="ListTreeViewBase Signals">
         <signal name="TimeNodeChanged" />
@@ -238,6 +197,20 @@
       </itemgroup>
     </signals>
   </object>
+  <object type="LongoMatch.Gui.Component.PlaysListTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals>
+      <itemgroup label="PlaysListTreeWidget Signals">
+        <signal name="TimeNodeSelected" />
+        <signal name="TimeNodeChanged" />
+        <signal name="TimeNodeDeleted" />
+        <signal name="PlayListNodeAdded" />
+        <signal name="SnapshotSeriesEvent" />
+        <signal name="PlayersTagged" />
+        <signal name="TagPlay" />
+      </itemgroup>
+    </signals>
+  </object>
   <object type="LongoMatch.Gui.Component.ButtonsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals>
@@ -248,25 +221,39 @@
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.CategoryProperties" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+  <object type="LongoMatch.Gui.Component.DrawingToolBox" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals>
-      <itemgroup label="CategoryProperties Signals">
-        <signal name="HotKeyChanged" />
+      <itemgroup label="DrawingToolBox Signals">
+        <signal name="LineWidthChanged" />
+        <signal name="DrawToolChanged" />
+        <signal name="ColorChanged" />
+        <signal name="VisibilityChanged" />
+        <signal name="ClearDrawing" />
+        <signal name="TransparencyChanged" />
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.PlaysListTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
+  <object type="LongoMatch.Gui.Component.TimeLineWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups>
+      <itemgroup label="TimeLineWidget Properties">
+        <property name="CurrentFrame" />
+      </itemgroup>
+    </itemgroups>
     <signals>
-      <itemgroup label="PlaysListTreeWidget Signals">
-        <signal name="TimeNodeSelected" />
+      <itemgroup label="TimeLineWidget Signals">
         <signal name="TimeNodeChanged" />
+        <signal name="TimeNodeSelected" />
         <signal name="TimeNodeDeleted" />
-        <signal name="PlayListNodeAdded" />
-        <signal name="SnapshotSeriesEvent" />
-        <signal name="PlayersTagged" />
-        <signal name="TagPlay" />
+        <signal name="NewMarkEvent" />
+      </itemgroup>
+    </signals>
+  </object>
+  <object type="LongoMatch.Gui.Component.CategoryProperties" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals>
+      <itemgroup label="CategoryProperties Signals">
+        <signal name="HotKeyChanged" />
       </itemgroup>
     </signals>
   </object>



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