[longomatch] Finish support for tagging in plays



commit 7468147c26a6cb225fab98ad8b0c1f4262c5c418
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu May 30 19:47:47 2013 +0200

    Finish support for tagging in plays

 LongoMatch.Core/Common/Constants.cs                |    3 +
 LongoMatch.Core/Common/Coordinates.cs              |   23 +-
 LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs      |    2 +-
 LongoMatch.Core/Store/Category.cs                  |   37 +-
 LongoMatch.Core/Store/Play.cs                      |   11 +-
 .../Store/Templates/CategoriesTemplate.cs          |    9 +-
 .../Gui/Component/CategoriesTemplateEditor.cs      |   93 +++
 LongoMatch.GUI/Gui/Component/CategoryProperties.cs |   54 ++
 LongoMatch.GUI/Gui/Component/CoordinatesTagger.cs  |  260 ++++++
 LongoMatch.GUI/Gui/Dialog/TaggerDialog.cs          |   63 ++-
 LongoMatch.GUI/Gui/GUIToolkit.cs                   |    4 +-
 LongoMatch.GUI/Gui/Helpers/MessagesHelpers.cs      |    2 +-
 LongoMatch.GUI/LongoMatch.GUI.mdp                  |    4 +
 LongoMatch.GUI/Makefile.am                         |    2 +
 .../LongoMatch.Gui.Component.CategoryProperties.cs |  210 ++++--
 .../LongoMatch.Gui.Component.CoordinatesTagger.cs  |   26 +
 .../LongoMatch.Gui.Component.TaggerWidget.cs       |    1 +
 .../gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs  |   77 ++-
 .../gtk-gui/LongoMatch.Gui.MainWindow.cs           |    2 +-
 LongoMatch.GUI/gtk-gui/gui.stetic                  |  824 ++++++++++++--------
 LongoMatch.GUI/gtk-gui/objects.xml                 |   94 ++-
 LongoMatch.Services/Services/EventsManager.cs      |    6 +-
 LongoMatch.mds                                     |    4 +-
 23 files changed, 1371 insertions(+), 440 deletions(-)
---
diff --git a/LongoMatch.Core/Common/Constants.cs b/LongoMatch.Core/Common/Constants.cs
index b048f08..01e33bf 100644
--- a/LongoMatch.Core/Common/Constants.cs
+++ b/LongoMatch.Core/Common/Constants.cs
@@ -99,5 +99,8 @@ Xavier Queralt Mateu (ca)";
                public const string SUBCAT_TEMPLATE_EXT = ".lst";
                public const string PLAYLIST_EXT = ".lpl";
                public const string PROJECT_EXT = ".lgm";
+               
+               public const string FIELD_BACKGROUND = "field_background.svg";
+               public const string GOAL_BACKGROUND = "goal_background.svg";
        }
 }
diff --git a/LongoMatch.Core/Common/Coordinates.cs b/LongoMatch.Core/Common/Coordinates.cs
index 85d2b34..474e9f3 100644
--- a/LongoMatch.Core/Common/Coordinates.cs
+++ b/LongoMatch.Core/Common/Coordinates.cs
@@ -17,7 +17,6 @@
 // 
 using System;
 using System.Collections.Generic;
-using System.Drawing;
 
 namespace LongoMatch.Common
 {
@@ -54,5 +53,27 @@ namespace LongoMatch.Common
                        return int.Parse(s);
                }
        }
+       
+       public class Point {
+               public Point (int x, int y) {
+                       X = x;
+                       Y = y;
+               }
+               
+               public int X {
+                       get;
+                       set;
+               }
+               
+               public int Y {
+                       get;
+                       set;
+               }
+               
+               public override string ToString ()
+               {
+                       return string.Format ("[Point: X={0}, Y={1}]", X, Y);
+               }
+       }
 }
 
diff --git a/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs b/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs
index b02d3ac..d60168e 100644
--- a/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs
+++ b/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs
@@ -71,7 +71,7 @@ namespace LongoMatch.Interfaces.GUI
                
                void ManageJobs(IRenderingJobsManager manager);
                
-               void TagPlay(Play play, TeamTemplate local, TeamTemplate visitor, bool showAllTags);
+               void TagPlay(Play play, Categories categories, TeamTemplate local, TeamTemplate visitor, bool 
showAllTags);
                void DrawingTool(Image pixbuf, Play play, int stopTime);
        }
 }
diff --git a/LongoMatch.Core/Store/Category.cs b/LongoMatch.Core/Store/Category.cs
index c2f626b..1c7255a 100644
--- a/LongoMatch.Core/Store/Category.cs
+++ b/LongoMatch.Core/Store/Category.cs
@@ -45,6 +45,8 @@ namespace LongoMatch.Store
                public Category() {
                        _UUID = System.Guid.NewGuid();
                        SubCategories = new List<ISubCategory>();
+                       TagGoalPosition = false;
+                       TagFieldPosition = true;
                }
 
                #region  Properties
@@ -94,7 +96,22 @@ namespace LongoMatch.Store
                        get;
                        set;
                }
-
+               
+               public bool TagGoalPosition {
+                       get;
+                       set;
+               }
+               
+               public bool TagFieldPosition {
+                       get;
+                       set;
+               }
+               
+               public bool FieldPositionIsDistance {
+                       get;
+                       set;
+               }
+               
                /// <summary>
                /// Sort method string used for the UI
                /// </summary>
@@ -139,6 +156,21 @@ namespace LongoMatch.Store
                                ColorHelper.ShortToByte((ushort)info.GetValue("red", typeof(ushort))),
                                ColorHelper.ShortToByte((ushort)info.GetValue("green", typeof(ushort))),
                                ColorHelper.ShortToByte((ushort)info.GetValue("blue", typeof(ushort))));
+                       try {
+                               TagFieldPosition = info.GetBoolean("tagfieldpos");
+                       } catch {
+                               TagFieldPosition = true;
+                       }
+                       try {
+                               TagGoalPosition = info.GetBoolean("tagfieldgoal");
+                       } catch {
+                               TagGoalPosition = false;
+                       }
+                       try {
+                               FieldPositionIsDistance = info.GetBoolean("fieldposisdist");
+                       } catch {
+                               FieldPositionIsDistance = false;
+                       }
                }
 
                // this method is automatically called during serialization
@@ -155,6 +187,9 @@ namespace LongoMatch.Store
                        info.AddValue("green", ColorHelper.ByteToShort(Color.G));
                        info.AddValue("blue", ColorHelper.ByteToShort(Color.B));
                        info.AddValue("sort_method", SortMethod);
+                       info.AddValue("tagfieldpos", TagFieldPosition);
+                       info.AddValue("taggoalpos", TagGoalPosition);
+                       info.AddValue("fieldposisdist", FieldPositionIsDistance);
                }
                #endregion
                
diff --git a/LongoMatch.Core/Store/Play.cs b/LongoMatch.Core/Store/Play.cs
index e8eae1d..fe972f0 100644
--- a/LongoMatch.Core/Store/Play.cs
+++ b/LongoMatch.Core/Store/Play.cs
@@ -42,6 +42,10 @@ namespace LongoMatch.Store
                        Tags = new StringTagStore();
                        Players = new PlayersTagStore(); 
                        Teams = new TeamsTagStore();
+                       FieldPosition = new Coordinates ();
+                       FieldPosition.Add (new Point (0, 0));
+                       GoalPosition = new Coordinates ();
+                       GoalPosition.Add (new Point (0, 0));
                        Fps = 25;
                }
                #endregion
@@ -187,7 +191,12 @@ namespace LongoMatch.Store
                        set;
                }
                
-               public CoordinatesTagStore Coordinates {
+               public Coordinates FieldPosition {
+                       get;
+                       set;
+               }
+               
+               public Coordinates GoalPosition {
                        get;
                        set;
                }
diff --git a/LongoMatch.Core/Store/Templates/CategoriesTemplate.cs 
b/LongoMatch.Core/Store/Templates/CategoriesTemplate.cs
index 30a4bab..8414929 100644
--- a/LongoMatch.Core/Store/Templates/CategoriesTemplate.cs
+++ b/LongoMatch.Core/Store/Templates/CategoriesTemplate.cs
@@ -26,6 +26,8 @@ using Mono.Unix;
 using LongoMatch.Common;
 using LongoMatch.Interfaces;
 
+using Image = LongoMatch.Common.Image;
+
 namespace LongoMatch.Store.Templates
 {
 
@@ -66,7 +68,12 @@ namespace LongoMatch.Store.Templates
                        }
                }
                
-               public LongoMatch.Common.Image FieldBackgroundImage {
+               public Image FieldBackgroundImage {
+                       get;
+                       set;
+               }
+               
+               public Image GoalBackgroundImage {
                        get;
                        set;
                }
diff --git a/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs 
b/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs
index 9969615..3ec01a4 100644
--- a/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs
@@ -16,15 +16,20 @@
 //  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 // 
 
+using System;
 using System.Collections.Generic;
 using Gtk;
+using Gdk;
 using Mono.Unix;
+
 using LongoMatch.Gui.Base;
 using LongoMatch.Gui.Dialog;
 using LongoMatch.Interfaces;
 using LongoMatch.Store;
 using LongoMatch.Store.Templates;
 using LongoMatch.Gui.Helpers;
+using LongoMatch.Common;
+using Image = LongoMatch.Common.Image;
 
 namespace LongoMatch.Gui.Component
 {
@@ -33,6 +38,8 @@ namespace LongoMatch.Gui.Component
                CategoriesTreeView categoriestreeview;
                List<HotKey> hkList;
                GameUnitsEditor gameUnitsEditor;
+               Gtk.Image fieldImage, goalImage;
+               VBox box;
                
                ITemplatesService ts;
 
@@ -44,6 +51,7 @@ namespace LongoMatch.Gui.Component
                        categoriestreeview.CategoriesSelected += this.OnCategoriesSelected;
                        CurrentPage = 0;
                        FirstPageName = Catalog.GetString("Categories");
+                       AddBackgroundsSelectionWidget ();
                        AddTreeView(categoriestreeview);
                        gameUnitsEditor = new GameUnitsEditor();
                        if (Config.UseGameUnits) {
@@ -71,6 +79,23 @@ namespace LongoMatch.Gui.Component
                                categoriestreeview.Model = categoriesListStore;
                                ButtonsSensitive = false;
                                gameUnitsEditor.SetRootGameUnit(value.GameUnits);
+                               if (template.GoalBackgroundImage != null) {
+                                       goalImage.Pixbuf = template.GoalBackgroundImage.Value;
+                               } else {
+                                       Image img = new Image (
+                                               Gdk.Pixbuf.LoadFromResource (Constants.GOAL_BACKGROUND));
+                                       img.Scale();
+                                       goalImage.Pixbuf = img.Value; 
+                               }
+                               if (template.FieldBackgroundImage != null) {
+                                       fieldImage.Pixbuf = template.FieldBackgroundImage.Value;
+                               } else {
+                                       Image img = new Image (
+                                               Gdk.Pixbuf.LoadFromResource (Constants.FIELD_BACKGROUND));
+                                       img.Scale();
+                                       fieldImage.Pixbuf = img.Value; 
+                               }
+                               box.Sensitive = true;
                        }
                }
                
@@ -107,6 +132,74 @@ namespace LongoMatch.Gui.Component
                        dialog.Destroy();
                        Edited = true;
                }
+               
+               private void AddBackgroundsSelectionWidget () {
+                       Gtk.Frame fframe, gframe;
+                       EventBox febox, gebox;
+                       Image img;
+                       
+                       fframe = new Gtk.Frame("<b>" + Catalog.GetString("Field background") + "</b>");
+                       (fframe.LabelWidget as Label).UseMarkup = true;
+                       fframe.ShadowType = ShadowType.None;
+                       gframe = new Gtk.Frame("<b>" + Catalog.GetString("Goal background") + "</b>");
+                       (gframe.LabelWidget as Label).UseMarkup = true;
+                       gframe.ShadowType = ShadowType.None;
+                       
+                       febox = new EventBox();
+                       febox.ButtonPressEvent += OnFieldImageClicked;                  
+                       fieldImage = new Gtk.Image();
+                       img = new Image (
+                               Gdk.Pixbuf.LoadFromResource (Constants.FIELD_BACKGROUND));
+                       img.Scale();
+                       fieldImage.Pixbuf = img.Value; 
+                       
+                       gebox = new EventBox();
+                       gebox.ButtonPressEvent += OnGoalImageClicked;                   
+                       goalImage = new Gtk.Image();
+                       img = new Image (
+                               Gdk.Pixbuf.LoadFromResource (Constants.GOAL_BACKGROUND));
+                       img.Scale();
+                       goalImage.Pixbuf = img.Value;
+                       
+                       fframe.Add(febox);
+                       gframe.Add(gebox);
+                       febox.Add(fieldImage);
+                       gebox.Add(goalImage);
+                       
+                       box = new VBox();
+                       box.PackStart (fframe, false, false, 0);
+                       box.PackStart (gframe, false, false, 0);
+                       box.ShowAll();
+                       box.Sensitive = false;
+                       AddUpperWidget(box);
+               }
+               
+               protected virtual void OnGoalImageClicked (object sender, EventArgs args)
+               {
+                       Pixbuf background;
+                       
+                       background = Helpers.Misc.OpenImage((Gtk.Window)this.Toplevel);
+                       if (background != null) {
+                               Image img = new Image(background);
+                               img.Scale();
+                               Template.GoalBackgroundImage = img; 
+                               goalImage.Pixbuf = img.Value;
+                       }
+               }
+               
+               protected virtual void OnFieldImageClicked (object sender, EventArgs args)
+               {
+                       Pixbuf background;
+                       
+                       background = Helpers.Misc.OpenImage((Gtk.Window)this.Toplevel);
+                       if (background != null) {
+                               Image img = new Image(background);
+                               img.Scale();
+                               Template.FieldBackgroundImage = img; 
+                               fieldImage.Pixbuf = img.Value;
+                       }
+               }
+               
                private void OnCategoryClicked(Category cat)
                {
                        selected = new List<Category> ();
diff --git a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs 
b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
index e7d68c0..6812bd5 100644
--- a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
@@ -31,6 +31,7 @@ using LongoMatch.Store.Templates;
 using LongoMatch.Gui.Dialog;
 using LongoMatch.Gui.Popup;
 using LongoMatch.Gui.Helpers;
+using Point = LongoMatch.Common.Point;
 
 namespace LongoMatch.Gui.Component
 {
@@ -55,6 +56,8 @@ namespace LongoMatch.Gui.Component
                        subcategoriestreeview1.SubCategorySelected += OnSubcategorySelected;
                        leadtimebutton.ValueChanged += OnLeadTimeChanged;;
                        lagtimebutton.ValueChanged += OnLagTimeChanged;
+                       fieldcoordinatestagger.Background = Gdk.Pixbuf.LoadFromResource 
(Constants.FIELD_BACKGROUND);
+                       goalcoordinatestagger.Background = Gdk.Pixbuf.LoadFromResource 
(Constants.GOAL_BACKGROUND);
                }
                
                public bool CanChangeHotkey {
@@ -120,6 +123,8 @@ namespace LongoMatch.Gui.Component
 
                private void  UpdateGui() {
                        ListStore list;
+                       List<Coordinates> coords;
+                       Coordinates c;
                        
                        if(cat == null)
                                return;
@@ -131,6 +136,26 @@ namespace LongoMatch.Gui.Component
                        colorbutton1.Color = Helpers.Misc.ToGdkColor(cat.Color);
                        sortmethodcombobox.Active = (int)cat.SortMethod;
                        
+                       tagfieldcheckbutton.Active = cat.TagFieldPosition;
+                       fieldcoordinatestagger.Visible = cat.TagFieldPosition;
+                       coords = new List<Coordinates>();
+                       c = new Coordinates();
+                       c.Add (new Point (300, 300));
+                       coords.Add (c);
+                       if (cat.FieldPositionIsDistance) {
+                               c.Add (new Point (400, 500));
+                       }
+                       fieldcoordinatestagger.Coordinates = coords;
+                       trajectorycheckbutton.Active = cat.FieldPositionIsDistance;
+                       
+                       taggoalcheckbutton.Active = cat.TagGoalPosition;
+                       coords = new List<Coordinates>();
+                       c = new Coordinates();
+                       c.Add (new Point (100, 100));
+                       coords.Add (c);
+                       goalcoordinatestagger.Coordinates = coords;
+                       goalcoordinatestagger.Visible = cat.TagGoalPosition;
+                       
                        if(cat.HotKey.Defined)
                                hotKeyLabel.Text = cat.HotKey.ToString();
                        else hotKeyLabel.Text = Catalog.GetString("none");
@@ -249,5 +274,34 @@ namespace LongoMatch.Gui.Component
                        subcatnameentry.Text = (model.GetValue(iter, 1) as ISubCategory).Name;
                        addbutton.Sensitive = true;
                }
+               
+               protected void OnTaggoalcheckbuttonClicked (object sender, EventArgs e)
+               {
+                       goalcoordinatestagger.Visible = taggoalcheckbutton.Active;
+                       cat.TagGoalPosition = taggoalcheckbutton.Active;
+               }
+               
+               protected void OnTagfieldcheckbuttonClicked (object sender, EventArgs e)
+               {
+                       fieldcoordinatestagger.Visible = tagfieldcheckbutton.Active;
+                       cat.TagFieldPosition = tagfieldcheckbutton.Active;
+               }
+               
+               protected void OnTrajectorycheckbuttonClicked (object sender, EventArgs e)
+               {
+                       List<Coordinates> coords;
+                       Coordinates c;
+                       
+                       cat.FieldPositionIsDistance = trajectorycheckbutton.Active;
+                       
+                       coords = new List<Coordinates>();
+                       c = new Coordinates();
+                       c.Add (new Point (300, 300));
+                       coords.Add (c);
+                       if (cat.FieldPositionIsDistance) {
+                               c.Add (new Point (400, 500));
+                       }
+                       fieldcoordinatestagger.Coordinates = coords;
+               }
        }
 }
diff --git a/LongoMatch.GUI/Gui/Component/CoordinatesTagger.cs 
b/LongoMatch.GUI/Gui/Component/CoordinatesTagger.cs
new file mode 100644
index 0000000..12fa172
--- /dev/null
+++ b/LongoMatch.GUI/Gui/Component/CoordinatesTagger.cs
@@ -0,0 +1,260 @@
+//
+//  Copyright (C) 2013 Andoni Morales Alastruey
+//
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation; either version 2 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Gdk;
+using Gtk;
+using Cairo;
+using Point = LongoMatch.Common.Point;
+
+using LongoMatch.Common;
+using LongoMatch.Store;
+
+namespace LongoMatch.Gui.Component
+{
+       [System.ComponentModel.ToolboxItem(true)]
+       public partial class CoordinatesTagger : Gtk.Bin
+       {
+               Surface source, coordsSource;
+               List<Coordinates> coordinatesList;
+               Coordinates selectedCoords;
+               Point selectedPoint;
+               int sourceWidth, sourceHeight;
+               double sourceDAR;
+               double xScale, yScale;
+               int yOffset, xOffset;
+               const double ARROW_DEGREES = 0.5;
+               const int ARROW_LENGHT = 15;
+               const int LINE_WIDTH = 20;
+                                               
+               public CoordinatesTagger ()
+               {
+                       Coordinates = new List<Coordinates>();
+                       this.Build ();
+                       drawingarea.ExposeEvent += OnDrawingareaExposeEvent;
+                       drawingarea.ButtonPressEvent += OnDrawingareaButtonPressEvent;
+                       drawingarea.ButtonReleaseEvent += OnDrawingareaButtonReleaseEvent;
+                       drawingarea.MotionNotifyEvent += OnDrawingareaMotionNotifyEvent;
+               }
+               
+               ~CoordinatesTagger() {
+                       if (source != null)
+                               source.Destroy();
+                       if (coordsSource != null)
+                               coordsSource.Destroy();
+               }
+
+               public Pixbuf Background {
+                       set {
+                               sourceWidth = value.Width;
+                               sourceHeight = value.Height;
+                               sourceDAR = (double) sourceWidth / sourceHeight;
+                               source = new ImageSurface(Format.ARGB32,sourceWidth,sourceHeight);
+                               using(Context sourceCR = new Context(source)) {
+                                       CairoHelper.SetSourcePixbuf(sourceCR,value,0,0);
+                                       sourceCR.Paint();
+                               }
+                               RedrawAllCoordinates ();
+                               value.Dispose();
+                               QueueDraw();
+                       }
+               }
+               
+               public List<Coordinates> Coordinates {
+                       set {
+                               coordinatesList = value;
+                               RedrawAllCoordinates ();
+                               QueueDraw ();
+                       }
+                       get {
+                               return coordinatesList;
+                       }
+               }
+               
+               double Distance (Point p1, Point p2) {
+                       double xd = Math.Abs (p1.X - p2.X);
+                       double yd = Math.Abs (p1.Y - p2.Y);
+                       return Math.Sqrt (Math.Pow (xd, 2) + Math.Pow (yd, 2));
+               }
+               
+               void TranslateToOriginCoords (Point point) {
+                       point.X = Math.Max (0, point.X - xOffset);
+                       point.Y = Math.Max (0, point.Y - yOffset);
+                       point.X = Math.Min (sourceWidth, (int) (point.X / xScale));
+                       point.Y = Math.Min (sourceHeight, (int) (point.Y / yScale));
+               }
+               
+               void FindNearestPoint (Point cursor, out Coordinates coords, out Point point) {
+                       double minDistance = Int32.MaxValue;
+                       coords = null;
+                       point = null;
+                       
+                       TranslateToOriginCoords (cursor);
+                       foreach (Coordinates c in Coordinates) {
+                               foreach (Point p in c) {
+                                       double dist = Distance (cursor, p);
+                                       if (dist < minDistance) {
+                                               minDistance = dist;
+                                               coords = c;
+                                               point = p;
+                                       }
+                               }
+                       }
+               }
+               
+               void SetContextProperties(Context c, bool selected) {
+                       c.LineCap = LineCap.Round;
+                       c.LineJoin = LineJoin.Round;
+                       if (selected) {
+                               c.Color = new Cairo.Color (255, 0, 0, 1);
+                       } else {
+                               c.Color = new Cairo.Color (0, 0, 0, 1);
+                       }
+                       c.LineWidth = LINE_WIDTH;
+                       c.Operator = Operator.Source;
+               }
+               
+               void DrawLine(Context c, Point src, Point dest) {
+                       c.MoveTo(src.X, src.Y);
+                       c.LineTo(dest.X, dest.Y);
+                       c.Stroke();
+               }
+               
+               void DrawPoint (Context c, Point location) {
+                       c.Arc (location.X, location.Y, 20, 0, 2 * Math.PI);
+                       c.StrokePreserve();
+                       c.Fill();
+               }
+               
+               void DrawArrow(Context c, Point src, Point dest) {
+                       double vx1,vy1,vx2,vy2;
+                       double angle = Math.Atan2(dest.Y - src.Y, dest.X - src.X) + Math.PI;
+
+                       vx1 = dest.X + (ARROW_LENGHT + LINE_WIDTH) * Math.Cos(angle - ARROW_DEGREES);
+                       vy1 = dest.Y + (ARROW_LENGHT + LINE_WIDTH) * Math.Sin(angle - ARROW_DEGREES);
+                       vx2 = dest.X + (ARROW_LENGHT + LINE_WIDTH) * Math.Cos(angle + ARROW_DEGREES);
+                       vy2 = dest.Y + (ARROW_LENGHT + LINE_WIDTH) * Math.Sin(angle + ARROW_DEGREES);
+
+                       c.MoveTo(dest.X, dest.Y);
+                       c.LineTo(vx1, vy1);
+                       c.MoveTo(dest.X, dest.Y);
+                       c.LineTo(vx2, vy2);
+                       c.Stroke();
+                       c.Fill();
+               }
+
+               
+               void DrawCoordinates (Context context, Coordinates coords) {
+                       SetContextProperties(context, coords == selectedCoords);
+                       for (int i=0; i < coords.Count; i++) {
+                               if (i != 0 && i == coords.Count - 1) {
+                                       DrawArrow (context, coords[i -1], coords [i]);
+                               } else {
+                                       DrawPoint (context, coords[i]);
+                               }
+                               if (i>0) {
+                                       DrawLine (context, coords[i-1], coords[i]);
+                               }
+                       } 
+               }
+               
+               void RedrawAllCoordinates () {
+                       coordsSource = new ImageSurface(Format.ARGB32, sourceWidth, sourceHeight);
+                       using(Context ctx = new Context(coordsSource)) {
+                               foreach (Coordinates c in Coordinates) {
+                                       if (c == selectedCoords)
+                                               continue;
+                                       DrawCoordinates (ctx, c);
+                               }
+                       }
+               }
+               
+               protected virtual void OnDrawingareaButtonPressEvent(object o, Gtk.ButtonPressEventArgs args)
+               {
+                       FindNearestPoint (new Point((int) args.Event.X, (int) args.Event.Y),
+                                         out selectedCoords, out selectedPoint);
+
+                       RedrawAllCoordinates ();
+                       QueueDraw ();
+               }
+
+               protected virtual void OnDrawingareaButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs 
args)
+               {
+                       selectedCoords = null;
+                       RedrawAllCoordinates ();
+                       QueueDraw ();
+               }
+               
+               protected virtual void OnDrawingareaMotionNotifyEvent(object o, Gtk.MotionNotifyEventArgs 
args)
+               {
+                       Point point;
+                       
+                       if (selectedCoords == null) {
+                               return;
+                       }
+                       point = new Point ((int) args.Event.X, (int) args.Event.Y);
+                       TranslateToOriginCoords (point);
+                       selectedPoint.Y = point.Y;
+                       selectedPoint.X = point.X;
+                       QueueDraw();
+               }
+               
+               protected virtual void OnDrawingareaExposeEvent(object o, Gtk.ExposeEventArgs args)
+               {
+                       double dar;
+                       int w,h, destH, destW;
+                       
+                       if (coordsSource == null || source == null) {
+                               return;
+                       }
+                       drawingarea.GdkWindow.Clear();
+
+                       using(Context c = CairoHelper.Create(drawingarea.GdkWindow)) {
+                               w = drawingarea.Allocation.Width;
+                               h = drawingarea.Allocation.Height;
+                               dar = (double) w / h;
+                               
+                               if (sourceDAR > dar) {
+                                       destW = w;
+                                       destH = (int) (w / sourceDAR);
+                                       xOffset = 0;
+                                       yOffset = (h - destH) / 2;
+                               } else {
+                                       destH = h;
+                                       destW = (int) (h * sourceDAR);
+                                       xOffset = (w - destW) / 2;
+                                       yOffset = 0;
+                               }
+                               c.Translate (xOffset, yOffset);
+                               xScale = (double) destW / sourceWidth;
+                               yScale = (double) destH / sourceHeight;
+                               
+                               c.Scale(xScale, yScale);
+                               c.SetSourceSurface(source, 0, 0);
+                               c.Paint();
+                               c.SetSourceSurface(coordsSource, 0, 0);
+                               c.Paint();
+                               if (selectedCoords != null) {
+                                       DrawCoordinates (c, selectedCoords);
+                               }
+                       }
+               }
+       }
+}
+
diff --git a/LongoMatch.GUI/Gui/Dialog/TaggerDialog.cs b/LongoMatch.GUI/Gui/Dialog/TaggerDialog.cs
index c81c72d..f55b552 100644
--- a/LongoMatch.GUI/Gui/Dialog/TaggerDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/TaggerDialog.cs
@@ -33,10 +33,12 @@ namespace LongoMatch.Gui.Dialog
        {
                private TeamTemplate localTeamTemplate;
                private TeamTemplate visitorTeamTemplate;
-               bool showAllSubcateogires;
                
-               public TaggerDialog(Play play, TeamTemplate localTeamTemplate,
-                                   TeamTemplate visitorTeamTemplate, bool showAllSubcategories)
+               public TaggerDialog(Play play,
+                                   Categories categoriesTemplate,
+                                   TeamTemplate localTeamTemplate,
+                                   TeamTemplate visitorTeamTemplate,
+                                   bool showAllSubcategories)
                {
                        this.Build();
                        
@@ -57,7 +59,7 @@ namespace LongoMatch.Gui.Dialog
                                        AddTagSubcategory(tagcat, play.Tags);
                                } else if (subcat is PlayerSubCategory) {
                                        playersnotebook.Visible = false;
-                                       hbox1.SetChildPacking(tagsnotebook, false, false, 0, 
Gtk.PackType.Start);
+                                       hbox.SetChildPacking(tagsnotebook, false, false, 0, 
Gtk.PackType.Start);
                                        var tagcat = subcat as PlayerSubCategory;
                                        AddPlayerSubcategory(tagcat, play.Players);
                                } else if (subcat is TeamSubCategory) {
@@ -67,6 +69,18 @@ namespace LongoMatch.Gui.Dialog
                                                           visitorTeamTemplate.TeamName);
                                }
                        }
+                       
+                       if (!play.Category.TagFieldPosition && !play.Category.TagGoalPosition) {
+                               poshbox.Visible = false;
+                               (vbox2[hbox] as Gtk.Box.BoxChild).Expand = true;
+                       } else {
+                               if (play.Category.TagFieldPosition) {
+                                       AddFieldPosTagger (categoriesTemplate, play);                         
  
+                               }
+                               if (play.Category.TagGoalPosition) {
+                                       AddGoalPosTagger (categoriesTemplate, play);
+                               }
+                       }
                }
                
                public void AddTeamSubcategory (TeamSubCategory subcat, TeamsTagStore tags,
@@ -96,6 +110,47 @@ namespace LongoMatch.Gui.Dialog
                        widget.Show();
                        playersbox.PackStart(widget, true, true, 0);
                }
+               
+               public void AddFieldPosTagger (Categories categoriesTemplate, Play play) {
+                       List<Coordinates> coords = new List<Coordinates>();
+                       fieldcoordinatestagger.Visible = true;
+                       if (categoriesTemplate.FieldBackgroundImage != null) {
+                               fieldcoordinatestagger.Background = 
categoriesTemplate.FieldBackgroundImage.Value;
+                       } else {
+                               fieldcoordinatestagger.Background = Gdk.Pixbuf.LoadFromResource 
(Constants.FIELD_BACKGROUND);
+                       }
+                       if (play.FieldPosition != null) {
+                               coords.Add (play.FieldPosition);
+                       } else {
+                               Coordinates c = new Coordinates ();
+                               c.Add (new Point(0, 0));
+                               if (play.Category.FieldPositionIsDistance) {
+                                       c.Add (new Point (0, 10));
+                               }
+                               coords.Add (c);
+                       }
+                       fieldcoordinatestagger.Coordinates = coords;
+                       fieldcoordinatestagger.Visible = true; 
+               }
+               
+               public void AddGoalPosTagger (Categories categoriesTemplate, Play play) {
+                       List<Coordinates> coords = new List<Coordinates>();
+                       goalcoordinatestagger.Visible = true;
+                       if (categoriesTemplate.GoalBackgroundImage != null) {
+                               goalcoordinatestagger.Background = 
categoriesTemplate.GoalBackgroundImage.Value;
+                       } else {
+                               goalcoordinatestagger.Background = Gdk.Pixbuf.LoadFromResource 
(Constants.GOAL_BACKGROUND);
+                       }
+                       if (play.GoalPosition != null) {
+                               coords.Add (play.GoalPosition);
+                       } else {
+                               Coordinates c = new Coordinates ();
+                               c.Add (new Point(0, 0));
+                               coords.Add (c);
+                       }
+                       goalcoordinatestagger.Coordinates = coords; 
+                       goalcoordinatestagger.Visible = true;
+               }
 
        }
 }
diff --git a/LongoMatch.GUI/Gui/GUIToolkit.cs b/LongoMatch.GUI/Gui/GUIToolkit.cs
index b5368c4..22c7dec 100644
--- a/LongoMatch.GUI/Gui/GUIToolkit.cs
+++ b/LongoMatch.GUI/Gui/GUIToolkit.cs
@@ -194,8 +194,8 @@ namespace LongoMatch.Gui
                                sd.Destroy();
                }
                
-               public void TagPlay (Play play, TeamTemplate local, TeamTemplate visitor, bool showAllTags) {
-                       TaggerDialog tg = new TaggerDialog(play, local, visitor, showAllTags);
+               public void TagPlay (Play play, Categories categories, TeamTemplate local, TeamTemplate 
visitor, bool showAllTags) {
+                       TaggerDialog tg = new TaggerDialog(play, categories, local, visitor, showAllTags);
                        tg.TransientFor = mainWindow as Gtk.Window;
                        tg.Run();
                        tg.Destroy();
diff --git a/LongoMatch.GUI/Gui/Helpers/MessagesHelpers.cs b/LongoMatch.GUI/Gui/Helpers/MessagesHelpers.cs
index 0b1ada7..86aeefb 100644
--- a/LongoMatch.GUI/Gui/Helpers/MessagesHelpers.cs
+++ b/LongoMatch.GUI/Gui/Helpers/MessagesHelpers.cs
@@ -52,7 +52,7 @@ namespace LongoMatch.Gui.Helpers
                                                             MessageType.Question, ButtonsType.YesNo,
                                                             question);
                                
-                       md.Icon = Stetic.IconLoader.LoadIcon(md, "longomatch", IconSize.Button);
+                       md.Icon =  Stetic.IconLoader.LoadIcon(md, "longomatch", IconSize.Button);
                        md.Title = title;
                        var res = md.Run();
                        md.Destroy();
diff --git a/LongoMatch.GUI/LongoMatch.GUI.mdp b/LongoMatch.GUI/LongoMatch.GUI.mdp
index b04ad80..3873bb0 100644
--- a/LongoMatch.GUI/LongoMatch.GUI.mdp
+++ b/LongoMatch.GUI/LongoMatch.GUI.mdp
@@ -163,6 +163,10 @@
     <File subtype="Code" buildaction="Compile" name="Gui/Helpers/Misc.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Helpers/FileChooserHelper.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Helpers/MessagesHelpers.cs" />
+    <File subtype="Code" buildaction="Compile" name="Gui/Component/CoordinatesTagger.cs" />
+    <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.CoordinatesTagger.cs" 
/>
+    <File subtype="Code" buildaction="EmbedAsResource" name="../images/field_background.svg" />
+    <File subtype="Code" buildaction="EmbedAsResource" name="../images/goal_background.svg" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="atk-sharp, Version=2.12.0.0, Culture=neutral, 
PublicKeyToken=35e10195dab3c99f" />
diff --git a/LongoMatch.GUI/Makefile.am b/LongoMatch.GUI/Makefile.am
index 9cc2ff9..6fc2b65 100644
--- a/LongoMatch.GUI/Makefile.am
+++ b/LongoMatch.GUI/Makefile.am
@@ -9,6 +9,7 @@ SOURCES = \
        gtk-gui/LongoMatch.Gui.Base.TimelineWidgetBase.cs \
        gtk-gui/LongoMatch.Gui.Component.ButtonsWidget.cs \
        gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs \
+       gtk-gui/LongoMatch.Gui.Component.CoordinatesTagger.cs \
        gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs \
        gtk-gui/LongoMatch.Gui.Component.DrawingWidget.cs \
        gtk-gui/LongoMatch.Gui.Component.GameUnitsEditor.cs \
@@ -61,6 +62,7 @@ SOURCES = \
        Gui/Component/ButtonsWidget.cs \
        Gui/Component/CategoriesTemplateEditor.cs \
        Gui/Component/CategoryProperties.cs \
+       Gui/Component/CoordinatesTagger.cs \
        Gui/Component/DrawingToolBox.cs \
        Gui/Component/DrawingWidget.cs \
        Gui/Component/GameUnitsEditor.cs \
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
index e6e27b4..7118008 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
@@ -7,6 +7,7 @@ namespace LongoMatch.Gui.Component
                private global::Gtk.VBox vbox2;
                private global::Gtk.Frame frame4;
                private global::Gtk.Alignment GtkAlignment1;
+               private global::Gtk.VBox vbox3;
                private global::Gtk.Table table2;
                private global::Gtk.ColorButton colorbutton1;
                private global::Gtk.HBox hbox5;
@@ -22,7 +23,15 @@ namespace LongoMatch.Gui.Component
                private global::Gtk.SpinButton leadtimebutton;
                private global::Gtk.Entry nameentry;
                private global::Gtk.ComboBox sortmethodcombobox;
-               private global::Gtk.Label GtkLabel1;
+               private global::Gtk.VBox vbox5;
+               private global::Gtk.Table table1;
+               private global::Gtk.CheckButton tagfieldcheckbutton;
+               private global::Gtk.CheckButton taggoalcheckbutton;
+               private global::Gtk.CheckButton trajectorycheckbutton;
+               private global::Gtk.Table table3;
+               private global::LongoMatch.Gui.Component.CoordinatesTagger fieldcoordinatestagger;
+               private global::LongoMatch.Gui.Component.CoordinatesTagger goalcoordinatestagger;
+               private global::Gtk.Label GtkLabel4;
                private global::Gtk.Frame frame3;
                private global::Gtk.Alignment GtkAlignment3;
                private global::Gtk.VBox vbox1;
@@ -32,13 +41,13 @@ namespace LongoMatch.Gui.Component
                private global::Gtk.Frame frame1;
                private global::Gtk.Alignment GtkAlignment4;
                private global::Gtk.Entry subcatnameentry;
-               private global::Gtk.Label GtkLabel3;
+               private global::Gtk.Label GtkLabel5;
                private global::Gtk.Frame frame2;
                private global::Gtk.Alignment GtkAlignment5;
                private global::Gtk.ComboBox subcatcombobox;
-               private global::Gtk.Label GtkLabel4;
+               private global::Gtk.Label GtkLabel6;
                private global::Gtk.Button addbutton;
-               private global::Gtk.Label GtkLabel5;
+               private global::Gtk.Label GtkLabel8;
                
                protected virtual void Build ()
                {
@@ -59,6 +68,10 @@ namespace LongoMatch.Gui.Component
                        this.GtkAlignment1.Name = "GtkAlignment1";
                        this.GtkAlignment1.LeftPadding = ((uint)(12));
                        // Container child GtkAlignment1.Gtk.Container+ContainerChild
+                       this.vbox3 = new global::Gtk.VBox ();
+                       this.vbox3.Name = "vbox3";
+                       this.vbox3.Spacing = 6;
+                       // Container child vbox3.Gtk.Box+BoxChild
                        this.table2 = new global::Gtk.Table (((uint)(3)), ((uint)(4)), false);
                        this.table2.Name = "table2";
                        this.table2.RowSpacing = ((uint)(6));
@@ -237,18 +250,94 @@ namespace LongoMatch.Gui.Component
                        w14.RightAttach = ((uint)(4));
                        w14.XOptions = ((global::Gtk.AttachOptions)(4));
                        w14.YOptions = ((global::Gtk.AttachOptions)(0));
-                       this.GtkAlignment1.Add (this.table2);
+                       this.vbox3.Add (this.table2);
+                       global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.table2]));
+                       w15.Position = 0;
+                       w15.Expand = false;
+                       w15.Fill = false;
+                       // Container child vbox3.Gtk.Box+BoxChild
+                       this.vbox5 = new global::Gtk.VBox ();
+                       this.vbox5.Name = "vbox5";
+                       this.vbox5.Spacing = 6;
+                       // Container child vbox5.Gtk.Box+BoxChild
+                       this.table1 = new global::Gtk.Table (((uint)(2)), ((uint)(2)), true);
+                       this.table1.Name = "table1";
+                       this.table1.RowSpacing = ((uint)(6));
+                       this.table1.ColumnSpacing = ((uint)(6));
+                       // Container child table1.Gtk.Table+TableChild
+                       this.tagfieldcheckbutton = new global::Gtk.CheckButton ();
+                       this.tagfieldcheckbutton.CanFocus = true;
+                       this.tagfieldcheckbutton.Name = "tagfieldcheckbutton";
+                       this.tagfieldcheckbutton.Label = global::Mono.Unix.Catalog.GetString ("Tag field 
position");
+                       this.tagfieldcheckbutton.Active = true;
+                       this.tagfieldcheckbutton.DrawIndicator = true;
+                       this.tagfieldcheckbutton.UseUnderline = true;
+                       this.table1.Add (this.tagfieldcheckbutton);
+                       global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1 
[this.tagfieldcheckbutton]));
+                       w16.YOptions = ((global::Gtk.AttachOptions)(4));
+                       // Container child table1.Gtk.Table+TableChild
+                       this.taggoalcheckbutton = new global::Gtk.CheckButton ();
+                       this.taggoalcheckbutton.CanFocus = true;
+                       this.taggoalcheckbutton.Name = "taggoalcheckbutton";
+                       this.taggoalcheckbutton.Label = global::Mono.Unix.Catalog.GetString ("Tag goal 
position");
+                       this.taggoalcheckbutton.DrawIndicator = true;
+                       this.taggoalcheckbutton.UseUnderline = true;
+                       this.table1.Add (this.taggoalcheckbutton);
+                       global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.table1 
[this.taggoalcheckbutton]));
+                       w17.LeftAttach = ((uint)(1));
+                       w17.RightAttach = ((uint)(2));
+                       w17.YOptions = ((global::Gtk.AttachOptions)(4));
+                       // Container child table1.Gtk.Table+TableChild
+                       this.trajectorycheckbutton = new global::Gtk.CheckButton ();
+                       this.trajectorycheckbutton.CanFocus = true;
+                       this.trajectorycheckbutton.Name = "trajectorycheckbutton";
+                       this.trajectorycheckbutton.Label = global::Mono.Unix.Catalog.GetString ("Trajectory");
+                       this.trajectorycheckbutton.DrawIndicator = true;
+                       this.trajectorycheckbutton.UseUnderline = true;
+                       this.table1.Add (this.trajectorycheckbutton);
+                       global::Gtk.Table.TableChild w18 = ((global::Gtk.Table.TableChild)(this.table1 
[this.trajectorycheckbutton]));
+                       w18.TopAttach = ((uint)(1));
+                       w18.BottomAttach = ((uint)(2));
+                       w18.YOptions = ((global::Gtk.AttachOptions)(4));
+                       this.vbox5.Add (this.table1);
+                       global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.table1]));
+                       w19.Position = 0;
+                       w19.Expand = false;
+                       w19.Fill = false;
+                       // Container child vbox5.Gtk.Box+BoxChild
+                       this.table3 = new global::Gtk.Table (((uint)(1)), ((uint)(2)), true);
+                       this.table3.Name = "table3";
+                       this.table3.RowSpacing = ((uint)(6));
+                       this.table3.ColumnSpacing = ((uint)(6));
+                       // Container child table3.Gtk.Table+TableChild
+                       this.fieldcoordinatestagger = new global::LongoMatch.Gui.Component.CoordinatesTagger 
();
+                       this.fieldcoordinatestagger.Events = ((global::Gdk.EventMask)(256));
+                       this.fieldcoordinatestagger.Name = "fieldcoordinatestagger";
+                       this.table3.Add (this.fieldcoordinatestagger);
+                       // Container child table3.Gtk.Table+TableChild
+                       this.goalcoordinatestagger = new global::LongoMatch.Gui.Component.CoordinatesTagger 
();
+                       this.goalcoordinatestagger.Events = ((global::Gdk.EventMask)(256));
+                       this.goalcoordinatestagger.Name = "goalcoordinatestagger";
+                       this.table3.Add (this.goalcoordinatestagger);
+                       global::Gtk.Table.TableChild w21 = ((global::Gtk.Table.TableChild)(this.table3 
[this.goalcoordinatestagger]));
+                       w21.LeftAttach = ((uint)(1));
+                       w21.RightAttach = ((uint)(2));
+                       this.vbox5.Add (this.table3);
+                       global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.table3]));
+                       w22.Position = 1;
+                       this.vbox3.Add (this.vbox5);
+                       global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.vbox5]));
+                       w23.Position = 1;
+                       this.GtkAlignment1.Add (this.vbox3);
                        this.frame4.Add (this.GtkAlignment1);
-                       this.GtkLabel1 = new global::Gtk.Label ();
-                       this.GtkLabel1.Name = "GtkLabel1";
-                       this.GtkLabel1.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Properties</b>");
-                       this.GtkLabel1.UseMarkup = true;
-                       this.frame4.LabelWidget = this.GtkLabel1;
+                       this.GtkLabel4 = new global::Gtk.Label ();
+                       this.GtkLabel4.Name = "GtkLabel4";
+                       this.GtkLabel4.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Properties</b>");
+                       this.GtkLabel4.UseMarkup = true;
+                       this.frame4.LabelWidget = this.GtkLabel4;
                        this.vbox2.Add (this.frame4);
-                       global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.frame4]));
-                       w17.Position = 0;
-                       w17.Expand = false;
-                       w17.Fill = false;
+                       global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.frame4]));
+                       w26.Position = 0;
                        // Container child vbox2.Gtk.Box+BoxChild
                        this.frame3 = new global::Gtk.Frame ();
                        this.frame3.Name = "frame3";
@@ -271,8 +360,8 @@ namespace LongoMatch.Gui.Component
                        this.subcategoriestreeview1.Name = "subcategoriestreeview1";
                        this.GtkScrolledWindow.Add (this.subcategoriestreeview1);
                        this.vbox1.Add (this.GtkScrolledWindow);
-                       global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox1 
[this.GtkScrolledWindow]));
-                       w19.Position = 0;
+                       global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox1 
[this.GtkScrolledWindow]));
+                       w28.Position = 0;
                        // Container child vbox1.Gtk.Box+BoxChild
                        this.hbox3 = new global::Gtk.HBox ();
                        this.hbox3.Name = "hbox3";
@@ -293,16 +382,16 @@ namespace LongoMatch.Gui.Component
                        this.subcatnameentry.InvisibleChar = '•';
                        this.GtkAlignment4.Add (this.subcatnameentry);
                        this.frame1.Add (this.GtkAlignment4);
-                       this.GtkLabel3 = new global::Gtk.Label ();
-                       this.GtkLabel3.Name = "GtkLabel3";
-                       this.GtkLabel3.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Subcategory 
name</b>");
-                       this.GtkLabel3.UseMarkup = true;
-                       this.frame1.LabelWidget = this.GtkLabel3;
+                       this.GtkLabel5 = new global::Gtk.Label ();
+                       this.GtkLabel5.Name = "GtkLabel5";
+                       this.GtkLabel5.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Subcategory 
name</b>");
+                       this.GtkLabel5.UseMarkup = true;
+                       this.frame1.LabelWidget = this.GtkLabel5;
                        this.hbox3.Add (this.frame1);
-                       global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.frame1]));
-                       w22.Position = 0;
-                       w22.Expand = false;
-                       w22.Fill = false;
+                       global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.frame1]));
+                       w31.Position = 0;
+                       w31.Expand = false;
+                       w31.Fill = false;
                        // Container child hbox3.Gtk.Box+BoxChild
                        this.frame2 = new global::Gtk.Frame ();
                        this.frame2.Name = "frame2";
@@ -316,14 +405,14 @@ namespace LongoMatch.Gui.Component
                        this.subcatcombobox.Name = "subcatcombobox";
                        this.GtkAlignment5.Add (this.subcatcombobox);
                        this.frame2.Add (this.GtkAlignment5);
-                       this.GtkLabel4 = new global::Gtk.Label ();
-                       this.GtkLabel4.Name = "GtkLabel4";
-                       this.GtkLabel4.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Subcategory 
type</b>");
-                       this.GtkLabel4.UseMarkup = true;
-                       this.frame2.LabelWidget = this.GtkLabel4;
+                       this.GtkLabel6 = new global::Gtk.Label ();
+                       this.GtkLabel6.Name = "GtkLabel6";
+                       this.GtkLabel6.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Subcategory 
type</b>");
+                       this.GtkLabel6.UseMarkup = true;
+                       this.frame2.LabelWidget = this.GtkLabel6;
                        this.hbox3.Add (this.frame2);
-                       global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.frame2]));
-                       w25.Position = 1;
+                       global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.frame2]));
+                       w34.Position = 1;
                        // Container child hbox3.Gtk.Box+BoxChild
                        this.addbutton = new global::Gtk.Button ();
                        this.addbutton.TooltipMarkup = "Add this subcategory";
@@ -332,41 +421,41 @@ namespace LongoMatch.Gui.Component
                        this.addbutton.Name = "addbutton";
                        this.addbutton.UseUnderline = true;
                        // Container child addbutton.Gtk.Container+ContainerChild
-                       global::Gtk.Alignment w26 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
+                       global::Gtk.Alignment w35 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
                        // Container child GtkAlignment.Gtk.Container+ContainerChild
-                       global::Gtk.HBox w27 = new global::Gtk.HBox ();
-                       w27.Spacing = 2;
+                       global::Gtk.HBox w36 = new global::Gtk.HBox ();
+                       w36.Spacing = 2;
                        // Container child GtkHBox.Gtk.Container+ContainerChild
-                       global::Gtk.Image w28 = new global::Gtk.Image ();
-                       w28.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-add", 
global::Gtk.IconSize.Menu);
-                       w27.Add (w28);
+                       global::Gtk.Image w37 = new global::Gtk.Image ();
+                       w37.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-add", 
global::Gtk.IconSize.Menu);
+                       w36.Add (w37);
                        // Container child GtkHBox.Gtk.Container+ContainerChild
-                       global::Gtk.Label w30 = new global::Gtk.Label ();
-                       w30.LabelProp = global::Mono.Unix.Catalog.GetString ("_Add subcategory");
-                       w30.UseUnderline = true;
-                       w27.Add (w30);
-                       w26.Add (w27);
-                       this.addbutton.Add (w26);
+                       global::Gtk.Label w39 = new global::Gtk.Label ();
+                       w39.LabelProp = global::Mono.Unix.Catalog.GetString ("_Add subcategory");
+                       w39.UseUnderline = true;
+                       w36.Add (w39);
+                       w35.Add (w36);
+                       this.addbutton.Add (w35);
                        this.hbox3.Add (this.addbutton);
-                       global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.hbox3 
[this.addbutton]));
-                       w34.Position = 2;
-                       w34.Expand = false;
-                       w34.Fill = false;
+                       global::Gtk.Box.BoxChild w43 = ((global::Gtk.Box.BoxChild)(this.hbox3 
[this.addbutton]));
+                       w43.Position = 2;
+                       w43.Expand = false;
+                       w43.Fill = false;
                        this.vbox1.Add (this.hbox3);
-                       global::Gtk.Box.BoxChild w35 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox3]));
-                       w35.Position = 1;
-                       w35.Expand = false;
-                       w35.Fill = false;
+                       global::Gtk.Box.BoxChild w44 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox3]));
+                       w44.Position = 1;
+                       w44.Expand = false;
+                       w44.Fill = false;
                        this.GtkAlignment3.Add (this.vbox1);
                        this.frame3.Add (this.GtkAlignment3);
-                       this.GtkLabel5 = new global::Gtk.Label ();
-                       this.GtkLabel5.Name = "GtkLabel5";
-                       this.GtkLabel5.LabelProp = global::Mono.Unix.Catalog.GetString 
("<b>Subcategories</b>");
-                       this.GtkLabel5.UseMarkup = true;
-                       this.frame3.LabelWidget = this.GtkLabel5;
+                       this.GtkLabel8 = new global::Gtk.Label ();
+                       this.GtkLabel8.Name = "GtkLabel8";
+                       this.GtkLabel8.LabelProp = global::Mono.Unix.Catalog.GetString 
("<b>Subcategories</b>");
+                       this.GtkLabel8.UseMarkup = true;
+                       this.frame3.LabelWidget = this.GtkLabel8;
                        this.vbox2.Add (this.frame3);
-                       global::Gtk.Box.BoxChild w38 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.frame3]));
-                       w38.Position = 1;
+                       global::Gtk.Box.BoxChild w47 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.frame3]));
+                       w47.Position = 1;
                        this.Add (this.vbox2);
                        if ((this.Child != null)) {
                                this.Child.ShowAll ();
@@ -376,6 +465,9 @@ namespace LongoMatch.Gui.Component
                        this.nameentry.Changed += new global::System.EventHandler (this.OnNameentryChanged);
                        this.changebuton.Clicked += new global::System.EventHandler 
(this.OnChangebutonClicked);
                        this.colorbutton1.ColorSet += new global::System.EventHandler 
(this.OnColorbutton1ColorSet);
+                       this.trajectorycheckbutton.Clicked += new global::System.EventHandler 
(this.OnTrajectorycheckbuttonClicked);
+                       this.taggoalcheckbutton.Clicked += new global::System.EventHandler 
(this.OnTaggoalcheckbuttonClicked);
+                       this.tagfieldcheckbutton.Clicked += new global::System.EventHandler 
(this.OnTagfieldcheckbuttonClicked);
                        this.subcatcombobox.Changed += new global::System.EventHandler 
(this.OnSubcatcomboboxChanged);
                        this.addbutton.Clicked += new global::System.EventHandler (this.OnAddbuttonClicked);
                }
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CoordinatesTagger.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CoordinatesTagger.cs
new file mode 100644
index 0000000..5b04a30
--- /dev/null
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CoordinatesTagger.cs
@@ -0,0 +1,26 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace LongoMatch.Gui.Component
+{
+       public partial class CoordinatesTagger
+       {
+               private global::Gtk.DrawingArea drawingarea;
+               
+               protected virtual void Build ()
+               {
+                       global::Stetic.Gui.Initialize (this);
+                       // Widget LongoMatch.Gui.Component.CoordinatesTagger
+                       global::Stetic.BinContainer.Attach (this);
+                       this.Name = "LongoMatch.Gui.Component.CoordinatesTagger";
+                       // Container child 
LongoMatch.Gui.Component.CoordinatesTagger.Gtk.Container+ContainerChild
+                       this.drawingarea = new global::Gtk.DrawingArea ();
+                       this.drawingarea.Events = ((global::Gdk.EventMask)(784));
+                       this.drawingarea.Name = "drawingarea";
+                       this.Add (this.drawingarea);
+                       if ((this.Child != null)) {
+                               this.Child.ShowAll ();
+                       }
+                       this.Hide ();
+               }
+       }
+}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs
index 56496e2..38ecb8b 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs
@@ -80,6 +80,7 @@ namespace LongoMatch.Gui.Component
                        this.vbox3.Add (this.table1);
                        global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.table1]));
                        w6.Position = 1;
+                       w6.Expand = false;
                        this.vbox2.Add (this.vbox3);
                        global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.vbox3]));
                        w7.Position = 0;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs
index de455d1..e7e5200 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs
@@ -4,13 +4,17 @@ namespace LongoMatch.Gui.Dialog
 {
        public partial class TaggerDialog
        {
-               private global::Gtk.HBox hbox1;
+               private global::Gtk.VBox vbox2;
+               private global::Gtk.HBox hbox;
                private global::Gtk.Notebook tagsnotebook;
                private global::LongoMatch.Gui.Component.TaggerWidget taggerwidget1;
                private global::Gtk.Label label1;
                private global::Gtk.Notebook playersnotebook;
                private global::Gtk.VBox playersbox;
                private global::Gtk.Label label2;
+               private global::Gtk.HBox poshbox;
+               private global::LongoMatch.Gui.Component.CoordinatesTagger fieldcoordinatestagger;
+               private global::LongoMatch.Gui.Component.CoordinatesTagger goalcoordinatestagger;
                private global::Gtk.Button buttonOk;
                
                protected virtual void Build ()
@@ -26,10 +30,13 @@ namespace LongoMatch.Gui.Dialog
                        w1.Name = "dialog1_VBox";
                        w1.BorderWidth = ((uint)(2));
                        // Container child dialog1_VBox.Gtk.Box+BoxChild
-                       this.hbox1 = new global::Gtk.HBox ();
-                       this.hbox1.Name = "hbox1";
-                       this.hbox1.Spacing = 6;
-                       // Container child hbox1.Gtk.Box+BoxChild
+                       this.vbox2 = new global::Gtk.VBox ();
+                       this.vbox2.Name = "vbox2";
+                       // Container child vbox2.Gtk.Box+BoxChild
+                       this.hbox = new global::Gtk.HBox ();
+                       this.hbox.Name = "hbox";
+                       this.hbox.Spacing = 6;
+                       // Container child hbox.Gtk.Box+BoxChild
                        this.tagsnotebook = new global::Gtk.Notebook ();
                        this.tagsnotebook.CanFocus = true;
                        this.tagsnotebook.Name = "tagsnotebook";
@@ -45,10 +52,10 @@ namespace LongoMatch.Gui.Dialog
                        this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("Tags");
                        this.tagsnotebook.SetTabLabel (this.taggerwidget1, this.label1);
                        this.label1.ShowAll ();
-                       this.hbox1.Add (this.tagsnotebook);
-                       global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 
[this.tagsnotebook]));
+                       this.hbox.Add (this.tagsnotebook);
+                       global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox 
[this.tagsnotebook]));
                        w3.Position = 0;
-                       // Container child hbox1.Gtk.Box+BoxChild
+                       // Container child hbox.Gtk.Box+BoxChild
                        this.playersnotebook = new global::Gtk.Notebook ();
                        this.playersnotebook.CanFocus = true;
                        this.playersnotebook.Name = "playersnotebook";
@@ -64,18 +71,42 @@ namespace LongoMatch.Gui.Dialog
                        this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("Players");
                        this.playersnotebook.SetTabLabel (this.playersbox, this.label2);
                        this.label2.ShowAll ();
-                       this.hbox1.Add (this.playersnotebook);
-                       global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox1 
[this.playersnotebook]));
+                       this.hbox.Add (this.playersnotebook);
+                       global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox 
[this.playersnotebook]));
                        w5.Position = 1;
-                       w1.Add (this.hbox1);
-                       global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w1 [this.hbox1]));
+                       this.vbox2.Add (this.hbox);
+                       global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox]));
                        w6.Position = 0;
+                       w6.Expand = false;
+                       // Container child vbox2.Gtk.Box+BoxChild
+                       this.poshbox = new global::Gtk.HBox ();
+                       this.poshbox.Name = "poshbox";
+                       // Container child poshbox.Gtk.Box+BoxChild
+                       this.fieldcoordinatestagger = new global::LongoMatch.Gui.Component.CoordinatesTagger 
();
+                       this.fieldcoordinatestagger.Events = ((global::Gdk.EventMask)(256));
+                       this.fieldcoordinatestagger.Name = "fieldcoordinatestagger";
+                       this.poshbox.Add (this.fieldcoordinatestagger);
+                       global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.poshbox 
[this.fieldcoordinatestagger]));
+                       w7.Position = 0;
+                       // Container child poshbox.Gtk.Box+BoxChild
+                       this.goalcoordinatestagger = new global::LongoMatch.Gui.Component.CoordinatesTagger 
();
+                       this.goalcoordinatestagger.Events = ((global::Gdk.EventMask)(256));
+                       this.goalcoordinatestagger.Name = "goalcoordinatestagger";
+                       this.poshbox.Add (this.goalcoordinatestagger);
+                       global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.poshbox 
[this.goalcoordinatestagger]));
+                       w8.Position = 1;
+                       this.vbox2.Add (this.poshbox);
+                       global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.poshbox]));
+                       w9.Position = 1;
+                       w1.Add (this.vbox2);
+                       global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox2]));
+                       w10.Position = 0;
                        // Internal child LongoMatch.Gui.Dialog.TaggerDialog.ActionArea
-                       global::Gtk.HButtonBox w7 = this.ActionArea;
-                       w7.Name = "dialog1_ActionArea";
-                       w7.Spacing = 6;
-                       w7.BorderWidth = ((uint)(5));
-                       w7.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+                       global::Gtk.HButtonBox w11 = this.ActionArea;
+                       w11.Name = "dialog1_ActionArea";
+                       w11.Spacing = 6;
+                       w11.BorderWidth = ((uint)(5));
+                       w11.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
                        // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
                        this.buttonOk = new global::Gtk.Button ();
                        this.buttonOk.CanDefault = true;
@@ -85,14 +116,16 @@ namespace LongoMatch.Gui.Dialog
                        this.buttonOk.UseUnderline = true;
                        this.buttonOk.Label = "gtk-ok";
                        this.AddActionWidget (this.buttonOk, -5);
-                       global::Gtk.ButtonBox.ButtonBoxChild w8 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w7 
[this.buttonOk]));
-                       w8.Expand = false;
-                       w8.Fill = false;
+                       global::Gtk.ButtonBox.ButtonBoxChild w12 = 
((global::Gtk.ButtonBox.ButtonBoxChild)(w11 [this.buttonOk]));
+                       w12.Expand = false;
+                       w12.Fill = false;
                        if ((this.Child != null)) {
                                this.Child.ShowAll ();
                        }
-                       this.DefaultWidth = 636;
-                       this.DefaultHeight = 278;
+                       this.DefaultWidth = 644;
+                       this.DefaultHeight = 569;
+                       this.fieldcoordinatestagger.Hide ();
+                       this.goalcoordinatestagger.Hide ();
                        this.Show ();
                }
        }
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
index 7e20746..f8a5156 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -144,7 +144,7 @@ namespace LongoMatch.Gui
                        this.ManualTaggingViewAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Free 
Capture Mode");
                        w1.Add (this.ManualTaggingViewAction, "<Control>f");
                        this.GameUnitsViewAction = new global::Gtk.RadioAction ("GameUnitsViewAction", 
global::Mono.Unix.Catalog.GetString ("Game units view"), null, null, 0);
-                       this.GameUnitsViewAction.Group = this.TaggingViewAction.Group;
+                       this.GameUnitsViewAction.Group = this.ManualTaggingViewAction.Group;
                        this.GameUnitsViewAction.Sensitive = false;
                        this.GameUnitsViewAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Game 
units view");
                        w1.Add (this.GameUnitsViewAction, null);
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index f5aa1eb..0f6bd86 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -2123,7 +2123,7 @@
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.CategoryProperties" design-size="516 487">
+  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.CategoryProperties" design-size="516 472">
     <property name="MemberName" />
     <child>
       <widget class="Gtk.VBox" id="vbox2">
@@ -2140,42 +2140,406 @@
                 <property name="Yalign">0</property>
                 <property name="LeftPadding">12</property>
                 <child>
-                  <widget class="Gtk.Table" id="table2">
+                  <widget class="Gtk.VBox" id="vbox3">
                     <property name="MemberName" />
-                    <property name="NRows">3</property>
-                    <property name="NColumns">4</property>
-                    <property name="RowSpacing">6</property>
-                    <property name="ColumnSpacing">6</property>
+                    <property name="Spacing">6</property>
                     <child>
-                      <widget class="Gtk.ColorButton" id="colorbutton1">
+                      <widget class="Gtk.Table" id="table2">
                         <property name="MemberName" />
-                        <property name="CanFocus">True</property>
-                        <property name="Events">ButtonMotionMask, ButtonPressMask, 
ButtonReleaseMask</property>
-                        <property name="Alpha">-1</property>
-                        <signal name="ColorSet" handler="OnColorbutton1ColorSet" />
+                        <property name="NRows">3</property>
+                        <property name="NColumns">4</property>
+                        <property name="RowSpacing">6</property>
+                        <property name="ColumnSpacing">6</property>
+                        <child>
+                          <widget class="Gtk.ColorButton" id="colorbutton1">
+                            <property name="MemberName" />
+                            <property name="CanFocus">True</property>
+                            <property name="Events">ButtonMotionMask, ButtonPressMask, 
ButtonReleaseMask</property>
+                            <property name="Alpha">-1</property>
+                            <signal name="ColorSet" handler="OnColorbutton1ColorSet" />
+                          </widget>
+                          <packing>
+                            <property name="LeftAttach">3</property>
+                            <property name="RightAttach">4</property>
+                            <property name="AutoSize">False</property>
+                            <property name="XOptions">Fill</property>
+                            <property name="YOptions">0</property>
+                            <property name="XExpand">False</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">False</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.HBox" id="hbox5">
+                            <property name="MemberName" />
+                            <property name="Spacing">6</property>
+                            <child>
+                              <widget class="Gtk.Label" id="hotKeyLabel">
+                                <property name="MemberName" />
+                                <property name="LabelProp" translatable="yes">none</property>
+                              </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.Button" id="changebuton">
+                                <property name="MemberName" />
+                                <property name="Sensitive">False</property>
+                                <property name="CanFocus">True</property>
+                                <property name="Type">TextOnly</property>
+                                <property name="Label" translatable="yes">Change</property>
+                                <property name="UseUnderline">True</property>
+                                <signal name="Clicked" handler="OnChangebutonClicked" />
+                              </widget>
+                              <packing>
+                                <property name="Position">1</property>
+                                <property name="AutoSize">False</property>
+                                <property name="Expand">False</property>
+                                <property name="Fill">False</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="TopAttach">2</property>
+                            <property name="BottomAttach">3</property>
+                            <property name="LeftAttach">1</property>
+                            <property name="RightAttach">2</property>
+                            <property name="AutoSize">False</property>
+                            <property name="XOptions">Fill</property>
+                            <property name="YOptions">0</property>
+                            <property name="XExpand">False</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">False</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.Label" id="label1">
+                            <property name="MemberName" />
+                            <property name="Xalign">0</property>
+                            <property name="LabelProp" translatable="yes">&lt;b&gt;Name:&lt;/b&gt;</property>
+                            <property name="UseMarkup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="AutoSize">False</property>
+                            <property name="XOptions">Fill</property>
+                            <property name="YOptions">Fill</property>
+                            <property name="XExpand">False</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">True</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.Label" id="label4">
+                            <property name="MemberName" />
+                            <property name="Xalign">0</property>
+                            <property name="LabelProp" translatable="yes">&lt;b&gt;Color:&lt;/b&gt;    
</property>
+                            <property name="UseMarkup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="LeftAttach">2</property>
+                            <property name="RightAttach">3</property>
+                            <property name="AutoSize">True</property>
+                            <property name="XOptions">Fill</property>
+                            <property name="YOptions">Fill</property>
+                            <property name="XExpand">False</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">True</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.Label" id="label6">
+                            <property name="MemberName" />
+                            <property name="Xalign">0</property>
+                            <property name="LabelProp" 
translatable="yes">&lt;b&gt;HotKey:&lt;/b&gt;</property>
+                            <property name="UseMarkup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="TopAttach">2</property>
+                            <property name="BottomAttach">3</property>
+                            <property name="AutoSize">False</property>
+                            <property name="XOptions">Fill</property>
+                            <property name="YOptions">Fill</property>
+                            <property name="XExpand">False</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">True</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.Label" id="label7">
+                            <property name="MemberName" />
+                            <property name="Xalign">0</property>
+                            <property name="LabelProp" translatable="yes">&lt;b&gt;Lead 
time:&lt;/b&gt;</property>
+                            <property name="UseMarkup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="TopAttach">1</property>
+                            <property name="BottomAttach">2</property>
+                            <property name="AutoSize">False</property>
+                            <property name="XOptions">Fill</property>
+                            <property name="YOptions">Fill</property>
+                            <property name="XExpand">False</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">True</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.Label" id="label8">
+                            <property name="MemberName" />
+                            <property name="Xalign">0</property>
+                            <property name="LabelProp" translatable="yes">&lt;b&gt;Lag 
time:&lt;/b&gt;</property>
+                            <property name="UseMarkup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="TopAttach">1</property>
+                            <property name="BottomAttach">2</property>
+                            <property name="LeftAttach">2</property>
+                            <property name="RightAttach">3</property>
+                            <property name="AutoSize">True</property>
+                            <property name="XOptions">Fill</property>
+                            <property name="YOptions">Fill</property>
+                            <property name="XExpand">False</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">True</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.Label" id="label9">
+                            <property name="MemberName" />
+                            <property name="Xalign">0</property>
+                            <property name="LabelProp" translatable="yes">&lt;b&gt;Sort 
Method&lt;/b&gt;</property>
+                            <property name="UseMarkup">True</property>
+                          </widget>
+                          <packing>
+                            <property name="TopAttach">2</property>
+                            <property name="BottomAttach">3</property>
+                            <property name="LeftAttach">2</property>
+                            <property name="RightAttach">3</property>
+                            <property name="AutoSize">True</property>
+                            <property name="XOptions">Fill</property>
+                            <property name="YOptions">Fill</property>
+                            <property name="XExpand">False</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">True</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.SpinButton" id="lagtimebutton">
+                            <property name="MemberName" />
+                            <property name="CanFocus">True</property>
+                            <property name="Upper">1000</property>
+                            <property name="PageIncrement">1</property>
+                            <property name="StepIncrement">1</property>
+                            <property name="ClimbRate">1</property>
+                            <property name="Numeric">True</property>
+                          </widget>
+                          <packing>
+                            <property name="TopAttach">1</property>
+                            <property name="BottomAttach">2</property>
+                            <property name="LeftAttach">3</property>
+                            <property name="RightAttach">4</property>
+                            <property name="AutoSize">False</property>
+                            <property name="YOptions">Fill</property>
+                            <property name="XExpand">True</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">True</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.SpinButton" id="leadtimebutton">
+                            <property name="MemberName" />
+                            <property name="CanFocus">True</property>
+                            <property name="Upper">1000</property>
+                            <property name="PageIncrement">1</property>
+                            <property name="StepIncrement">1</property>
+                            <property name="ClimbRate">1</property>
+                            <property name="Numeric">True</property>
+                          </widget>
+                          <packing>
+                            <property name="TopAttach">1</property>
+                            <property name="BottomAttach">2</property>
+                            <property name="LeftAttach">1</property>
+                            <property name="RightAttach">2</property>
+                            <property name="AutoSize">True</property>
+                            <property name="XOptions">Fill</property>
+                            <property name="YOptions">Fill</property>
+                            <property name="XExpand">False</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">True</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.Entry" id="nameentry">
+                            <property name="MemberName" />
+                            <property name="CanFocus">True</property>
+                            <property name="IsEditable">True</property>
+                            <property name="InvisibleChar">●</property>
+                            <signal name="Changed" handler="OnNameentryChanged" />
+                          </widget>
+                          <packing>
+                            <property name="LeftAttach">1</property>
+                            <property name="RightAttach">2</property>
+                            <property name="AutoSize">False</property>
+                            <property name="YOptions">Fill</property>
+                            <property name="XExpand">True</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">True</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.ComboBox" id="sortmethodcombobox">
+                            <property name="MemberName" />
+                            <property name="IsTextCombo">True</property>
+                            <property name="Items" translatable="yes">Sort by name
+Sort by start time
+Sort by stop time
+Sort by duration</property>
+                            <property name="Active">3</property>
+                            <signal name="Changed" handler="OnSortmethodcomboboxChanged" />
+                          </widget>
+                          <packing>
+                            <property name="TopAttach">2</property>
+                            <property name="BottomAttach">3</property>
+                            <property name="LeftAttach">3</property>
+                            <property name="RightAttach">4</property>
+                            <property name="AutoSize">False</property>
+                            <property name="XOptions">Fill</property>
+                            <property name="YOptions">0</property>
+                            <property name="XExpand">False</property>
+                            <property name="XFill">True</property>
+                            <property name="XShrink">False</property>
+                            <property name="YExpand">False</property>
+                            <property name="YFill">False</property>
+                            <property name="YShrink">False</property>
+                          </packing>
+                        </child>
                       </widget>
                       <packing>
-                        <property name="LeftAttach">3</property>
-                        <property name="RightAttach">4</property>
-                        <property name="AutoSize">False</property>
-                        <property name="XOptions">Fill</property>
-                        <property name="YOptions">0</property>
-                        <property name="XExpand">False</property>
-                        <property name="XFill">True</property>
-                        <property name="XShrink">False</property>
-                        <property name="YExpand">False</property>
-                        <property name="YFill">False</property>
-                        <property name="YShrink">False</property>
+                        <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.HBox" id="hbox5">
+                      <widget class="Gtk.VBox" id="vbox5">
                         <property name="MemberName" />
                         <property name="Spacing">6</property>
                         <child>
-                          <widget class="Gtk.Label" id="hotKeyLabel">
+                          <widget class="Gtk.Table" id="table1">
                             <property name="MemberName" />
-                            <property name="LabelProp" translatable="yes">none</property>
+                            <property name="NRows">2</property>
+                            <property name="NColumns">2</property>
+                            <property name="Homogeneous">True</property>
+                            <property name="RowSpacing">6</property>
+                            <property name="ColumnSpacing">6</property>
+                            <child>
+                              <placeholder />
+                            </child>
+                            <child>
+                              <widget class="Gtk.CheckButton" id="tagfieldcheckbutton">
+                                <property name="MemberName" />
+                                <property name="CanFocus">True</property>
+                                <property name="Label" translatable="yes">Tag field position</property>
+                                <property name="Active">True</property>
+                                <property name="DrawIndicator">True</property>
+                                <property name="HasLabel">True</property>
+                                <property name="UseUnderline">True</property>
+                                <signal name="Clicked" handler="OnTagfieldcheckbuttonClicked" />
+                              </widget>
+                              <packing>
+                                <property name="AutoSize">True</property>
+                                <property name="YOptions">Fill</property>
+                                <property name="XExpand">True</property>
+                                <property name="XFill">True</property>
+                                <property name="XShrink">False</property>
+                                <property name="YExpand">False</property>
+                                <property name="YFill">True</property>
+                                <property name="YShrink">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="Gtk.CheckButton" id="taggoalcheckbutton">
+                                <property name="MemberName" />
+                                <property name="CanFocus">True</property>
+                                <property name="Label" translatable="yes">Tag goal position</property>
+                                <property name="DrawIndicator">True</property>
+                                <property name="HasLabel">True</property>
+                                <property name="UseUnderline">True</property>
+                                <signal name="Clicked" handler="OnTaggoalcheckbuttonClicked" />
+                              </widget>
+                              <packing>
+                                <property name="LeftAttach">1</property>
+                                <property name="RightAttach">2</property>
+                                <property name="AutoSize">True</property>
+                                <property name="YOptions">Fill</property>
+                                <property name="XExpand">True</property>
+                                <property name="XFill">True</property>
+                                <property name="XShrink">False</property>
+                                <property name="YExpand">False</property>
+                                <property name="YFill">True</property>
+                                <property name="YShrink">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="Gtk.CheckButton" id="trajectorycheckbutton">
+                                <property name="MemberName" />
+                                <property name="CanFocus">True</property>
+                                <property name="Label" translatable="yes">Trajectory</property>
+                                <property name="DrawIndicator">True</property>
+                                <property name="HasLabel">True</property>
+                                <property name="UseUnderline">True</property>
+                                <signal name="Clicked" handler="OnTrajectorycheckbuttonClicked" />
+                              </widget>
+                              <packing>
+                                <property name="TopAttach">1</property>
+                                <property name="BottomAttach">2</property>
+                                <property name="AutoSize">True</property>
+                                <property name="YOptions">Fill</property>
+                                <property name="XExpand">True</property>
+                                <property name="XFill">True</property>
+                                <property name="XShrink">False</property>
+                                <property name="YExpand">False</property>
+                                <property name="YFill">True</property>
+                                <property name="YShrink">False</property>
+                              </packing>
+                            </child>
                           </widget>
                           <packing>
                             <property name="Position">0</property>
@@ -2185,264 +2549,54 @@
                           </packing>
                         </child>
                         <child>
-                          <widget class="Gtk.Button" id="changebuton">
+                          <widget class="Gtk.Table" id="table3">
                             <property name="MemberName" />
-                            <property name="Sensitive">False</property>
-                            <property name="CanFocus">True</property>
-                            <property name="Type">TextOnly</property>
-                            <property name="Label" translatable="yes">Change</property>
-                            <property name="UseUnderline">True</property>
-                            <signal name="Clicked" handler="OnChangebutonClicked" />
+                            <property name="NColumns">2</property>
+                            <property name="Homogeneous">True</property>
+                            <property name="RowSpacing">6</property>
+                            <property name="ColumnSpacing">6</property>
+                            <child>
+                              <widget class="LongoMatch.Gui.Component.CoordinatesTagger" 
id="fieldcoordinatestagger">
+                                <property name="MemberName" />
+                                <property name="Events">ButtonPressMask</property>
+                              </widget>
+                              <packing>
+                                <property name="AutoSize">True</property>
+                                <property name="XExpand">True</property>
+                                <property name="XFill">True</property>
+                                <property name="XShrink">False</property>
+                                <property name="YExpand">True</property>
+                                <property name="YFill">True</property>
+                                <property name="YShrink">False</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="LongoMatch.Gui.Component.CoordinatesTagger" 
id="goalcoordinatestagger">
+                                <property name="MemberName" />
+                                <property name="Events">ButtonPressMask</property>
+                              </widget>
+                              <packing>
+                                <property name="LeftAttach">1</property>
+                                <property name="RightAttach">2</property>
+                                <property name="AutoSize">True</property>
+                                <property name="XExpand">True</property>
+                                <property name="XFill">True</property>
+                                <property name="XShrink">False</property>
+                                <property name="YExpand">True</property>
+                                <property name="YFill">True</property>
+                                <property name="YShrink">False</property>
+                              </packing>
+                            </child>
                           </widget>
                           <packing>
                             <property name="Position">1</property>
-                            <property name="AutoSize">False</property>
-                            <property name="Expand">False</property>
-                            <property name="Fill">False</property>
+                            <property name="AutoSize">True</property>
                           </packing>
                         </child>
                       </widget>
                       <packing>
-                        <property name="TopAttach">2</property>
-                        <property name="BottomAttach">3</property>
-                        <property name="LeftAttach">1</property>
-                        <property name="RightAttach">2</property>
-                        <property name="AutoSize">False</property>
-                        <property name="XOptions">Fill</property>
-                        <property name="YOptions">0</property>
-                        <property name="XExpand">False</property>
-                        <property name="XFill">True</property>
-                        <property name="XShrink">False</property>
-                        <property name="YExpand">False</property>
-                        <property name="YFill">False</property>
-                        <property name="YShrink">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="Gtk.Label" id="label1">
-                        <property name="MemberName" />
-                        <property name="Xalign">0</property>
-                        <property name="LabelProp" translatable="yes">&lt;b&gt;Name:&lt;/b&gt;</property>
-                        <property name="UseMarkup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="AutoSize">False</property>
-                        <property name="XOptions">Fill</property>
-                        <property name="YOptions">Fill</property>
-                        <property name="XExpand">False</property>
-                        <property name="XFill">True</property>
-                        <property name="XShrink">False</property>
-                        <property name="YExpand">False</property>
-                        <property name="YFill">True</property>
-                        <property name="YShrink">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="Gtk.Label" id="label4">
-                        <property name="MemberName" />
-                        <property name="Xalign">0</property>
-                        <property name="LabelProp" translatable="yes">&lt;b&gt;Color:&lt;/b&gt;    
</property>
-                        <property name="UseMarkup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="LeftAttach">2</property>
-                        <property name="RightAttach">3</property>
-                        <property name="AutoSize">True</property>
-                        <property name="XOptions">Fill</property>
-                        <property name="YOptions">Fill</property>
-                        <property name="XExpand">False</property>
-                        <property name="XFill">True</property>
-                        <property name="XShrink">False</property>
-                        <property name="YExpand">False</property>
-                        <property name="YFill">True</property>
-                        <property name="YShrink">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="Gtk.Label" id="label6">
-                        <property name="MemberName" />
-                        <property name="Xalign">0</property>
-                        <property name="LabelProp" translatable="yes">&lt;b&gt;HotKey:&lt;/b&gt;</property>
-                        <property name="UseMarkup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="TopAttach">2</property>
-                        <property name="BottomAttach">3</property>
-                        <property name="AutoSize">False</property>
-                        <property name="XOptions">Fill</property>
-                        <property name="YOptions">Fill</property>
-                        <property name="XExpand">False</property>
-                        <property name="XFill">True</property>
-                        <property name="XShrink">False</property>
-                        <property name="YExpand">False</property>
-                        <property name="YFill">True</property>
-                        <property name="YShrink">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="Gtk.Label" id="label7">
-                        <property name="MemberName" />
-                        <property name="Xalign">0</property>
-                        <property name="LabelProp" translatable="yes">&lt;b&gt;Lead 
time:&lt;/b&gt;</property>
-                        <property name="UseMarkup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="TopAttach">1</property>
-                        <property name="BottomAttach">2</property>
-                        <property name="AutoSize">False</property>
-                        <property name="XOptions">Fill</property>
-                        <property name="YOptions">Fill</property>
-                        <property name="XExpand">False</property>
-                        <property name="XFill">True</property>
-                        <property name="XShrink">False</property>
-                        <property name="YExpand">False</property>
-                        <property name="YFill">True</property>
-                        <property name="YShrink">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="Gtk.Label" id="label8">
-                        <property name="MemberName" />
-                        <property name="Xalign">0</property>
-                        <property name="LabelProp" translatable="yes">&lt;b&gt;Lag time:&lt;/b&gt;</property>
-                        <property name="UseMarkup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="TopAttach">1</property>
-                        <property name="BottomAttach">2</property>
-                        <property name="LeftAttach">2</property>
-                        <property name="RightAttach">3</property>
-                        <property name="AutoSize">True</property>
-                        <property name="XOptions">Fill</property>
-                        <property name="YOptions">Fill</property>
-                        <property name="XExpand">False</property>
-                        <property name="XFill">True</property>
-                        <property name="XShrink">False</property>
-                        <property name="YExpand">False</property>
-                        <property name="YFill">True</property>
-                        <property name="YShrink">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="Gtk.Label" id="label9">
-                        <property name="MemberName" />
-                        <property name="Xalign">0</property>
-                        <property name="LabelProp" translatable="yes">&lt;b&gt;Sort 
Method&lt;/b&gt;</property>
-                        <property name="UseMarkup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="TopAttach">2</property>
-                        <property name="BottomAttach">3</property>
-                        <property name="LeftAttach">2</property>
-                        <property name="RightAttach">3</property>
-                        <property name="AutoSize">True</property>
-                        <property name="XOptions">Fill</property>
-                        <property name="YOptions">Fill</property>
-                        <property name="XExpand">False</property>
-                        <property name="XFill">True</property>
-                        <property name="XShrink">False</property>
-                        <property name="YExpand">False</property>
-                        <property name="YFill">True</property>
-                        <property name="YShrink">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="Gtk.SpinButton" id="lagtimebutton">
-                        <property name="MemberName" />
-                        <property name="CanFocus">True</property>
-                        <property name="Upper">1000</property>
-                        <property name="PageIncrement">1</property>
-                        <property name="StepIncrement">1</property>
-                        <property name="ClimbRate">1</property>
-                        <property name="Numeric">True</property>
-                      </widget>
-                      <packing>
-                        <property name="TopAttach">1</property>
-                        <property name="BottomAttach">2</property>
-                        <property name="LeftAttach">3</property>
-                        <property name="RightAttach">4</property>
-                        <property name="AutoSize">False</property>
-                        <property name="YOptions">Fill</property>
-                        <property name="XExpand">True</property>
-                        <property name="XFill">True</property>
-                        <property name="XShrink">False</property>
-                        <property name="YExpand">False</property>
-                        <property name="YFill">True</property>
-                        <property name="YShrink">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="Gtk.SpinButton" id="leadtimebutton">
-                        <property name="MemberName" />
-                        <property name="CanFocus">True</property>
-                        <property name="Upper">1000</property>
-                        <property name="PageIncrement">1</property>
-                        <property name="StepIncrement">1</property>
-                        <property name="ClimbRate">1</property>
-                        <property name="Numeric">True</property>
-                      </widget>
-                      <packing>
-                        <property name="TopAttach">1</property>
-                        <property name="BottomAttach">2</property>
-                        <property name="LeftAttach">1</property>
-                        <property name="RightAttach">2</property>
+                        <property name="Position">1</property>
                         <property name="AutoSize">True</property>
-                        <property name="XOptions">Fill</property>
-                        <property name="YOptions">Fill</property>
-                        <property name="XExpand">False</property>
-                        <property name="XFill">True</property>
-                        <property name="XShrink">False</property>
-                        <property name="YExpand">False</property>
-                        <property name="YFill">True</property>
-                        <property name="YShrink">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="Gtk.Entry" id="nameentry">
-                        <property name="MemberName" />
-                        <property name="CanFocus">True</property>
-                        <property name="IsEditable">True</property>
-                        <property name="InvisibleChar">●</property>
-                        <signal name="Changed" handler="OnNameentryChanged" />
-                      </widget>
-                      <packing>
-                        <property name="LeftAttach">1</property>
-                        <property name="RightAttach">2</property>
-                        <property name="AutoSize">False</property>
-                        <property name="YOptions">Fill</property>
-                        <property name="XExpand">True</property>
-                        <property name="XFill">True</property>
-                        <property name="XShrink">False</property>
-                        <property name="YExpand">False</property>
-                        <property name="YFill">True</property>
-                        <property name="YShrink">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="Gtk.ComboBox" id="sortmethodcombobox">
-                        <property name="MemberName" />
-                        <property name="IsTextCombo">True</property>
-                        <property name="Items" translatable="yes">Sort by name
-Sort by start time
-Sort by stop time
-Sort by duration</property>
-                        <property name="Active">3</property>
-                        <signal name="Changed" handler="OnSortmethodcomboboxChanged" />
-                      </widget>
-                      <packing>
-                        <property name="TopAttach">2</property>
-                        <property name="BottomAttach">3</property>
-                        <property name="LeftAttach">3</property>
-                        <property name="RightAttach">4</property>
-                        <property name="AutoSize">False</property>
-                        <property name="XOptions">Fill</property>
-                        <property name="YOptions">0</property>
-                        <property name="XExpand">False</property>
-                        <property name="XFill">True</property>
-                        <property name="XShrink">False</property>
-                        <property name="YExpand">False</property>
-                        <property name="YFill">False</property>
-                        <property name="YShrink">False</property>
                       </packing>
                     </child>
                   </widget>
@@ -2450,7 +2604,7 @@ Sort by duration</property>
               </widget>
             </child>
             <child>
-              <widget class="Gtk.Label" id="GtkLabel1">
+              <widget class="Gtk.Label" id="GtkLabel4">
                 <property name="MemberName" />
                 <property name="LabelProp" translatable="yes">&lt;b&gt;Properties&lt;/b&gt;</property>
                 <property name="UseMarkup">True</property>
@@ -2463,8 +2617,6 @@ Sort by duration</property>
           <packing>
             <property name="Position">0</property>
             <property name="AutoSize">True</property>
-            <property name="Expand">False</property>
-            <property name="Fill">False</property>
           </packing>
         </child>
         <child>
@@ -2523,7 +2675,7 @@ Sort by duration</property>
                               </widget>
                             </child>
                             <child>
-                              <widget class="Gtk.Label" id="GtkLabel3">
+                              <widget class="Gtk.Label" id="GtkLabel5">
                                 <property name="MemberName" />
                                 <property name="LabelProp" translatable="yes">&lt;b&gt;Subcategory 
name&lt;/b&gt;</property>
                                 <property name="UseMarkup">True</property>
@@ -2561,7 +2713,7 @@ Sort by duration</property>
                               </widget>
                             </child>
                             <child>
-                              <widget class="Gtk.Label" id="GtkLabel4">
+                              <widget class="Gtk.Label" id="GtkLabel6">
                                 <property name="MemberName" />
                                 <property name="LabelProp" translatable="yes">&lt;b&gt;Subcategory 
type&lt;/b&gt;</property>
                                 <property name="UseMarkup">True</property>
@@ -2608,7 +2760,7 @@ Sort by duration</property>
               </widget>
             </child>
             <child>
-              <widget class="Gtk.Label" id="GtkLabel5">
+              <widget class="Gtk.Label" id="GtkLabel8">
                 <property name="MemberName" />
                 <property name="LabelProp" translatable="yes">&lt;b&gt;Subcategories&lt;/b&gt;</property>
                 <property name="UseMarkup">True</property>
@@ -5187,7 +5339,7 @@ Show-&gt;&lt;b&gt; S&lt;/b&gt;
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.TaggerWidget" design-size="377 91">
+  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.TaggerWidget" design-size="486 96">
     <property name="MemberName" />
     <property name="Visible">False</property>
     <child>
@@ -5299,7 +5451,8 @@ Show-&gt;&lt;b&gt; S&lt;/b&gt;
               </widget>
               <packing>
                 <property name="Position">1</property>
-                <property name="AutoSize">True</property>
+                <property name="AutoSize">False</property>
+                <property name="Expand">False</property>
               </packing>
             </child>
           </widget>
@@ -5311,7 +5464,7 @@ Show-&gt;&lt;b&gt; S&lt;/b&gt;
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.TaggerDialog" design-size="636 278">
+  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.TaggerDialog" design-size="644 569">
     <property name="MemberName" />
     <property name="Title" translatable="yes">Tag play</property>
     <property name="Icon">stock:longomatch Menu</property>
@@ -5323,62 +5476,103 @@ Show-&gt;&lt;b&gt; S&lt;/b&gt;
         <property name="MemberName" />
         <property name="BorderWidth">2</property>
         <child>
-          <widget class="Gtk.HBox" id="hbox1">
+          <widget class="Gtk.VBox" id="vbox2">
             <property name="MemberName" />
-            <property name="Spacing">6</property>
             <child>
-              <widget class="Gtk.Notebook" id="tagsnotebook">
+              <widget class="Gtk.HBox" id="hbox">
                 <property name="MemberName" />
-                <property name="CanFocus">True</property>
-                <property name="CurrentPage">0</property>
+                <property name="Spacing">6</property>
                 <child>
-                  <widget class="LongoMatch.Gui.Component.TaggerWidget" id="taggerwidget1">
+                  <widget class="Gtk.Notebook" id="tagsnotebook">
                     <property name="MemberName" />
-                    <property name="Events">ButtonPressMask</property>
+                    <property name="CanFocus">True</property>
+                    <property name="CurrentPage">0</property>
+                    <child>
+                      <widget class="LongoMatch.Gui.Component.TaggerWidget" id="taggerwidget1">
+                        <property name="MemberName" />
+                        <property name="Events">ButtonPressMask</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="Gtk.Label" id="label1">
+                        <property name="MemberName" />
+                        <property name="LabelProp" translatable="yes">Tags</property>
+                      </widget>
+                      <packing>
+                        <property name="type">tab</property>
+                      </packing>
+                    </child>
                   </widget>
+                  <packing>
+                    <property name="Position">0</property>
+                    <property name="AutoSize">False</property>
+                  </packing>
                 </child>
                 <child>
-                  <widget class="Gtk.Label" id="label1">
+                  <widget class="Gtk.Notebook" id="playersnotebook">
                     <property name="MemberName" />
-                    <property name="LabelProp" translatable="yes">Tags</property>
+                    <property name="CanFocus">True</property>
+                    <property name="CurrentPage">0</property>
+                    <child>
+                      <widget class="Gtk.VBox" id="playersbox">
+                        <property name="MemberName" />
+                        <property name="Spacing">6</property>
+                        <child>
+                          <placeholder />
+                        </child>
+                        <child>
+                          <placeholder />
+                        </child>
+                        <child>
+                          <placeholder />
+                        </child>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="Gtk.Label" id="label2">
+                        <property name="MemberName" />
+                        <property name="LabelProp" translatable="yes">Players</property>
+                      </widget>
+                      <packing>
+                        <property name="type">tab</property>
+                      </packing>
+                    </child>
                   </widget>
                   <packing>
-                    <property name="type">tab</property>
+                    <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>
               </packing>
             </child>
             <child>
-              <widget class="Gtk.Notebook" id="playersnotebook">
+              <widget class="Gtk.HBox" id="poshbox">
                 <property name="MemberName" />
-                <property name="CanFocus">True</property>
-                <property name="CurrentPage">0</property>
                 <child>
-                  <widget class="Gtk.VBox" id="playersbox">
+                  <widget class="LongoMatch.Gui.Component.CoordinatesTagger" id="fieldcoordinatestagger">
                     <property name="MemberName" />
-                    <property name="Spacing">6</property>
-                    <child>
-                      <placeholder />
-                    </child>
-                    <child>
-                      <placeholder />
-                    </child>
-                    <child>
-                      <placeholder />
-                    </child>
+                    <property name="Visible">False</property>
+                    <property name="Events">ButtonPressMask</property>
                   </widget>
+                  <packing>
+                    <property name="Position">0</property>
+                    <property name="AutoSize">True</property>
+                  </packing>
                 </child>
                 <child>
-                  <widget class="Gtk.Label" id="label2">
+                  <widget class="LongoMatch.Gui.Component.CoordinatesTagger" id="goalcoordinatestagger">
                     <property name="MemberName" />
-                    <property name="LabelProp" translatable="yes">Players</property>
+                    <property name="Visible">False</property>
+                    <property name="Events">ButtonPressMask</property>
                   </widget>
                   <packing>
-                    <property name="type">tab</property>
+                    <property name="Position">1</property>
+                    <property name="AutoSize">True</property>
                   </packing>
                 </child>
               </widget>
@@ -7567,4 +7761,14 @@ Defining &lt;b&gt; Game Units &lt;/b&gt; will help you during the analysis to in
       </widget>
     </child>
   </widget>
+  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.CoordinatesTagger" design-size="300 300">
+    <property name="MemberName" />
+    <property name="Visible">False</property>
+    <child>
+      <widget class="Gtk.DrawingArea" id="drawingarea">
+        <property name="MemberName" />
+        <property name="Events">ButtonMotionMask, ButtonPressMask, ButtonReleaseMask</property>
+      </widget>
+    </child>
+  </widget>
 </stetic-interface>
\ No newline at end of file
diff --git a/LongoMatch.GUI/gtk-gui/objects.xml b/LongoMatch.GUI/gtk-gui/objects.xml
index 27a7d6d..ee5c21b 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -115,15 +115,15 @@
   </object>
   <object type="LongoMatch.Gui.Base.TemplatesEditorWidget" palette-category="General" allow-children="false" 
base-type="Gtk.Bin">
     <itemgroups>
+      <itemgroup label="ITemplateWidget Properties">
+        <property name="Edited" />
+        <property name="CanExport" />
+      </itemgroup>
     </itemgroups>
     <signals />
   </object>
   <object type="LongoMatch.Gui.Component.GameUnitTimeScale" palette-category="LongoMatch" 
allow-children="false" base-type="Gtk.DrawingArea">
     <itemgroups>
-      <itemgroup label="TimeScaleBase[LongoMatch.Store.TimelineNode] Properties">
-        <property name="PixelRatio" />
-        <property name="CurrentFrame" />
-      </itemgroup>
     </itemgroups>
     <signals>
       <itemgroup label="GameUnitTimeScale Signals">
@@ -212,10 +212,6 @@
   </object>
   <object type="LongoMatch.Gui.Component.TimeScale" palette-category="LongoMatch" allow-children="false" 
base-type="Gtk.DrawingArea">
     <itemgroups>
-      <itemgroup label="TimeScaleBase[LongoMatch.Store.Play] Properties">
-        <property name="PixelRatio" />
-        <property name="CurrentFrame" />
-      </itemgroup>
     </itemgroups>
     <signals>
       <itemgroup label="TimeScale Signals">
@@ -228,21 +224,10 @@
   </object>
   <object type="LongoMatch.Gui.Component.PlaysTreeView" palette-category="LongoMatch" allow-children="false" 
base-type="Gtk.TreeView">
     <itemgroups>
-      <itemgroup label="ListTreeViewBase Properties">
-        <property name="Colors" />
-      </itemgroup>
     </itemgroups>
     <signals>
       <itemgroup label="PlaysTreeView Signals">
         <signal name="EditProperties" />
-        <signal name="TimeNodeChanged" />
-        <signal name="TimeNodeSelected" />
-        <signal name="TimeNodeDeleted" />
-        <signal name="PlayListNodeAdded" />
-        <signal name="SnapshotSeriesEvent" />
-        <signal name="TagPlay" />
-        <signal name="NewRenderingJob" />
-        <signal name="PlayCategoryChanged" />
       </itemgroup>
     </signals>
   </object>
@@ -265,21 +250,8 @@
   </object>
   <object type="LongoMatch.Gui.Component.PlayersTreeView" palette-category="LongoMatch" 
allow-children="false" base-type="Gtk.TreeView">
     <itemgroups>
-      <itemgroup label="ListTreeViewBase Properties">
-        <property name="Colors" />
-      </itemgroup>
     </itemgroups>
     <signals>
-      <itemgroup label="ListTreeViewBase Signals">
-        <signal name="TimeNodeChanged" />
-        <signal name="TimeNodeSelected" />
-        <signal name="TimeNodeDeleted" />
-        <signal name="PlayListNodeAdded" />
-        <signal name="SnapshotSeriesEvent" />
-        <signal name="TagPlay" />
-        <signal name="NewRenderingJob" />
-        <signal name="PlayCategoryChanged" />
-      </itemgroup>
     </signals>
   </object>
   <object type="LongoMatch.Gui.Component.PlaysSelectionWidget" palette-category="General" 
allow-children="false" base-type="Gtk.Bin">
@@ -345,4 +317,62 @@
     </itemgroups>
     <signals />
   </object>
+  <object type="LongoMatch.Gui.CapturerBin" palette-category="General" allow-children="false" 
base-type="Gtk.Bin">
+    <itemgroups />
+    <signals>
+      <itemgroup label="ICapturer Signals">
+        <signal name="CaptureFinished" />
+        <signal name="Error" />
+      </itemgroup>
+    </signals>
+  </object>
+  <object type="LongoMatch.Gui.PlayerBin" palette-category="General" allow-children="false" 
base-type="Gtk.Bin">
+    <itemgroups>
+      <itemgroup label="IPlayer Properties">
+        <property name="Rate" />
+        <property name="ExpandLogo" />
+        <property name="Detached" />
+      </itemgroup>
+    </itemgroups>
+    <signals>
+      <itemgroup label="IPlayer Signals">
+        <signal name="SegmentClosedEvent" />
+        <signal name="Tick" />
+        <signal name="Error" />
+        <signal name="PlayStateChanged" />
+        <signal name="Next" />
+        <signal name="Prev" />
+        <signal name="DrawFrame" />
+        <signal name="SeekEvent" />
+        <signal name="Detach" />
+      </itemgroup>
+    </signals>
+  </object>
+  <object type="LongoMatch.Gui.PlayerCapturerBin" palette-category="General" allow-children="false" 
base-type="Gtk.Bin">
+    <itemgroups>
+      <itemgroup label="IPlayer Properties">
+        <property name="Detached" />
+        <property name="ExpandLogo" />
+        <property name="Rate" />
+      </itemgroup>
+    </itemgroups>
+    <signals>
+      <itemgroup label="ICapturer Signals">
+        <signal name="Error" />
+        <signal name="CaptureFinished" />
+        <signal name="SegmentClosedEvent" />
+        <signal name="Tick" />
+        <signal name="PlayStateChanged" />
+        <signal name="Next" />
+        <signal name="Prev" />
+        <signal name="DrawFrame" />
+        <signal name="SeekEvent" />
+        <signal name="Detach" />
+      </itemgroup>
+    </signals>
+  </object>
+  <object type="LongoMatch.Gui.Component.CoordinatesTagger" palette-category="General" 
allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals />
+  </object>
 </objects>
\ No newline at end of file
diff --git a/LongoMatch.Services/Services/EventsManager.cs b/LongoMatch.Services/Services/EventsManager.cs
index 0db99b8..b0ba698 100644
--- a/LongoMatch.Services/Services/EventsManager.cs
+++ b/LongoMatch.Services/Services/EventsManager.cs
@@ -200,8 +200,10 @@ namespace LongoMatch.Services
                }
 
                private void LaunchPlayTagger(Play play, bool showAllTags) {
-                       guiToolkit.TagPlay(play, openedProject.LocalTeamTemplate,
-                                          openedProject.VisitorTeamTemplate, showAllTags);
+                       guiToolkit.TagPlay(play, openedProject.Categories,
+                                          openedProject.LocalTeamTemplate,
+                                          openedProject.VisitorTeamTemplate,
+                                          showAllTags);
                }
 
                protected virtual void OnPlaySelected(Play play)
diff --git a/LongoMatch.mds b/LongoMatch.mds
index 1330fb4..a726099 100644
--- a/LongoMatch.mds
+++ b/LongoMatch.mds
@@ -9,11 +9,11 @@
     <TextStylePolicy FileWidth="120" TabWidth="4" inheritsSet="Mono" inheritsScope="text/plain" />
     <TextStylePolicy FileWidth="120" TabWidth="4" inheritsSet="Mono" inheritsScope="text/plain" 
scope="text/plain" />
     <TextStylePolicy inheritsSet="null" scope="application/octet-stream" />
-    <TextStylePolicy TabWidth="2" RemoveTrailingWhitespace="True" EolMarker="Unix" 
inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/x-c++hdr" />
+    <TextStylePolicy TabWidth="2" EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" 
scope="text/x-c++hdr" />
     <TextStylePolicy inheritsSet="null" scope="text/x-csharp" />
     <CSharpFormattingPolicy inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" />
     <TextStylePolicy inheritsSet="null" scope="application/xml" />
-    <TextStylePolicy TabWidth="2" RemoveTrailingWhitespace="True" inheritsSet="VisualStudio" 
inheritsScope="text/plain" scope="text/x-csrc" />
+    <TextStylePolicy TabWidth="2" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/x-csrc" 
/>
     <TextStylePolicy inheritsSet="null" scope="application/x-desktop" />
   </Policies>
   <Configurations active="Release">


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