[longomatch/timeline: 2/2] WIP on timeline work



commit f96f06f19bbc3945e8125561d326f30f5866ed43
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Feb 3 02:25:47 2011 +0100

    WIP on timeline work

 LongoMatch/Gui/Component/TimeLineWidget.cs         |   51 +++++--
 LongoMatch/Gui/Component/TimeReferenceWidget.cs    |   89 ++++++-----
 LongoMatch/LongoMatch.mdp                          |   23 ++--
 LongoMatch/Main.cs                                 |   10 +-
 LongoMatch/Makefile.am                             |    1 +
 .../LongoMatch.Gui.Component.TimeLineWidget.cs     |  123 ++++++++++-----
 LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs    |    3 +-
 LongoMatch/gtk-gui/gui.stetic                      |  164 +++++++++++++-------
 LongoMatch/gtk-gui/objects.xml                     |  116 ++++++++++-----
 9 files changed, 384 insertions(+), 196 deletions(-)
---
diff --git a/LongoMatch/Gui/Component/TimeLineWidget.cs b/LongoMatch/Gui/Component/TimeLineWidget.cs
index fe2aeaa..57a1e18 100644
--- a/LongoMatch/Gui/Component/TimeLineWidget.cs
+++ b/LongoMatch/Gui/Component/TimeLineWidget.cs
@@ -42,6 +42,7 @@ namespace LongoMatch.Gui.Component {
 		private List<List<MediaTimeNode>> tnArray;
 		private Sections sections;
 		private TimeReferenceWidget tr;
+		CategoriesScale cs;
 		private uint frames;
 		private uint pixelRatio;
 		private MediaTimeNode selected;
@@ -52,9 +53,23 @@ namespace LongoMatch.Gui.Component {
 		{
 			this.Build();
 			SetPixelRatio(10);
-			vscale1.CanFocus = false;
+			zoomscale.CanFocus = false;
+			
+			GtkScrolledWindow.Vadjustment.ValueChanged += HandleScrollEvent;
+			GtkScrolledWindow.Hadjustment.ValueChanged += HandleScrollEvent;
+			
+			GtkScrolledWindow.HScrollbar.SizeAllocated += OnSizeAllocated;
+			
+			cs = new CategoriesScale();
+			cs.WidthRequest = 100;
+			categoriesbox.PackStart(cs, false, false, 0);
+			
+			tr = new TimeReferenceWidget();
+			timescalebox.PackStart(tr,false,false,0);
+			
+			toolsbox.WidthRequest = 100;
 		}
-
+		
 		public MediaTimeNode SelectedTimeNode {
 			get {
 				return selected;
@@ -112,7 +127,6 @@ namespace LongoMatch.Gui.Component {
 			}
 		}
 
-
 		private void SetPixelRatio(uint pixelRatio) {
 			if (tsArray != null && tnArray != null) {
 				this.pixelRatio = pixelRatio;
@@ -120,7 +134,7 @@ namespace LongoMatch.Gui.Component {
 				foreach (TimeScale  ts in tsArray) {
 					ts.PixelRatio = pixelRatio;
 				}
-				vscale1.Value=pixelRatio;
+				zoomscale.Value=pixelRatio;
 			}
 		}
 
@@ -136,16 +150,18 @@ namespace LongoMatch.Gui.Component {
 					return;
 				}
 
+				frames = value.File.GetFrames();
 				sections = value.Sections;
 				tnArray = value.GetDataArray();
 				tsArray = new TimeScale[sections.Count];
 
-				frames = value.File.GetFrames();
-				ushort fps = value.File.Fps;
+				cs.Categories = sections;
+				cs.Show();
 
-				tr = new TimeReferenceWidget(frames,fps);
-				vbox1.PackStart(tr,false,false,0);
+				tr.Frames = frames;
+				tr.FrameRate = value.File.Fps;
 				tr.Show();
+				
 				for (int i=0; i<sections.Count; i++) {
 					TimeScale ts = new TimeScale(i,tnArray[i],frames,sections.GetColor(i));
 					tsArray[i]=ts;
@@ -192,11 +208,26 @@ namespace LongoMatch.Gui.Component {
 			AdjustPostion(currentFrame);
 		}
 
-		protected virtual void OnVscale1ValueChanged(object sender, System.EventArgs e)
+		protected virtual void OnZoomscaleValueChanged(object sender, System.EventArgs e)
 		{
-			SetPixelRatio((uint)(vscale1.Value));
+			SetPixelRatio((uint)(zoomscale.Value));
 			QueueDraw();
 			AdjustPostion(currentFrame);
 		}
+		
+		protected virtual void HandleScrollEvent (object sender, System.EventArgs args)
+		{
+			if (sender == GtkScrolledWindow.Vadjustment)
+				cs.Scroll = GtkScrolledWindow.Vadjustment.Value;
+			else if (sender == GtkScrolledWindow.Hadjustment)
+				tr.Scroll = GtkScrolledWindow.Hadjustment.Value;
+		}
+		
+		protected virtual void OnSizeAllocated (object sender, SizeAllocatedArgs e)
+		{
+			/* Align the categories list widget on top of the timeline's horizontal bar */
+			if (sender == GtkScrolledWindow.HScrollbar)
+				categoriesalignment1.BottomPadding = (uint) GtkScrolledWindow.HScrollbar.Allocation.Height;
+		}
 	}
 }
diff --git a/LongoMatch/Gui/Component/TimeReferenceWidget.cs b/LongoMatch/Gui/Component/TimeReferenceWidget.cs
index c152c20..cfd25f7 100644
--- a/LongoMatch/Gui/Component/TimeReferenceWidget.cs
+++ b/LongoMatch/Gui/Component/TimeReferenceWidget.cs
@@ -34,27 +34,44 @@ namespace LongoMatch.Gui.Component
 	public partial class TimeReferenceWidget : Gtk.DrawingArea
 	{
 		private const int SECTION_HEIGHT = 30;
-		ushort frameRate;
-		uint currentFrame;
+		double scroll;
 		uint frames;
 		uint pixelRatio=10;//Número de frames por pixel
 		Pango.Layout layout;
 
-		public TimeReferenceWidget(uint frames,ushort frameRate)
+		public TimeReferenceWidget()
 		{
-			this.frameRate = frameRate;
-			this.frames = frames;
+			Frames = 1;
+			PixelRatio = 1;
+			FrameRate = 1;
+			
 			this.HeightRequest= SECTION_HEIGHT;
-			this.Size((int)(this.frames/pixelRatio),SECTION_HEIGHT);
 			layout = new Pango.Layout(this.PangoContext);
 		}
 
 		public uint CurrentFrame {
+			get;
+			set;
+		}
+		
+		public uint Frames {
+			set{
+				frames = value;
+			}
+		}
+		
+		public ushort FrameRate {
+			set;
+			get;
+		}
+		
+		public double Scroll {
 			get {
-				return this.currentFrame;
+				return scroll;
 			}
 			set {
-				this.currentFrame = value;
+				scroll = value;
+				QueueDraw();
 			}
 		}
 
@@ -63,8 +80,7 @@ namespace LongoMatch.Gui.Component
 				return pixelRatio;
 			}
 			set {
-				this.pixelRatio = value;
-				this.Size((int)(this.frames/pixelRatio),SECTION_HEIGHT);
+				pixelRatio = value;
 			}
 		}
 
@@ -83,20 +99,17 @@ namespace LongoMatch.Gui.Component
 				this.CairoDraw(evnt,height,width);
 			else
 				this.GdkDraw(evnt,height,width);
-
-
-
-
 			return base.OnExposeEvent(evnt);
 		}
+		
 		private void CairoDraw(EventExpose evnt,int height,int width) {
 			Time time = new Time();
 			using(Cairo.Context g = Gdk.CairoHelper.Create(evnt.Window)) {
-				// Drawing main line
+				// Drawing position triangle
 				g.Color = new Cairo.Color(0,0,0);
-				g.MoveTo(currentFrame/pixelRatio,height);
-				g.LineTo(currentFrame/pixelRatio+5,height-15);
-				g.LineTo(currentFrame/pixelRatio-5,height-15);
+				g.MoveTo(CurrentFrame/pixelRatio-Scroll,height);
+				g.LineTo(CurrentFrame/pixelRatio-Scroll+5,height-15);
+				g.LineTo(CurrentFrame/pixelRatio-Scroll-5,height-15);
 				g.ClosePath();
 				g.Fill();
 				g.Stroke();
@@ -107,24 +120,24 @@ namespace LongoMatch.Gui.Component
 				g.MoveTo(new PointD(0,height-20));
 				g.ShowText("0");
 
-				for (int i=10*frameRate; i<=frames/pixelRatio;) {
-					g.MoveTo(new PointD(i,height));
-					g.LineTo(new PointD(i,height-10));
+				for (int i=10*FrameRate; i<=frames/pixelRatio;) {
+					g.MoveTo(new PointD(i-Scroll,height));
+					g.LineTo(new PointD(i-Scroll,height-10));
 					g.LineWidth = 2;
 					g.Stroke();
 
 
-					g.MoveTo(new PointD(i-13,height-20));
-					time.MSeconds = (int)(i/frameRate*pixelRatio);
+					g.MoveTo(new PointD(i-Scroll-13,height-20));
+					time.MSeconds = (int)(i/FrameRate*pixelRatio);
 					g.ShowText(time.ToSecondsString());
-					i=i+10*frameRate;
+					i=i+10*FrameRate;
 				}
 				for (int i=0; i<=frames/pixelRatio;) {
-					g.MoveTo(new PointD(i,height));
-					g.LineTo(new PointD(i,height-5));
+					g.MoveTo(new PointD(i-Scroll,height));
+					g.LineTo(new PointD(i-Scroll,height-5));
 					g.LineWidth = 1;
 					g.Stroke();
-					i=i+frameRate;
+					i=i+FrameRate;
 				}
 			}
 		}
@@ -133,29 +146,27 @@ namespace LongoMatch.Gui.Component
 			layout.SetMarkup("0");
 			this.GdkWindow.DrawLayout(this.Style.TextGC(StateType.Normal),0,height-23,layout);
 
-			Gdk.Point topL= new Gdk.Point((int)(currentFrame/pixelRatio-5),height-15);
-			Gdk.Point topR= new Gdk.Point((int)(currentFrame/pixelRatio+5),height-15);
-			Gdk.Point bottom= new Gdk.Point((int)(currentFrame/pixelRatio),height);
+			Gdk.Point topL= new Gdk.Point((int)(CurrentFrame/pixelRatio-Scroll-5),height-15);
+			Gdk.Point topR= new Gdk.Point((int)(CurrentFrame/pixelRatio-Scroll+5),height-15);
+			Gdk.Point bottom= new Gdk.Point((int)(CurrentFrame/pixelRatio-Scroll),height);
 			this.GdkWindow.DrawPolygon(this.Style.TextGC(StateType.Normal),true,new Gdk.Point[] {topL,topR,bottom});
 
-			for (int i=10*frameRate; i<=frames/pixelRatio;) {
+			for (int i=10*FrameRate; i<=frames/pixelRatio;) {
 				// Drawing separator line
-				evnt.Window.DrawLine(Style.DarkGC(StateType.Normal),i,height,i,height-10);
-				time.MSeconds = (int)(i/frameRate*pixelRatio);
+				evnt.Window.DrawLine(Style.DarkGC(StateType.Normal),i-(int)Scroll,height,i-(int)Scroll,height-10);
+				time.MSeconds = (int)(i/FrameRate*pixelRatio);
 				layout.SetMarkup(time.ToSecondsString());
-				this.GdkWindow.DrawLayout(this.Style.TextGC(StateType.Normal),i-13,height-23,layout);
+				this.GdkWindow.DrawLayout(this.Style.TextGC(StateType.Normal),i-(int)Scroll-13,height-23,layout);
 				//g.ShowText(time.ToSecondsString());
-				i=i+10*frameRate;
+				i=i+10*FrameRate;
 			}
 
 			for (int i=0; i<=frames/pixelRatio;) {
-				evnt.Window.DrawLine(Style.DarkGC(StateType.Normal),i,height,i,height-5);
-				i=i+frameRate;
+				evnt.Window.DrawLine(Style.DarkGC(StateType.Normal),i-(int)Scroll,height,i-(int)Scroll,height-5);
+				i=i+FrameRate;
 			}
 			// Drawing main line
 			evnt.Window.DrawLine(Style.DarkGC(StateType.Normal),0,height,width,height);
 		}
-
-
 	}
 }
diff --git a/LongoMatch/LongoMatch.mdp b/LongoMatch/LongoMatch.mdp
index 4d7af62..1ed7a6d 100644
--- a/LongoMatch/LongoMatch.mdp
+++ b/LongoMatch/LongoMatch.mdp
@@ -1,4 +1,14 @@
 <Project name="LongoMatch" fileversion="2.0" DefaultNamespace="LongoMatch" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
+  <Deployment.LinuxDeployData />
+  <MonoDevelop.Autotools.MakefileInfo RelativeMakefileName="../CesarPlayer/Makefile.am" RelativeConfigureInPath="../">
+    <BuildFilesVar Name="FILES" />
+    <DeployFilesVar />
+    <ResourcesVar Name="RESOURCES" />
+    <OthersVar />
+    <GacRefVar Name="REFERENCES" />
+    <AsmRefVar Name="REFERENCES" />
+    <ProjectRefVar Name="REFERENCES" />
+  </MonoDevelop.Autotools.MakefileInfo>
   <Configurations active="Release">
     <Configuration name="Debug" ctype="DotNetProjectConfiguration">
       <Output directory="bin/Debug" assembly="LongoMatch.exe" assemblyKeyFile="." />
@@ -185,6 +195,7 @@
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.EndCaptureDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.BusyDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/TreeView/ListTreeViewBase.cs" />
+    <File subtype="Code" buildaction="Compile" name="Gui/Component/CategoriesScale.cs" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
@@ -197,17 +208,7 @@
     <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
-    <ProjectReference type="Assembly" localcopy="True" specificVersion="False" refto="../../../../../usr/lib/mono/gac/Db4objects.Db4o/7.4.121.14026__6199cd4f203aa8eb/Db4objects.Db4o.dll" />
+    <ProjectReference specificVersion="False" type="Assembly" localcopy="True" refto="../../../../../usr/lib/mono/gac/Db4objects.Db4o/7.4.121.14026__6199cd4f203aa8eb/Db4objects.Db4o.dll" />
   </References>
   <LanguageParameters StartupObject="LongoMatch.MainClass" ApplicationIcon="." CodePage="65001" ctype="CSharpProjectParameters" />
-  <Deployment.LinuxDeployData />
-  <MonoDevelop.Autotools.MakefileInfo RelativeMakefileName="../CesarPlayer/Makefile.am" RelativeConfigureInPath="../">
-    <BuildFilesVar Name="FILES" />
-    <DeployFilesVar />
-    <ResourcesVar Name="RESOURCES" />
-    <OthersVar />
-    <GacRefVar Name="REFERENCES" />
-    <AsmRefVar Name="REFERENCES" />
-    <ProjectRefVar Name="REFERENCES" />
-  </MonoDevelop.Autotools.MakefileInfo>
 </Project>
\ No newline at end of file
diff --git a/LongoMatch/Main.cs b/LongoMatch/Main.cs
index 78ddef6..31b0e16 100644
--- a/LongoMatch/Main.cs
+++ b/LongoMatch/Main.cs
@@ -61,7 +61,7 @@ namespace LongoMatch
 			//Iniciamos la aplicación
 			Application.Init();
 
-			GLib.ExceptionManager.UnhandledException += new GLib.UnhandledExceptionHandler(OnException);
+			//GLib.ExceptionManager.UnhandledException += new GLib.UnhandledExceptionHandler(OnException);
 
 			LongoMatch.Video.Player.GstPlayer.InitBackend("");
 
@@ -75,13 +75,13 @@ namespace LongoMatch
 			//Check for previous database
 			CheckOldFiles();
 
-			try {
+			//try {
 				MainWindow win = new MainWindow();
 				win.Show();
 				Application.Run();
-			} catch (Exception ex) {
-				ProcessExecutionError(ex);
-			}
+			//} catch (Exception ex) {
+			//	ProcessExecutionError(ex);
+			//}
 		}
 
 		public static string RelativeToPrefix(string relativePath) {
diff --git a/LongoMatch/Makefile.am b/LongoMatch/Makefile.am
index 108917a..760109f 100644
--- a/LongoMatch/Makefile.am
+++ b/LongoMatch/Makefile.am
@@ -144,6 +144,7 @@ FILES = \
 	gtk-gui/LongoMatch.Gui.Popup.CalendarPopup.cs \
 	gtk-gui/LongoMatch.Gui.Popup.TransparentDrawingArea.cs \
 	Gui/Component/ButtonsWidget.cs \
+	Gui/Component/CategoriesScale.cs \
 	Gui/Component/CategoryProperties.cs \
 	Gui/Component/DrawingWidget.cs \
 	Gui/Component/DrawingToolBox.cs \
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TimeLineWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TimeLineWidget.cs
index 80e1305..9aa0632 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TimeLineWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TimeLineWidget.cs
@@ -6,11 +6,23 @@ namespace LongoMatch.Gui.Component
 	{
 		private global::Gtk.HBox hbox3;
 
-		private global::Gtk.VBox vbox3;
+		private global::Gtk.VBox vbox2;
+
+		private global::Gtk.HBox hbox4;
+
+		private global::Gtk.HBox toolsbox;
 
 		private global::Gtk.Button fitbutton;
 
-		private global::Gtk.VScale vscale1;
+		private global::Gtk.HScale zoomscale;
+
+		private global::Gtk.VBox timescalebox;
+
+		private global::Gtk.HBox hbox2;
+
+		private global::Gtk.Alignment categoriesalignment1;
+
+		private global::Gtk.HBox categoriesbox;
 
 		private global::Gtk.ScrolledWindow GtkScrolledWindow;
 
@@ -25,12 +37,17 @@ namespace LongoMatch.Gui.Component
 			// Container child LongoMatch.Gui.Component.TimeLineWidget.Gtk.Container+ContainerChild
 			this.hbox3 = new global::Gtk.HBox ();
 			this.hbox3.Name = "hbox3";
-			this.hbox3.Spacing = 6;
 			// Container child hbox3.Gtk.Box+BoxChild
-			this.vbox3 = new global::Gtk.VBox ();
-			this.vbox3.Name = "vbox3";
-			this.vbox3.Spacing = 6;
-			// Container child vbox3.Gtk.Box+BoxChild
+			this.vbox2 = new global::Gtk.VBox ();
+			this.vbox2.Name = "vbox2";
+			// Container child vbox2.Gtk.Box+BoxChild
+			this.hbox4 = new global::Gtk.HBox ();
+			this.hbox4.Name = "hbox4";
+			// Container child hbox4.Gtk.Box+BoxChild
+			this.toolsbox = new global::Gtk.HBox ();
+			this.toolsbox.Name = "toolsbox";
+			this.toolsbox.Spacing = 6;
+			// Container child toolsbox.Gtk.Box+BoxChild
 			this.fitbutton = new global::Gtk.Button ();
 			this.fitbutton.Name = "fitbutton";
 			this.fitbutton.UseUnderline = true;
@@ -48,56 +65,88 @@ namespace LongoMatch.Gui.Component
 			w2.Add (w5);
 			w1.Add (w2);
 			this.fitbutton.Add (w1);
-			this.vbox3.Add (this.fitbutton);
-			global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.fitbutton]));
+			this.toolsbox.Add (this.fitbutton);
+			global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.toolsbox[this.fitbutton]));
 			w9.Position = 0;
 			w9.Expand = false;
 			w9.Fill = false;
-			// Container child vbox3.Gtk.Box+BoxChild
-			this.vscale1 = new global::Gtk.VScale (null);
-			this.vscale1.Name = "vscale1";
-			this.vscale1.UpdatePolicy = ((global::Gtk.UpdateType)(1));
-			this.vscale1.Inverted = true;
-			this.vscale1.Adjustment.Lower = 1;
-			this.vscale1.Adjustment.Upper = 100;
-			this.vscale1.Adjustment.PageIncrement = 10;
-			this.vscale1.Adjustment.StepIncrement = 1;
-			this.vscale1.Adjustment.Value = 3;
-			this.vscale1.DrawValue = true;
-			this.vscale1.Digits = 0;
-			this.vscale1.ValuePos = ((global::Gtk.PositionType)(3));
-			this.vbox3.Add (this.vscale1);
-			global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.vscale1]));
-			w10.PackType = ((global::Gtk.PackType)(1));
+			// Container child toolsbox.Gtk.Box+BoxChild
+			this.zoomscale = new global::Gtk.HScale (null);
+			this.zoomscale.CanFocus = true;
+			this.zoomscale.Name = "zoomscale";
+			this.zoomscale.UpdatePolicy = ((global::Gtk.UpdateType)(1));
+			this.zoomscale.Adjustment.Lower = 1;
+			this.zoomscale.Adjustment.Upper = 100;
+			this.zoomscale.Adjustment.PageIncrement = 10;
+			this.zoomscale.Adjustment.StepIncrement = 1;
+			this.zoomscale.Adjustment.Value = 1;
+			this.zoomscale.DrawValue = true;
+			this.zoomscale.Digits = 0;
+			this.zoomscale.ValuePos = ((global::Gtk.PositionType)(2));
+			this.toolsbox.Add (this.zoomscale);
+			global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.toolsbox[this.zoomscale]));
 			w10.Position = 1;
-			this.hbox3.Add (this.vbox3);
-			global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.vbox3]));
+			this.hbox4.Add (this.toolsbox);
+			global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.toolsbox]));
 			w11.Position = 0;
 			w11.Expand = false;
 			w11.Fill = false;
-			// Container child hbox3.Gtk.Box+BoxChild
+			// Container child hbox4.Gtk.Box+BoxChild
+			this.timescalebox = new global::Gtk.VBox ();
+			this.timescalebox.Name = "timescalebox";
+			this.timescalebox.Spacing = 6;
+			this.hbox4.Add (this.timescalebox);
+			global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.timescalebox]));
+			w12.Position = 1;
+			this.vbox2.Add (this.hbox4);
+			global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox4]));
+			w13.Position = 0;
+			w13.Expand = false;
+			w13.Fill = false;
+			// Container child vbox2.Gtk.Box+BoxChild
+			this.hbox2 = new global::Gtk.HBox ();
+			this.hbox2.Name = "hbox2";
+			// Container child hbox2.Gtk.Box+BoxChild
+			this.categoriesalignment1 = new global::Gtk.Alignment (0.5f, 0.5f, 1f, 1f);
+			this.categoriesalignment1.Name = "categoriesalignment1";
+			// Container child categoriesalignment1.Gtk.Container+ContainerChild
+			this.categoriesbox = new global::Gtk.HBox ();
+			this.categoriesbox.Name = "categoriesbox";
+			this.categoriesbox.Spacing = 6;
+			this.categoriesalignment1.Add (this.categoriesbox);
+			this.hbox2.Add (this.categoriesalignment1);
+			global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.categoriesalignment1]));
+			w15.Position = 0;
+			w15.Expand = false;
+			w15.Fill = false;
+			// Container child hbox2.Gtk.Box+BoxChild
 			this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
 			this.GtkScrolledWindow.Name = "GtkScrolledWindow";
 			this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
 			// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
-			global::Gtk.Viewport w12 = new global::Gtk.Viewport ();
-			w12.ShadowType = ((global::Gtk.ShadowType)(0));
+			global::Gtk.Viewport w16 = new global::Gtk.Viewport ();
+			w16.ShadowType = ((global::Gtk.ShadowType)(0));
 			// Container child GtkViewport.Gtk.Container+ContainerChild
 			this.vbox1 = new global::Gtk.VBox ();
 			this.vbox1.Name = "vbox1";
-			this.vbox1.BorderWidth = ((uint)(2));
-			w12.Add (this.vbox1);
-			this.GtkScrolledWindow.Add (w12);
-			this.hbox3.Add (this.GtkScrolledWindow);
-			global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.GtkScrolledWindow]));
-			w15.Position = 1;
+			w16.Add (this.vbox1);
+			this.GtkScrolledWindow.Add (w16);
+			this.hbox2.Add (this.GtkScrolledWindow);
+			global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.GtkScrolledWindow]));
+			w19.Position = 1;
+			this.vbox2.Add (this.hbox2);
+			global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox2]));
+			w20.Position = 1;
+			this.hbox3.Add (this.vbox2);
+			global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.vbox2]));
+			w21.Position = 0;
 			this.Add (this.hbox3);
 			if ((this.Child != null)) {
 				this.Child.ShowAll ();
 			}
 			this.Show ();
 			this.fitbutton.Clicked += new global::System.EventHandler (this.OnFitbuttonClicked);
-			this.vscale1.ValueChanged += new global::System.EventHandler (this.OnVscale1ValueChanged);
+			this.zoomscale.ValueChanged += new global::System.EventHandler (this.OnZoomscaleValueChanged);
 		}
 	}
 }
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
index 6a17ee0..b3a2863 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -187,7 +187,7 @@ namespace LongoMatch.Gui
 			this.ImportProjectAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Import Project");
 			w1.Add (this.ImportProjectAction, "<Control>i");
 			this.FreeCaptureModeAction = new global::Gtk.RadioAction ("FreeCaptureModeAction", global::Mono.Unix.Catalog.GetString ("Free Capture Mode"), null, null, 0);
-			this.FreeCaptureModeAction.Group = this.CaptureModeAction.Group;
+			this.FreeCaptureModeAction.Group = this.AnalyzeModeAction.Group;
 			this.FreeCaptureModeAction.Sensitive = false;
 			this.FreeCaptureModeAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Free Capture Mode");
 			w1.Add (this.FreeCaptureModeAction, "<Control>f");
@@ -440,7 +440,6 @@ namespace LongoMatch.Gui
 			this.playerbin1.Error += new global::LongoMatch.Video.Common.ErrorHandler (this.OnPlayerbin1Error);
 			this.playerbin1.SegmentClosedEvent += new global::LongoMatch.Video.Common.SegmentClosedHandler (this.OnSegmentClosedEvent);
 			this.capturerBin.Error += new global::LongoMatch.Video.Common.ErrorHandler (this.OnCapturerBinError);
-			this.timelinewidget1.TimeNodeSelected += new global::LongoMatch.Handlers.TimeNodeSelectedHandler (this.OnTimeNodeSelected);
 		}
 	}
 }
diff --git a/LongoMatch/gtk-gui/gui.stetic b/LongoMatch/gtk-gui/gui.stetic
index f22a5de..82515b4 100644
--- a/LongoMatch/gtk-gui/gui.stetic
+++ b/LongoMatch/gtk-gui/gui.stetic
@@ -2120,7 +2120,6 @@
                         <property name="Visible">False</property>
                         <property name="Events">ButtonPressMask</property>
                         <property name="CurrentFrame">0</property>
-                        <signal name="TimeNodeSelected" handler="OnTimeNodeSelected" />
                       </widget>
                       <packing>
                         <property name="Position">1</property>
@@ -2827,90 +2826,143 @@ new one.</property>
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.TimeLineWidget" design-size="907 229">
+  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.TimeLineWidget" design-size="535 229">
     <property name="MemberName" />
     <child>
       <widget class="Gtk.HBox" id="hbox3">
         <property name="MemberName" />
-        <property name="Spacing">6</property>
         <child>
-          <widget class="Gtk.VBox" id="vbox3">
+          <widget class="Gtk.VBox" id="vbox2">
             <property name="MemberName" />
-            <property name="Spacing">6</property>
             <child>
-              <widget class="Gtk.Button" id="fitbutton">
+              <widget class="Gtk.HBox" id="hbox4">
                 <property name="MemberName" />
-                <property name="Type">TextAndIcon</property>
-                <property name="Icon">stock:gtk-zoom-fit Button</property>
-                <property name="Label" translatable="yes" />
-                <property name="UseUnderline">True</property>
-                <signal name="Clicked" handler="OnFitbuttonClicked" />
+                <child>
+                  <widget class="Gtk.HBox" id="toolsbox">
+                    <property name="MemberName" />
+                    <property name="Spacing">6</property>
+                    <child>
+                      <widget class="Gtk.Button" id="fitbutton">
+                        <property name="MemberName" />
+                        <property name="Type">TextAndIcon</property>
+                        <property name="Icon">stock:gtk-zoom-fit Button</property>
+                        <property name="Label" translatable="yes" />
+                        <property name="UseUnderline">True</property>
+                        <signal name="Clicked" handler="OnFitbuttonClicked" />
+                      </widget>
+                      <packing>
+                        <property name="Position">0</property>
+                        <property name="AutoSize">True</property>
+                        <property name="Expand">False</property>
+                        <property name="Fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="Gtk.HScale" id="zoomscale">
+                        <property name="MemberName" />
+                        <property name="CanFocus">True</property>
+                        <property name="UpdatePolicy">Discontinuous</property>
+                        <property name="Lower">1</property>
+                        <property name="Upper">100</property>
+                        <property name="PageIncrement">10</property>
+                        <property name="StepIncrement">1</property>
+                        <property name="Value">1</property>
+                        <property name="DrawValue">True</property>
+                        <property name="Digits">0</property>
+                        <property name="ValuePos">Top</property>
+                        <signal name="ValueChanged" handler="OnZoomscaleValueChanged" />
+                      </widget>
+                      <packing>
+                        <property name="Position">1</property>
+                        <property name="AutoSize">True</property>
+                      </packing>
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="Position">0</property>
+                    <property name="AutoSize">False</property>
+                    <property name="Expand">False</property>
+                    <property name="Fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.VBox" id="timescalebox">
+                    <property name="MemberName" />
+                    <property name="Spacing">6</property>
+                    <child>
+                      <placeholder />
+                    </child>
+                  </widget>
+                  <packing>
+                    <property name="Position">1</property>
+                    <property name="AutoSize">True</property>
+                  </packing>
+                </child>
               </widget>
               <packing>
                 <property name="Position">0</property>
-                <property name="AutoSize">True</property>
+                <property name="AutoSize">False</property>
                 <property name="Expand">False</property>
                 <property name="Fill">False</property>
               </packing>
             </child>
             <child>
-              <widget class="Gtk.VScale" id="vscale1">
-                <property name="MemberName" />
-                <property name="UpdatePolicy">Discontinuous</property>
-                <property name="Inverted">True</property>
-                <property name="Lower">1</property>
-                <property name="Upper">100</property>
-                <property name="PageIncrement">10</property>
-                <property name="StepIncrement">1</property>
-                <property name="Value">3</property>
-                <property name="DrawValue">True</property>
-                <property name="Digits">0</property>
-                <property name="ValuePos">Bottom</property>
-                <signal name="ValueChanged" handler="OnVscale1ValueChanged" />
-              </widget>
-              <packing>
-                <property name="PackType">End</property>
-                <property name="Position">1</property>
-                <property name="AutoSize">True</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="Position">0</property>
-            <property name="AutoSize">True</property>
-            <property name="Expand">False</property>
-            <property name="Fill">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
-            <property name="MemberName" />
-            <property name="ShadowType">In</property>
-            <child>
-              <widget class="Gtk.Viewport" id="GtkViewport">
+              <widget class="Gtk.HBox" id="hbox2">
                 <property name="MemberName" />
-                <property name="ShadowType">None</property>
                 <child>
-                  <widget class="Gtk.VBox" id="vbox1">
+                  <widget class="Gtk.Alignment" id="categoriesalignment1">
                     <property name="MemberName" />
-                    <property name="ShowScrollbars">True</property>
-                    <property name="BorderWidth">2</property>
                     <child>
-                      <placeholder />
-                    </child>
-                    <child>
-                      <placeholder />
+                      <widget class="Gtk.HBox" id="categoriesbox">
+                        <property name="MemberName" />
+                        <property name="Spacing">6</property>
+                        <child>
+                          <placeholder />
+                        </child>
+                      </widget>
                     </child>
+                  </widget>
+                  <packing>
+                    <property name="Position">0</property>
+                    <property name="AutoSize">False</property>
+                    <property name="Expand">False</property>
+                    <property name="Fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+                    <property name="MemberName" />
+                    <property name="ShadowType">In</property>
                     <child>
-                      <placeholder />
+                      <widget class="Gtk.Viewport" id="GtkViewport">
+                        <property name="MemberName" />
+                        <property name="ShadowType">None</property>
+                        <child>
+                          <widget class="Gtk.VBox" id="vbox1">
+                            <property name="MemberName" />
+                            <property name="ShowScrollbars">True</property>
+                            <child>
+                              <placeholder />
+                            </child>
+                          </widget>
+                        </child>
+                      </widget>
                     </child>
                   </widget>
+                  <packing>
+                    <property name="Position">1</property>
+                    <property name="AutoSize">True</property>
+                  </packing>
                 </child>
               </widget>
+              <packing>
+                <property name="Position">1</property>
+                <property name="AutoSize">True</property>
+              </packing>
             </child>
           </widget>
           <packing>
-            <property name="Position">1</property>
+            <property name="Position">0</property>
             <property name="AutoSize">True</property>
           </packing>
         </child>
diff --git a/LongoMatch/gtk-gui/objects.xml b/LongoMatch/gtk-gui/objects.xml
index 45894a6..b669ed1 100644
--- a/LongoMatch/gtk-gui/objects.xml
+++ b/LongoMatch/gtk-gui/objects.xml
@@ -77,6 +77,8 @@
       <itemgroup label="TimeReferenceWidget Properties">
         <property name="CurrentFrame" />
         <property name="PixelRatio" />
+        <property name="Scroll" />
+        <property name="FrameRate" />
       </itemgroup>
     </itemgroups>
     <signals />
@@ -98,16 +100,6 @@
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.ButtonsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals>
-      <itemgroup label="ButtonsWidget Signals">
-        <signal name="NewMarkEvent" />
-        <signal name="NewMarkStartEvent" />
-        <signal name="NewMarkStopEvent" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.PlayerProperties" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals />
@@ -131,22 +123,6 @@
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.ProjectListWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals>
-      <itemgroup label="ProjectListWidget Signals">
-        <signal name="ProjectsSelected" />
-      </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>
   <object type="LongoMatch.Gui.Component.DrawingToolBox" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals>
@@ -168,16 +144,6 @@
     </itemgroups>
     <signals />
   </object>
-  <object type="LongoMatch.Gui.Component.PlayListWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals>
-      <itemgroup label="PlayListWidget Signals">
-        <signal name="PlayListNodeSelected" />
-        <signal name="ApplyCurrentRate" />
-        <signal name="Progress" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.PlayersListTreeWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals>
@@ -218,6 +184,58 @@
     <itemgroups />
     <signals />
   </object>
+  <object type="LongoMatch.Gui.Component.TagsTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
+    <itemgroups />
+    <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>
+  <object type="LongoMatch.Gui.Component.PlayersTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
+    <itemgroups />
+    <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>
+  <object type="LongoMatch.Gui.Component.PlaysTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
+    <itemgroups />
+    <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>
+  <object type="LongoMatch.Gui.Component.PlayListWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals>
+      <itemgroup label="PlayListWidget Signals">
+        <signal name="PlayListNodeSelected" />
+        <signal name="ApplyCurrentRate" />
+        <signal name="Progress" />
+      </itemgroup>
+    </signals>
+  </object>
   <object type="LongoMatch.Gui.Component.TaggerWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals />
@@ -226,4 +244,30 @@
     <itemgroups />
     <signals />
   </object>
+  <object type="LongoMatch.Gui.Component.ProjectListWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals>
+      <itemgroup label="ProjectListWidget Signals">
+        <signal name="ProjectsSelected" />
+      </itemgroup>
+    </signals>
+  </object>
+  <object type="LongoMatch.Gui.Component.ButtonsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals>
+      <itemgroup label="ButtonsWidget Signals">
+        <signal name="NewMarkEvent" />
+        <signal name="NewMarkStartEvent" />
+        <signal name="NewMarkStopEvent" />
+      </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>
 </objects>
\ No newline at end of file



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