[longomatch] Added new tagging mode using start and stop time



commit ca5f2256a81f1590fa5376bce3ff99b3fc679b0d
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Mar 26 02:10:51 2010 +0100

    Added new tagging mode using start and stop time

 LongoMatch/Common/Enums.cs                         |    5 +
 LongoMatch/Gui/Component/ButtonsWidget.cs          |   53 ++++++-
 LongoMatch/Gui/MainWindow.cs                       |   31 ++--
 LongoMatch/Handlers/EventsManager.cs               |   31 ++++-
 LongoMatch/Handlers/Handlers.cs                    |    4 +
 LongoMatch/LongoMatch.mdp                          |    2 +-
 .../LongoMatch.Gui.Component.ButtonsWidget.cs      |   41 +++++-
 LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs    |   14 ++-
 LongoMatch/gtk-gui/gui.stetic                      |  178 +++++++++++++-------
 LongoMatch/gtk-gui/objects.xml                     |   56 ++++---
 10 files changed, 304 insertions(+), 111 deletions(-)
---
diff --git a/LongoMatch/Common/Enums.cs b/LongoMatch/Common/Enums.cs
index 0911359..f97d5b9 100644
--- a/LongoMatch/Common/Enums.cs
+++ b/LongoMatch/Common/Enums.cs
@@ -35,4 +35,9 @@ namespace LongoMatch.Common
 		Quit = 235,
 		Save = 236
 	}
+	
+	public enum TagMode {
+		Predifined,
+		Free
+	}
 }
diff --git a/LongoMatch/Gui/Component/ButtonsWidget.cs b/LongoMatch/Gui/Component/ButtonsWidget.cs
index 1da4d8e..a12c5f5 100644
--- a/LongoMatch/Gui/Component/ButtonsWidget.cs
+++ b/LongoMatch/Gui/Component/ButtonsWidget.cs
@@ -21,7 +21,9 @@
 using System;
 using Gtk;
 using LongoMatch.DB;
+using LongoMatch.Common;
 using LongoMatch.Handlers;
+using LongoMatch.TimeNodes;
 using System.Collections.Generic;
 
 namespace LongoMatch.Gui.Component
@@ -31,14 +33,28 @@ namespace LongoMatch.Gui.Component
 	public partial class ButtonsWidget : Gtk.Bin
 	{
 
-		private Sections sections;
+		private Sections sections;		
+		private TagMode tagMode;
 
 		public event NewMarkEventHandler NewMarkEvent;
+		public event NewMarkStartHandler NewMarkStartEvent;
+		public event NewMarkStopHandler NewMarkStopEvent;
 
 
 		public ButtonsWidget()
 		{
 			this.Build();
+			Mode = TagMode.Predifined;
+		}
+		
+		public TagMode Mode{
+			set{
+				bool isPredef = (value == TagMode.Predifined);
+				table1.Visible = isPredef;
+				starttagbutton.Visible = !isPredef;
+				cancelbutton.Visible = false;
+				tagMode = value;				
+			}
 		}
 
 		public Sections Sections {
@@ -74,7 +90,6 @@ namespace LongoMatch.Gui.Component
 					l.Show();
 					b.Show();
 
-
 					table1.Attach(b,col_left,col_right,row_top,row_bottom);
 				}
 			}
@@ -82,9 +97,39 @@ namespace LongoMatch.Gui.Component
 
 		protected virtual void OnButtonClicked(object sender,  System.EventArgs e)
 		{
+			if (sections == null)
+				return;
 			Widget w = (Button)sender;
-			if (NewMarkEvent != null && this.sections != null)
-				this.NewMarkEvent(int.Parse(w.Name));
+			if (tagMode == TagMode.Predifined){
+				if (NewMarkEvent != null)
+					NewMarkEvent(int.Parse(w.Name));
+			} else {
+				starttagbutton.Visible = true;
+				table1.Visible = false;
+				cancelbutton.Visible = false;
+				if (NewMarkStopEvent != null)
+					NewMarkStopEvent(int.Parse(w.Name));
+			}			
+		}
+
+		protected virtual void OnStartTagClicked (object sender, System.EventArgs e)
+		{
+			if (sections == null)
+				return;
+			
+			starttagbutton.Visible = false;
+			table1.Visible = true;
+			cancelbutton.Visible = true;
+			
+			if (NewMarkStartEvent != null)
+				NewMarkStartEvent();
+		}
+
+		protected virtual void OnCancelbuttonClicked (object sender, System.EventArgs e)
+		{
+			starttagbutton.Visible = true;
+			table1.Visible = false;
+			cancelbutton.Visible = false;
 		}
 	}
 }
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index c962066..bbee960 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -98,6 +98,8 @@ namespace LongoMatch.Gui
 
 			playerbin1.SetLogo(System.IO.Path.Combine(MainClass.ImagesDir(),"background.png"));
 			playerbin1.LogoMode = true;
+			
+			buttonswidget1.Mode = TagMode.Predifined;
 
 			playlistwidget2.SetPlayer(playerbin1);
 
@@ -216,6 +218,7 @@ namespace LongoMatch.Gui
 			CloseProjectAction.Sensitive=sensitive;
 			SaveProjectAction.Sensitive = sensitive;
 			CaptureModeAction.Sensitive = sensitive2;
+			FreeCaptureModeAction.Sensitive = sensitive2;
 			AnalyzeModeAction.Sensitive = sensitive2;
 			ExportProjectToCSVFileAction.Sensitive = sensitive2;
 			HideAllWidgetsAction.Sensitive=sensitive2;
@@ -223,7 +226,7 @@ namespace LongoMatch.Gui
 
 		private void ShowWidgets() {
 			leftbox.Show();
-			if (CaptureModeAction.Active)
+			if (CaptureModeAction.Active || FreeCaptureModeAction.Active)
 				buttonswidget1.Show();
 			else
 				timelinewidget1.Show();
@@ -395,7 +398,8 @@ namespace LongoMatch.Gui
 			if (openedProject != null) {
 				leftbox.Visible = !((Gtk.ToggleAction)sender).Active;
 				timelinewidget1.Visible = !((Gtk.ToggleAction)sender).Active && AnalyzeModeAction.Active;
-				buttonswidget1.Visible = !((Gtk.ToggleAction)sender).Active && CaptureModeAction.Active;
+				buttonswidget1.Visible = !((Gtk.ToggleAction)sender).Active && 
+					(CaptureModeAction.Active || CaptureModeAction.Active);
 				if (((Gtk.ToggleAction)sender).Active)
 					rightvbox.Visible = false;
 				else if (!((Gtk.ToggleAction)sender).Active && (playlistwidget2.Visible || noteswidget1.Visible))
@@ -403,17 +407,17 @@ namespace LongoMatch.Gui
 			}
 		}
 		
-		protected virtual void OnCaptureModeActionToggled(object sender, System.EventArgs e)
+		protected virtual void OnViewToggled(object sender, System.EventArgs e)
 		{
-			if (((Gtk.ToggleAction)sender).Active) {
-				buttonswidget1.Show();
-				timelinewidget1.Hide();
-			}
-			else {
-				buttonswidget1.Hide();
-				timelinewidget1.Show();
-			}
-		}		
+			/* this callback is triggered by Capture and Free Capture */
+			ToggleAction view = (Gtk.ToggleAction)sender;
+			buttonswidget1.Visible = view.Active;
+			timelinewidget1.Visible = !view.Active;
+			if (view == FreeCaptureModeAction)
+				buttonswidget1.Mode = TagMode.Free;
+			else 
+				buttonswidget1.Mode = TagMode.Predifined;			
+		}	
 		#endregion
 		#region Help
 		protected virtual void OnHelpAction1Activated(object sender, System.EventArgs e)
@@ -525,6 +529,7 @@ namespace LongoMatch.Gui
 		{
 			CloseAndQuit();
 		}
-		#endregion		
+
+		#endregion			}
 	}
 }
\ No newline at end of file
diff --git a/LongoMatch/Handlers/EventsManager.cs b/LongoMatch/Handlers/EventsManager.cs
index 9ff2131..0e20df1 100644
--- a/LongoMatch/Handlers/EventsManager.cs
+++ b/LongoMatch/Handlers/EventsManager.cs
@@ -61,6 +61,7 @@ namespace LongoMatch
 		// current proyect in use
 		private Project openedProject;
 		private ProjectType projectType;
+		private Time startTime;
 
 		public EventsManager(PlaysListTreeWidget treewidget, PlayersListTreeWidget localPlayersList, 
 		                     PlayersListTreeWidget visitorPlayersList, TagsTreeWidget tagsTreeWidget,
@@ -104,6 +105,8 @@ namespace LongoMatch
 			//Adding Handlers for each event
 
 			buttonswidget.NewMarkEvent += OnNewMark;
+			buttonswidget.NewMarkStartEvent += OnNewMarkStart;
+			buttonswidget.NewMarkStopEvent += OnNewMarkStop;
 
 			treewidget.TimeNodeChanged += OnTimeNodeChanged;
 			localPlayersList.TimeNodeChanged += OnTimeNodeChanged;
@@ -178,7 +181,7 @@ namespace LongoMatch
 		
 			miniature = projectType == ProjectType.NewFakeCaptureProject ?
 				null : player.CurrentMiniatureFrame;
-			tn = openedProject.AddTimeNode(section,fStart, fStop,miniature);
+			tn = openedProject.AddTimeNode(section, start, stop,miniature);
 			treewidget.AddPlay(tn,section);
 			tagsTreeWidget.AddPlay(tn);
 			timeline.QueueDraw();
@@ -229,6 +232,32 @@ namespace LongoMatch
 				pos = new Time((int)player.CurrentTime);
 			ProcessNewMarkEvent(i,pos);
 		}
+		
+		public virtual void OnNewMarkStart(){
+			startTime = new Time((int)player.CurrentTime);
+		}
+		
+		public virtual void OnNewMarkStop(int section){
+			int diff;
+			Time stopTime = new Time((int)player.CurrentTime);
+			
+			diff = stopTime.MSeconds - startTime.MSeconds;
+			
+			if (diff < 0){
+				MessagePopup.PopupMessage(buttonswidget, MessageType.Warning,
+				                          Catalog.GetString("The stop time is smaller than the start time."+
+				                                            "The play will not be added."));
+				return;
+			}
+			if (diff < 500){
+				int correction = 500 - diff;
+				if (startTime.MSeconds - correction > 0)
+					startTime = startTime - correction;
+				else 
+					stopTime = stopTime + correction;			
+			} 
+			AddNewPlay(startTime, stopTime, section);		
+		}
 
 		protected virtual void OnTimeNodeSelected(MediaTimeNode tNode)
 		{
diff --git a/LongoMatch/Handlers/Handlers.cs b/LongoMatch/Handlers/Handlers.cs
index 86dd512..3206971 100644
--- a/LongoMatch/Handlers/Handlers.cs
+++ b/LongoMatch/Handlers/Handlers.cs
@@ -31,6 +31,10 @@ namespace LongoMatch.Handlers
 	public delegate void TimeNodeSelectedHandler(MediaTimeNode tNode);
 	//A new play needs to be create for a specific category at the current play time
 	public delegate void NewMarkEventHandler(int i);
+	//The start time of a new play has been signaled
+	public delegate void NewMarkStartHandler();
+	//The stop of a nes play has been signaled
+	public delegate void NewMarkStopHandler(int i);
 	//Several plays needs to be created for a several categories
 	public delegate void NewMarksEventHandler(List<int> sections);
 	//A need play needs to be created at precise frame
diff --git a/LongoMatch/LongoMatch.mdp b/LongoMatch/LongoMatch.mdp
index 713baba..375305d 100644
--- a/LongoMatch/LongoMatch.mdp
+++ b/LongoMatch/LongoMatch.mdp
@@ -185,8 +185,8 @@
     <File name="Utils/ProjectUtils.cs" subtype="Code" buildaction="Compile" />
     <File name="images/camera-video.png" subtype="Code" buildaction="EmbedAsResource" />
     <File name="images/video.png" subtype="Code" buildaction="EmbedAsResource" />
-    <File name="Gui/Dialog/BusyDialog.cs" subtype="Code" buildaction="Compile" />
     <File name="gtk-gui/LongoMatch.Gui.Dialog.BusyDialog.cs" subtype="Code" buildaction="Compile" />
+    <File name="Gui/Dialog/BusyDialog.cs" subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ButtonsWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ButtonsWidget.cs
index 5700635..466e799 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ButtonsWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ButtonsWidget.cs
@@ -13,6 +13,12 @@ namespace LongoMatch.Gui.Component {
     
     public partial class ButtonsWidget {
         
+        private Gtk.VBox vbox1;
+        
+        private Gtk.Button cancelbutton;
+        
+        private Gtk.Button starttagbutton;
+        
         private Gtk.Table table1;
         
         protected virtual void Build() {
@@ -21,15 +27,48 @@ namespace LongoMatch.Gui.Component {
             Stetic.BinContainer.Attach(this);
             this.Name = "LongoMatch.Gui.Component.ButtonsWidget";
             // Container child LongoMatch.Gui.Component.ButtonsWidget.Gtk.Container+ContainerChild
+            this.vbox1 = new Gtk.VBox();
+            this.vbox1.Name = "vbox1";
+            this.vbox1.Spacing = 6;
+            // Container child vbox1.Gtk.Box+BoxChild
+            this.cancelbutton = new Gtk.Button();
+            this.cancelbutton.CanFocus = true;
+            this.cancelbutton.Name = "cancelbutton";
+            this.cancelbutton.UseUnderline = true;
+            this.cancelbutton.Label = Mono.Unix.Catalog.GetString("Cancel");
+            this.vbox1.Add(this.cancelbutton);
+            Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox1[this.cancelbutton]));
+            w1.Position = 0;
+            w1.Expand = false;
+            w1.Fill = false;
+            // Container child vbox1.Gtk.Box+BoxChild
+            this.starttagbutton = new Gtk.Button();
+            this.starttagbutton.CanFocus = true;
+            this.starttagbutton.Name = "starttagbutton";
+            this.starttagbutton.UseUnderline = true;
+            this.starttagbutton.Label = Mono.Unix.Catalog.GetString("Tag new play");
+            this.vbox1.Add(this.starttagbutton);
+            Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox1[this.starttagbutton]));
+            w2.Position = 1;
+            w2.Expand = false;
+            w2.Fill = false;
+            // Container child vbox1.Gtk.Box+BoxChild
             this.table1 = new Gtk.Table(((uint)(5)), ((uint)(4)), false);
             this.table1.Name = "table1";
             this.table1.RowSpacing = ((uint)(1));
             this.table1.ColumnSpacing = ((uint)(1));
-            this.Add(this.table1);
+            this.vbox1.Add(this.table1);
+            Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.table1]));
+            w3.Position = 2;
+            this.Add(this.vbox1);
             if ((this.Child != null)) {
                 this.Child.ShowAll();
             }
+            this.cancelbutton.Hide();
+            this.starttagbutton.Hide();
             this.Show();
+            this.cancelbutton.Clicked += new System.EventHandler(this.OnCancelbuttonClicked);
+            this.starttagbutton.Clicked += new System.EventHandler(this.OnStartTagClicked);
         }
     }
 }
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
index b04d811..e8aeb07 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -59,6 +59,8 @@ namespace LongoMatch.Gui {
         
         private Gtk.Action ImportProjectAction;
         
+        private Gtk.RadioAction FreeCaptureModeAction;
+        
         private Gtk.VBox vbox1;
         
         private Gtk.VBox menubox;
@@ -190,6 +192,11 @@ namespace LongoMatch.Gui {
             this.ImportProjectAction = new Gtk.Action("ImportProjectAction", Mono.Unix.Catalog.GetString("_Import Project"), null, "stock-import");
             this.ImportProjectAction.ShortLabel = Mono.Unix.Catalog.GetString("_Import Project");
             w1.Add(this.ImportProjectAction, "<Control>i");
+            this.FreeCaptureModeAction = new Gtk.RadioAction("FreeCaptureModeAction", Mono.Unix.Catalog.GetString("Free Capture Mode"), null, null, 0);
+            this.FreeCaptureModeAction.Group = this.AnalyzeModeAction.Group;
+            this.FreeCaptureModeAction.Sensitive = false;
+            this.FreeCaptureModeAction.ShortLabel = Mono.Unix.Catalog.GetString("Free Capture Mode");
+            w1.Add(this.FreeCaptureModeAction, null);
             this.UIManager.InsertActionGroup(w1, 0);
             this.AddAccelGroup(this.UIManager.AccelGroup);
             this.Name = "LongoMatch.Gui.MainWindow";
@@ -206,7 +213,7 @@ namespace LongoMatch.Gui {
             this.menubox.Name = "menubox";
             this.menubox.Spacing = 6;
             // Container child menubox.Gtk.Box+BoxChild
-            this.UIManager.AddUiFromString("<ui><menubar name='menubar1'><menu name='FileAction' action='FileAction'><menuitem name='NewPojectAction' action='NewPojectAction'/><menuitem name='OpenProjectAction' action='OpenProjectAction'/><menuitem name='SaveProjectAction' action='SaveProjectAction'/><menuitem name='CloseProjectAction' action='CloseProjectAction'/><separator/><menuitem name='ImportProjectAction' action='ImportProjectAction'/><separator/><menuitem name='QuitAction' action='QuitAction'/></menu><menu name='ToolsAction' action='ToolsAction'><menuitem name='ProjectsManagerAction' action='ProjectsManagerAction'/><menuitem name='CategoriesTemplatesManagerAction' action='CategoriesTemplatesManagerAction'/><menuitem name='TeamsTemplatesManagerAction' action='TeamsTemplatesManagerAction'/><menuitem name='ExportProjectToCSVFileAction' action='ExportProjectToCSVFileAction'/></menu><menu name='ViewAction' action='ViewAction'><menuitem name='FullScreenAction' action='Full
 ScreenAction'/><menuitem name='HideAllWidgetsAction' action='HideAllWidgetsAction'/><separator/><menuitem name='PlaylistAction' action='PlaylistAction'/><menuitem name='DrawingToolAction' action='DrawingToolAction'/><separator/><menuitem name='CaptureModeAction' action='CaptureModeAction'/><menuitem name='AnalyzeModeAction' action='AnalyzeModeAction'/></menu><menu name='HelpAction' action='HelpAction'><menuitem name='AboutAction' action='AboutAction'/><menuitem name='HelpAction1' action='HelpAction1'/></menu></menubar></ui>");
+            this.UIManager.AddUiFromString("<ui><menubar name='menubar1'><menu name='FileAction' action='FileAction'><menuitem name='NewPojectAction' action='NewPojectAction'/><menuitem name='OpenProjectAction' action='OpenProjectAction'/><menuitem name='SaveProjectAction' action='SaveProjectAction'/><menuitem name='CloseProjectAction' action='CloseProjectAction'/><separator/><menuitem name='ImportProjectAction' action='ImportProjectAction'/><separator/><menuitem name='QuitAction' action='QuitAction'/></menu><menu name='ToolsAction' action='ToolsAction'><menuitem name='ProjectsManagerAction' action='ProjectsManagerAction'/><menuitem name='CategoriesTemplatesManagerAction' action='CategoriesTemplatesManagerAction'/><menuitem name='TeamsTemplatesManagerAction' action='TeamsTemplatesManagerAction'/><menuitem name='ExportProjectToCSVFileAction' action='ExportProjectToCSVFileAction'/></menu><menu name='ViewAction' action='ViewAction'><menuitem name='FullScreenAction' action='Full
 ScreenAction'/><menuitem name='HideAllWidgetsAction' action='HideAllWidgetsAction'/><separator/><menuitem name='PlaylistAction' action='PlaylistAction'/><menuitem name='DrawingToolAction' action='DrawingToolAction'/><separator/><menuitem name='CaptureModeAction' action='CaptureModeAction'/><menuitem name='FreeCaptureModeAction' action='FreeCaptureModeAction'/><menuitem name='AnalyzeModeAction' action='AnalyzeModeAction'/></menu><menu name='HelpAction' action='HelpAction'><menuitem name='AboutAction' action='AboutAction'/><menuitem name='HelpAction1' action='HelpAction1'/></menu></menubar></ui>");
             this.menubar1 = ((Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1")));
             this.menubar1.Name = "menubar1";
             this.menubox.Add(this.menubar1);
@@ -400,7 +407,7 @@ namespace LongoMatch.Gui {
                 this.Child.ShowAll();
             }
             this.DefaultWidth = 1259;
-            this.DefaultHeight = 786;
+            this.DefaultHeight = 817;
             this.leftbox.Hide();
             this.drawingtoolbox1.Hide();
             this.timelinewidget1.Hide();
@@ -419,7 +426,7 @@ namespace LongoMatch.Gui {
             this.CategoriesTemplatesManagerAction.Activated += new System.EventHandler(this.OnSectionsTemplatesManagerActivated);
             this.FullScreenAction.Toggled += new System.EventHandler(this.OnFullScreenActionToggled);
             this.PlaylistAction.Toggled += new System.EventHandler(this.OnPlaylistActionToggled);
-            this.CaptureModeAction.Toggled += new System.EventHandler(this.OnCaptureModeActionToggled);
+            this.CaptureModeAction.Toggled += new System.EventHandler(this.OnViewToggled);
             this.SaveProjectAction.Activated += new System.EventHandler(this.OnSaveProjectActionActivated);
             this.AboutAction.Activated += new System.EventHandler(this.OnAboutActionActivated);
             this.ExportProjectToCSVFileAction.Activated += new System.EventHandler(this.OnExportProjectToCSVFileActionActivated);
@@ -428,6 +435,7 @@ namespace LongoMatch.Gui {
             this.HelpAction1.Activated += new System.EventHandler(this.OnHelpAction1Activated);
             this.DrawingToolAction.Toggled += new System.EventHandler(this.OnDrawingToolActionToggled);
             this.ImportProjectAction.Activated += new System.EventHandler(this.OnImportProjectActionActivated);
+            this.FreeCaptureModeAction.Toggled += new System.EventHandler(this.OnViewToggled);
             this.treewidget1.TimeNodeSelected += new LongoMatch.Handlers.TimeNodeSelectedHandler(this.OnTimeNodeSelected);
             this.playerbin1.Error += new LongoMatch.Video.Handlers.ErrorHandler(this.OnPlayerbin1Error);
             this.playerbin1.SegmentClosedEvent += new LongoMatch.Video.Handlers.SegmentClosedHandler(this.OnSegmentClosedEvent);
diff --git a/LongoMatch/gtk-gui/gui.stetic b/LongoMatch/gtk-gui/gui.stetic
index 340ac3c..a8ba3f8 100644
--- a/LongoMatch/gtk-gui/gui.stetic
+++ b/LongoMatch/gtk-gui/gui.stetic
@@ -812,71 +812,115 @@
   <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.ButtonsWidget" design-size="532 149">
     <property name="MemberName" />
     <child>
-      <widget class="Gtk.Table" id="table1">
+      <widget class="Gtk.VBox" id="vbox1">
         <property name="MemberName" />
-        <property name="NRows">5</property>
-        <property name="NColumns">4</property>
-        <property name="RowSpacing">1</property>
-        <property name="ColumnSpacing">1</property>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
-        <child>
-          <placeholder />
-        </child>
+        <property name="Spacing">6</property>
         <child>
-          <placeholder />
+          <widget class="Gtk.Button" id="cancelbutton">
+            <property name="MemberName" />
+            <property name="Visible">False</property>
+            <property name="CanFocus">True</property>
+            <property name="Type">TextOnly</property>
+            <property name="Label" translatable="yes">Cancel</property>
+            <property name="UseUnderline">True</property>
+            <signal name="Clicked" handler="OnCancelbuttonClicked" />
+          </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>
-          <placeholder />
+          <widget class="Gtk.Button" id="starttagbutton">
+            <property name="MemberName" />
+            <property name="Visible">False</property>
+            <property name="CanFocus">True</property>
+            <property name="Type">TextOnly</property>
+            <property name="Label" translatable="yes">Tag new play</property>
+            <property name="UseUnderline">True</property>
+            <signal name="Clicked" handler="OnStartTagClicked" />
+          </widget>
+          <packing>
+            <property name="Position">1</property>
+            <property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
+          </packing>
         </child>
         <child>
-          <placeholder />
+          <widget class="Gtk.Table" id="table1">
+            <property name="MemberName" />
+            <property name="NRows">5</property>
+            <property name="NColumns">4</property>
+            <property name="RowSpacing">1</property>
+            <property name="ColumnSpacing">1</property>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+            <child>
+              <placeholder />
+            </child>
+          </widget>
+          <packing>
+            <property name="Position">2</property>
+            <property name="AutoSize">True</property>
+          </packing>
         </child>
       </widget>
     </child>
@@ -1482,7 +1526,7 @@
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Window" id="LongoMatch.Gui.MainWindow" design-size="1259 786">
+  <widget class="Gtk.Window" id="LongoMatch.Gui.MainWindow" design-size="1259 817">
     <action-group name="Default">
       <action id="FileAction">
         <property name="Type">Action</property>
@@ -1567,7 +1611,7 @@
         <property name="Active">False</property>
         <property name="Value">0</property>
         <property name="Group">group1</property>
-        <signal name="Toggled" handler="OnCaptureModeActionToggled" />
+        <signal name="Toggled" handler="OnViewToggled" />
       </action>
       <action id="AnalyzeModeAction">
         <property name="Type">Radio</property>
@@ -1645,6 +1689,17 @@
         <property name="StockId">stock-import</property>
         <signal name="Activated" handler="OnImportProjectActionActivated" />
       </action>
+      <action id="FreeCaptureModeAction">
+        <property name="Type">Radio</property>
+        <property name="Label" translatable="yes">Free Capture Mode</property>
+        <property name="Sensitive">False</property>
+        <property name="ShortLabel" translatable="yes">Free Capture Mode</property>
+        <property name="DrawAsRadio">False</property>
+        <property name="Active">False</property>
+        <property name="Value">0</property>
+        <property name="Group">group1</property>
+        <signal name="Toggled" handler="OnViewToggled" />
+      </action>
     </action-group>
     <property name="MemberName" />
     <property name="Title" translatable="yes">LongoMatch</property>
@@ -1688,6 +1743,7 @@
                     <node type="Menuitem" action="DrawingToolAction" />
                     <node type="Separator" />
                     <node type="Menuitem" action="CaptureModeAction" />
+                    <node type="Menuitem" action="FreeCaptureModeAction" />
                     <node type="Menuitem" action="AnalyzeModeAction" />
                   </node>
                   <node type="Menu" action="HelpAction">
diff --git a/LongoMatch/gtk-gui/objects.xml b/LongoMatch/gtk-gui/objects.xml
index 9e8544c..ab15f4d 100644
--- a/LongoMatch/gtk-gui/objects.xml
+++ b/LongoMatch/gtk-gui/objects.xml
@@ -20,14 +20,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" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.DrawingToolBox" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals>
@@ -194,25 +186,6 @@
     <itemgroups />
     <signals />
   </object>
-  <object type="LongoMatch.Gui.Component.ProjectDetailsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups>
-      <itemgroup label="ProjectDetailsWidget Properties">
-        <property name="Edited" />
-        <property name="LocalName" />
-        <property name="VisitorName" />
-        <property name="Season" />
-        <property name="Competition" />
-        <property name="LocalGoals" />
-        <property name="VisitorGoals" />
-        <property name="Date" />
-      </itemgroup>
-    </itemgroups>
-    <signals>
-      <itemgroup label="ProjectDetailsWidget Signals">
-        <signal name="EditedEvent" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.ProjectTemplateWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
     <itemgroups>
       <itemgroup label="ProjectTemplateWidget Properties">
@@ -271,4 +244,33 @@
       </itemgroup>
     </signals>
   </object>
+  <object type="LongoMatch.Gui.Component.ProjectDetailsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups>
+      <itemgroup label="ProjectDetailsWidget Properties">
+        <property name="Edited" />
+        <property name="LocalName" />
+        <property name="VisitorName" />
+        <property name="Season" />
+        <property name="Competition" />
+        <property name="LocalGoals" />
+        <property name="VisitorGoals" />
+        <property name="Date" />
+      </itemgroup>
+    </itemgroups>
+    <signals>
+      <itemgroup label="ProjectDetailsWidget Signals">
+        <signal name="EditedEvent" />
+      </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>
 </objects>
\ No newline at end of file



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