[longomatch/redesign: 96/96] WIP



commit f1296a1b8ab756de9eaa09aeaad330638f82e3ae
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Mar 27 16:53:32 2011 +0200

    WIP

 CesarPlayer/CesarPlayer.mdp                        |   20 +-
 LongoMatch.mds                                     |    2 +-
 LongoMatch/Gui/Component/CategoryProperties.cs     |   76 ++-
 LongoMatch/Gui/Component/ProjectDetailsWidget.cs   |   53 +-
 LongoMatch/Gui/Component/ProjectTemplateWidget.cs  |  245 ------
 LongoMatch/Gui/Component/TeamTemplateWidget.cs     |    6 +-
 LongoMatch/Gui/Component/TemplatesEditorBase.cs    |  333 +++++++++
 LongoMatch/Gui/Dialog/EntryDialog.cs               |    2 +-
 LongoMatch/Gui/Dialog/TeamTemplateEditor.cs        |   13 +-
 ...lateEditorDialog.cs => TemplateEditorDialog.cs} |   56 +-
 .../{TemplatesEditor.cs => TemplatesManager.cs}    |  250 +++----
 LongoMatch/Gui/MainWindow.cs                       |    5 +-
 LongoMatch/Interfaces/ITemplates.cs                |   11 +-
 LongoMatch/LongoMatch.mdp                          |   36 +-
 LongoMatch/Main.cs                                 |    4 +-
 LongoMatch/Services/TemplatesService.cs            |   37 +-
 LongoMatch/Store/SubCategory.cs                    |    2 +-
 LongoMatch/Store/Templates/CategoriesTemplate.cs   |   10 +-
 LongoMatch/Store/Templates/SubCategoryTemplate.cs  |    4 +-
 LongoMatch/Store/Templates/TeamTemplate.cs         |    2 +-
 .../LongoMatch.Gui.Component.CategoryProperties.cs |  418 ++++++++---
 .../LongoMatch.Gui.Component.PlayerProperties.cs   |    6 +-
 ...ongoMatch.Gui.Component.ProjectDetailsWidget.cs |   12 +-
 .../LongoMatch.Gui.Component.ProjectListWidget.cs  |    2 +-
 .../LongoMatch.Gui.Component.TaggerWidget.cs       |    2 +-
 .../LongoMatch.Gui.Component.TeamTemplateWidget.cs |   45 --
 ...ongoMatch.Gui.Component.TemplatesEditorBase.cs} |  195 +++---
 .../LongoMatch.Gui.Component.TimeAdjustWidget.cs   |   90 ---
 .../gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs   |    2 +-
 .../LongoMatch.Gui.Dialog.SnapshotsDialog.cs       |    2 +-
 .../LongoMatch.Gui.Dialog.TeamTemplateEditor.cs    |   60 --
 ... LongoMatch.Gui.Dialog.TemplateEditorDialog.cs} |   23 +-
 .../LongoMatch.Gui.Dialog.TemplatesManager.cs      |   54 +-
 ...LongoMatch.Gui.Dialog.VideoEditionProperties.cs |    2 +-
 LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs    |    2 +-
 LongoMatch/gtk-gui/gui.stetic                      |  774 +++++++++++---------
 po/Translations.mdse                               |    6 +-
 37 files changed, 1501 insertions(+), 1361 deletions(-)
---
diff --git a/CesarPlayer/CesarPlayer.mdp b/CesarPlayer/CesarPlayer.mdp
index 9f16991..1f5de03 100644
--- a/CesarPlayer/CesarPlayer.mdp
+++ b/CesarPlayer/CesarPlayer.mdp
@@ -1,4 +1,14 @@
 <Project name="CesarPlayer" fileversion="2.0" DefaultNamespace="longomatch" language="C#" clr-version="Net_2_0" targetFramework="2.0" ctype="DotNetProject">
+  <Deployment.LinuxDeployData generatePcFile="False" />
+  <MonoDevelop.Autotools.MakefileInfo RelativeMakefileName="Makefile.am" RelativeConfigureInPath="../">
+    <BuildFilesVar Name="FILES" />
+    <DeployFilesVar />
+    <ResourcesVar Name="RESOURCES" />
+    <OthersVar />
+    <GacRefVar Name="REFERENCES" />
+    <AsmRefVar Name="REFERENCES" />
+    <ProjectRefVar Name="REFERENCES" />
+  </MonoDevelop.Autotools.MakefileInfo>
   <Configurations active="Release">
     <Configuration name="Debug" ctype="DotNetProjectConfiguration">
       <Output directory="." assembly="a" assemblyKeyFile="." />
@@ -66,14 +76,4 @@
     <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
   </References>
   <LanguageParameters ApplicationIcon="." CodePage="65001" ctype="CSharpProjectParameters" />
-  <Deployment.LinuxDeployData generatePcFile="False" />
-  <MonoDevelop.Autotools.MakefileInfo RelativeMakefileName="Makefile.am" RelativeConfigureInPath="../">
-    <BuildFilesVar Name="FILES" />
-    <DeployFilesVar />
-    <ResourcesVar Name="RESOURCES" />
-    <OthersVar />
-    <GacRefVar Name="REFERENCES" />
-    <AsmRefVar Name="REFERENCES" />
-    <ProjectRefVar Name="REFERENCES" />
-  </MonoDevelop.Autotools.MakefileInfo>
 </Project>
\ No newline at end of file
diff --git a/LongoMatch.mds b/LongoMatch.mds
index b2c943b..cff7f01 100644
--- a/LongoMatch.mds
+++ b/LongoMatch.mds
@@ -1,7 +1,7 @@
 <Combine fileversion="2.0" description="LongoMatch : The Digital Coach" outputpath="build/bin/" releaseversion="0.9.0" name="LongoMatch">
   <Policies>
     <DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="FileFormatDefault" />
-    <StandardHeader Text="&#xA; Copyright (C) ${Year} ${CopyrightHolder}&#xA;&#xA; This program is free software; you can redistribute it and/or modify&#xA; it under the terms of the GNU General Public License as published by&#xA; the Free Software Foundation; either version 2 of the License, or&#xA; (at your option) any later version.&#xA;&#xA; This program is distributed in the hope that it will be useful,&#xA; but WITHOUT ANY WARRANTY; without even the implied warranty of&#xA; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&#xA; GNU General Public License for more details.&#xA; &#xA; You should have received a copy of the GNU General Public License&#xA; along with this program; if not, write to the Free Software&#xA; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.&#xA;" inheritsSet="MITX11License" />
+    <StandardHeader Text="&#xA; Copyright (C) ${Year} ${CopyrightHolder}&#xA;&#xA; This program is free software; you can redistribute it and/or modify&#xA; it under the terms of the GNU General Public License as published by&#xA; the Free Software Foundation; either version 2 of the License, or&#xA; (at your option) any later version.&#xA;&#xA; This program is distributed in the hope that it will be useful,&#xA; but WITHOUT ANY WARRANTY; without even the implied warranty of&#xA; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&#xA; GNU General Public License for more details.&#xA; &#xA; You should have received a copy of the GNU General Public License&#xA; along with this program; if not, write to the Free Software&#xA; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.&#xA;" inheritsSet="Apache2License" />
     <VersionControlPolicy inheritsSet="Mono" />
     <ChangeLogPolicy UpdateMode="None" inheritsSet="Mono">
       <MessageStyle LineAlign="0" />
diff --git a/LongoMatch/Gui/Component/CategoryProperties.cs b/LongoMatch/Gui/Component/CategoryProperties.cs
index e4f54dc..3255da1 100644
--- a/LongoMatch/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch/Gui/Component/CategoryProperties.cs
@@ -19,10 +19,15 @@
 //
 
 using System;
+using System.Collections.Generic;
 using Gdk;
 using Gtk;
 using Mono.Unix;
+
+using LongoMatch.Interfaces;
+using LongoMatch.Services;
 using LongoMatch.Store;
+using LongoMatch.Store.Templates;
 using LongoMatch.Gui.Dialog;
 
 namespace LongoMatch.Gui.Component
@@ -37,32 +42,51 @@ namespace LongoMatch.Gui.Component
 
 		public event HotKeyChangeHandler HotKeyChanged;
 
-		private Category stn;
+		private Category cat;
+		private ITemplateProvider<SubCategoryTemplate, string> subcategoriesTemplates;
+		private Dictionary<string, TagSubCategory> subCategories;
 
 		public CategoryProperties()
 		{
 			this.Build();
+			subcategoriesTemplates = MainClass.ts.SubCategoriesTemplateProvider;
+			LoadSubcategories();
 		}
 
+		private void LoadSubcategories() {
+			foreach (TagSubCategory subcat in subcategoriesTemplates.Templates) {
+				subCategories.Add(subcat.Name, subcat);
+				subcatcombobox.AppendText(subcat.Name);
+			}
+			
+			/* We check here if the user already saved at least one category
+			 * to hide the big helper button.*/
+			if (subCategories.Count != 0) {
+				newfirstbutton.Visible = false;
+			} 
+		}
+			
 		public Category Category {
 			set {
-				stn = value;
+				cat = value;
 				UpdateGui();
 			}
 			get {
-				return stn;
+				return cat;
 			}
 		}
 
 		private void  UpdateGui() {
-			if(stn != null) {
-				nameentry.Text = stn.Name;
-				timeadjustwidget1.SetTimeNode(stn);
-				colorbutton1.Color = stn.Color;
-				sortmethodcombobox.Active = (int)stn.SortMethod;
-
-				if(stn.HotKey.Defined) {
-					hotKeyLabel.Text = stn.HotKey.ToString();
+			if(cat != null) {
+				nameentry.Text = cat.Name;
+				
+				lagtimebutton.Value = cat.Start.Seconds;
+				leadtimebutton.Value = cat.Stop.Seconds;
+				colorbutton1.Color = cat.Color;
+				sortmethodcombobox.Active = (int)cat.SortMethod;
+
+				if(cat.HotKey.Defined) {
+					hotKeyLabel.Text = cat.HotKey.ToString();
 				}
 				else hotKeyLabel.Text = Catalog.GetString("none");
 			}
@@ -72,40 +96,52 @@ namespace LongoMatch.Gui.Component
 		{
 			HotKeySelectorDialog dialog = new HotKeySelectorDialog();
 			dialog.TransientFor=(Gtk.Window)this.Toplevel;
-			HotKey prevHotKey =  stn.HotKey;
+			HotKey prevHotKey =  cat.HotKey;
 			if(dialog.Run() == (int)ResponseType.Ok) {
-				stn.HotKey=dialog.HotKey;
+				cat.HotKey=dialog.HotKey;
 				UpdateGui();
 			}
 			dialog.Destroy();
 			if(HotKeyChanged != null)
-				HotKeyChanged(prevHotKey,stn);
+				HotKeyChanged(prevHotKey,cat);
 		}
 
 		protected virtual void OnColorbutton1ColorSet(object sender, System.EventArgs e)
 		{
-			if(stn != null)
-				stn.Color=colorbutton1.Color;
+			if(cat != null)
+				cat.Color=colorbutton1.Color;
 		}
 
 		protected virtual void OnTimeadjustwidget1LeadTimeChanged(object sender, System.EventArgs e)
 		{
-			stn.Start = timeadjustwidget1.GetStartTime();
+			cat.Start = new Time{Seconds=(int)leadtimebutton.Value};
 		}
 
 		protected virtual void OnTimeadjustwidget1LagTimeChanged(object sender, System.EventArgs e)
 		{
-			stn.Stop= timeadjustwidget1.GetStopTime();
+			cat.Stop = new Time{Seconds=(int)lagtimebutton.Value};
 		}
 
 		protected virtual void OnNameentryChanged(object sender, System.EventArgs e)
 		{
-			stn.Name = nameentry.Text;
+			cat.Name = nameentry.Text;
 		}
 
 		protected virtual void OnSortmethodcomboboxChanged(object sender, System.EventArgs e)
 		{
-			stn.SortMethodString = sortmethodcombobox.ActiveText;
+			cat.SortMethodString = sortmethodcombobox.ActiveText;
+		}
+		
+		protected virtual void OnNewfirstbuttonClicked (object sender, System.EventArgs e)
+		{
+		}
+		
+		protected virtual void OnAddbuttonClicked (object sender, System.EventArgs e)
+		{
+		}
+		
+		protected virtual void OnNewbuttonClicked (object sender, System.EventArgs e)
+		{
 		}
 	}
 }
diff --git a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
index 4c6fe27..92d26a8 100644
--- a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
@@ -53,8 +53,8 @@ namespace LongoMatch.Gui.Component
 		private Categories actualCategory;
 		private TeamTemplate actualVisitorTeam;
 		private TeamTemplate actualLocalTeam;
-		private ITemplateProvider<Categories> tpc;
-		private ITemplateProvider<TeamTemplate> tpt;
+		private ITemplateProvider<Categories, Category> tpc;
+		private ITemplateProvider<TeamTemplate, Player> tpt;
 		private ProjectType useType;
 		private List<Device> videoDevices;
 		private const string PAL_FORMAT = "720x576 (4:3)";
@@ -550,40 +550,41 @@ namespace LongoMatch.Gui.Component
 
 		protected virtual void OnEditbuttonClicked(object sender, System.EventArgs e)
 		{
-			ProjectTemplateEditorDialog ted = new ProjectTemplateEditorDialog();
-			ted.TransientFor = (Window)Toplevel;
-			ted.Categories = Categories;
-			ted.Project = project;
-			ted.CanExport = Use == ProjectType.EditProject;
-			if(ted.Run() == (int)ResponseType.Apply) {
-				Categories = ted.Categories;
-			}
-			ted.Destroy();
+			var editor = new TemplateEditorDialog<Categories, Category>();
+			
+			editor.TransientFor = (Window)Toplevel;
+			editor.Template = Categories;
+			editor.InProject = true;
+			editor.CanExport = Use == ProjectType.EditProject;
+			if(editor.Run() == (int)ResponseType.Apply) {
+				Categories = editor.Template;
+			}
+			editor.Destroy();
 			OnEdited(this,null);
 		}
 
 		protected virtual void OnLocaltemplatebuttonClicked(object sender, System.EventArgs e) {
-			TeamTemplateEditor tted = new TeamTemplateEditor();
-			tted.TransientFor = (Window)Toplevel;
-			tted.Title=Catalog.GetString("Local Team Template");
-			tted.Template = LocalTeamTemplate;
+			var editor = new TemplateEditorDialog<TeamTemplate, Player>();
+			editor.TransientFor = (Window)Toplevel;
+			editor.Title=Catalog.GetString("Local Team Template");
+			editor.Template = LocalTeamTemplate;
 
-			if(tted.Run() == (int)ResponseType.Apply) {
-				LocalTeamTemplate = tted.Template;
+			if(editor.Run() == (int)ResponseType.Apply) {
+				LocalTeamTemplate = editor.Template;
 			}
-			tted.Destroy();
+			editor.Destroy();
 			OnEdited(this,null);
 		}
 
 		protected virtual void OnVisitorbuttonClicked(object sender, System.EventArgs e) {
-			TeamTemplateEditor tted = new TeamTemplateEditor();
-			tted.TransientFor = (Window)Toplevel;
-			tted.Title=Catalog.GetString("Visitor Team Template");
-			tted.Template = VisitorTeamTemplate;
-			if(tted.Run() == (int)ResponseType.Apply) {
-				VisitorTeamTemplate = tted.Template;
-			}
-			tted.Destroy();
+			var editor = new TemplateEditorDialog<TeamTemplate, Player>();
+			editor.TransientFor = (Window)Toplevel;
+			editor.Title=Catalog.GetString("Visitor Team Template");
+			editor.Template = VisitorTeamTemplate;
+			if(editor.Run() == (int)ResponseType.Apply) {
+				VisitorTeamTemplate = editor.Template;
+			}
+			editor.Destroy();
 			OnEdited(this,null);
 		}
 
diff --git a/LongoMatch/Gui/Component/TeamTemplateWidget.cs b/LongoMatch/Gui/Component/TeamTemplateWidget.cs
index c62ca31..abb0e13 100644
--- a/LongoMatch/Gui/Component/TeamTemplateWidget.cs
+++ b/LongoMatch/Gui/Component/TeamTemplateWidget.cs
@@ -17,6 +17,8 @@
 //
 
 using Gtk;
+
+using LongoMatch.Interfaces;
 using LongoMatch.Store;
 using LongoMatch.Store.Templates;
 
@@ -26,7 +28,7 @@ namespace LongoMatch.Gui.Component
 
 
 	[System.ComponentModel.ToolboxItem(true)]
-	public partial class TeamTemplateWidget : Gtk.Bin
+	public partial class TeamTemplateWidget : Gtk.Bin, ITemplateWidget<TeamTemplate>
 	{
 		private TeamTemplate template;
 		private Player selectedPlayer;
@@ -37,7 +39,7 @@ namespace LongoMatch.Gui.Component
 			this.Build();
 		}
 
-		public TeamTemplate TeamTemplate {
+		public TeamTemplate Template {
 			get {
 				return template;
 			}
diff --git a/LongoMatch/Gui/Component/TemplatesEditorBase.cs b/LongoMatch/Gui/Component/TemplatesEditorBase.cs
new file mode 100644
index 0000000..3b6a25b
--- /dev/null
+++ b/LongoMatch/Gui/Component/TemplatesEditorBase.cs
@@ -0,0 +1,333 @@
+// CategoriesPropertiesWidget.cs
+//  Copyright (C) 2007-2009 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.IO;
+using Gdk;
+using Gtk;
+
+using LongoMatch.Gui.Dialog;
+using LongoMatch.Interfaces;
+using LongoMatch.IO;
+using LongoMatch.Store;
+using LongoMatch.Store.Templates;
+using Mono.Unix;
+
+
+namespace LongoMatch.Gui.Component
+{
+
+
+	[System.ComponentModel.Category("LongoMatch")]
+	[System.ComponentModel.ToolboxItem(true)]
+	public partial class TemplatesEditorBase : Gtk.Bin
+	{
+		public TemplatesEditorBase()
+		{
+			this.Build();
+		}
+		
+		public bool CanExport {
+			get {
+				return hseparator1.Visible;
+			}
+			set {
+				hseparator1.Visible = value;
+				exportbutton.Visible = value;
+			}
+		}
+		public bool Edited {
+			get;
+			set;
+		}
+		
+		public bool InProject {
+			get;
+			set;
+		}
+		
+		protected void AddTreeView (Widget w) {
+			scrolledwindow2.Add(w);
+			w.Show();
+		}
+		
+		protected bool ButtonsSensitive {
+			set {
+				newprevbutton.Sensitive = value;
+				newafterbutton.Sensitive = value;
+				removebutton.Sensitive = value;
+				editbutton.Sensitive = value;
+			}
+		}
+		
+		protected void MultipleSelection() {
+			newprevbutton.Sensitive = false;
+			newafterbutton.Sensitive = false;
+			removebutton.Sensitive = true;
+			editbutton.Sensitive = false;
+		}
+
+		protected virtual void OnNewAfter(object sender, EventArgs args) {}
+
+		protected virtual void OnNewBefore(object sender, EventArgs args) {}
+
+		protected virtual void OnRemove(object sender, EventArgs args) {}
+
+		protected virtual void OnEdit(object sender, EventArgs args) {}
+
+		protected virtual void OnKeyPressEvent(object o, Gtk.KeyPressEventArgs args) {}
+		
+		protected virtual void OnExportbuttonClicked(object sender, System.EventArgs e) {}
+	}
+	
+	public abstract class TemplatesEditorWidget<T, U> : TemplatesEditorBase, ITemplateWidget<T, U> where T: ITemplate<U>
+	{
+		protected T template;
+		protected List<U> selected;
+		protected ITemplateProvider<T, U> provider;
+		
+		public TemplatesEditorWidget (): base()
+		{
+			provider = MainClass.ts.GetTemplateProvider<T, U>();
+		}
+		
+		public abstract T Template {get; set;}
+		
+		protected void UpdateModel() {
+			Template = Template;
+		}
+
+		protected virtual void RemoveSelected() {
+			UpdateModel();
+			Edited = true;
+			selected = null;
+			ButtonsSensitive=false;
+		}
+
+		protected abstract void EditSelected();
+		
+		protected abstract void AddItem(int item);
+
+		protected override void OnNewAfter(object sender, EventArgs args) {
+			AddItem(template.IndexOf(selected[0])+1);
+		}
+
+		protected override void OnNewBefore(object sender, EventArgs args) {
+			AddItem(template.IndexOf(selected[0]));
+		}
+
+		protected override void OnRemove(object sender, EventArgs args) {
+			RemoveSelected();
+		}
+
+		protected override void OnEdit(object sender, EventArgs args) {
+			EditSelected();
+		}
+
+		protected override  void OnKeyPressEvent(object o, Gtk.KeyPressEventArgs args)
+		{
+			if(args.Event.Key == Gdk.Key.Delete && selected != null)
+				RemoveSelected();
+		}
+
+		protected override void OnExportbuttonClicked(object sender, System.EventArgs e)
+		{
+			EntryDialog dialog = new EntryDialog();
+			dialog.TransientFor = (Gtk.Window)this.Toplevel;
+			dialog.ShowCount = false;
+			dialog.Text = Catalog.GetString("New template");
+			if(dialog.Run() == (int)ResponseType.Ok) {
+				if(dialog.Text == "")
+					MessagePopup.PopupMessage(dialog, MessageType.Error,
+					                          Catalog.GetString("The template name is void."));
+				else if(provider.Exists(dialog.Text)) {
+					MessageDialog md = new MessageDialog(null,
+					                                     DialogFlags.Modal,
+					                                     MessageType.Question,
+					                                     Gtk.ButtonsType.YesNo,
+					                                     Catalog.GetString("The template already exists. " +
+					                                                     "Do you want to overwrite it ?")
+					                                    );
+					if(md.Run() == (int)ResponseType.Yes){
+						Template.Name = dialog.Text;
+						provider.Save (Template);
+					}
+					md.Destroy();
+				}
+				else {
+					Template.Name = dialog.Text;
+					provider.Save (Template);
+				}
+			}
+			dialog.Destroy();
+		}
+	}
+	
+	public class CategoriesTemplateEditorWidget: TemplatesEditorWidget<Categories, Category> 
+	{
+		private CategoriesTreeView categoriestreeview;
+		private List<HotKey> hkList;
+
+		public CategoriesTemplateEditorWidget (): base()
+		{
+			hkList = new List<HotKey>();
+			categoriestreeview = new CategoriesTreeView();
+			categoriestreeview.CategoryClicked += this.OnCategoryClicked;
+			categoriestreeview.CategoriesSelected += this.OnCategoriesSelected;
+			AddTreeView(categoriestreeview);
+		}
+		
+		public override Categories Template {
+			get {
+				return template;
+			}
+			set {
+				template = value;
+				Edited = false;
+				Gtk.TreeStore categoriesListStore = new Gtk.TreeStore(typeof(Category));
+				hkList.Clear();
+
+				foreach(var cat in template) {
+					categoriesListStore.AppendValues(cat);
+					try {
+						hkList.Add(cat.HotKey);
+					} catch {}; //Do not add duplicated hotkeys
+				}
+				categoriestreeview.Model = categoriesListStore;
+				ButtonsSensitive = false;
+			}
+		}
+		
+		protected override void AddItem(int index) {
+			UpdateModel();
+			Edited = true;
+		}
+
+
+		protected override void RemoveSelected (){
+			if(InProject) {
+				MessageDialog dialog = new MessageDialog((Gtk.Window)this.Toplevel,DialogFlags.Modal,MessageType.Question,
+				                                         ButtonsType.YesNo,true,
+				                                         Catalog.GetString("You are about to delete a category and all the plays added to this category. Do you want to proceed?"));
+				if(dialog.Run() == (int)ResponseType.Yes) {
+					try {
+						foreach(var item in selected)
+							template.Remove(item);
+					} catch {
+						MessagePopup.PopupMessage(this,MessageType.Warning,
+						                          Catalog.GetString("A template needs at least one category"));
+					}
+				}
+				dialog.Destroy();
+			} else {
+				foreach(Category cat in selected) {
+					if(template.Count == 1) {
+						MessagePopup.PopupMessage(this,MessageType.Warning,
+						                          Catalog.GetString("A template needs at least one category"));
+					} else
+						template.Remove(cat);
+				}
+			}	
+			base.RemoveSelected();
+		}
+		
+		protected override void EditSelected() {
+			EditCategoryDialog dialog = new EditCategoryDialog();
+			dialog.Category = selected[0];
+			dialog.HotKeysList = hkList;
+			dialog.TransientFor = (Gtk.Window) Toplevel;
+			dialog.Run();
+			dialog.Destroy();
+			Edited = true;
+		}
+		private void OnCategoryClicked(Category cat)
+		{
+			selected = new List<Category> ();
+			selected.Add (cat);
+			EditSelected();
+		}
+
+		private void OnCategoriesSelected(List<Category> catList)
+		{
+			selected = catList;
+			if(catList.Count == 0)
+				ButtonsSensitive = false;
+			else if(catList.Count == 1) {
+				ButtonsSensitive = true;
+			}
+			else {
+				MultipleSelection();
+			}
+		}
+	}
+	
+	
+	public class TeamTemplateEditorWidget: TemplatesEditorWidget<TeamTemplate, Player>
+	{	
+		private PlayerPropertiesTreeView treeview;
+		
+		public TeamTemplateEditorWidget () {
+			treeview = new PlayerPropertiesTreeView(); 
+			treeview.PlayerClicked += this.OnPlayerClicked;
+			treeview.PlayerSelected += this.OnPlayersSelected;
+			AddTreeView(treeview);
+		}
+		
+		public override  TeamTemplate Template {
+			get {
+				return template;
+			}
+			set {
+				template= value;
+				Edited = false;
+				Gtk.TreeStore playersListStore = new Gtk.TreeStore(typeof(Player));
+				foreach(Player player in template)
+					playersListStore.AppendValues(player);
+				treeview.Model=playersListStore;
+			}
+		}
+		
+		protected override void AddItem(int index) {
+			UpdateModel();
+			Edited = true;
+		}
+
+		protected override void EditSelected() {
+			LongoMatch.Gui.Dialog.EditPlayerDialog dialog = new LongoMatch.Gui.Dialog.EditPlayerDialog();
+			dialog.Player=selected[0];
+			dialog.TransientFor = (Gtk.Window) Toplevel;
+			dialog.Run();
+			dialog.Destroy();
+			Edited = true;
+		}
+
+		protected virtual void OnPlayerClicked(LongoMatch.Store.Player player)
+		{
+			selected = new List<Player>();
+			selected.Add(player);
+			EditSelected();
+		}
+
+		protected virtual void OnPlayersSelected(LongoMatch.Store.Player player)
+		{
+			selected = new List<Player>();
+			selected.Add(player);
+		}
+	}
+}
diff --git a/LongoMatch/Gui/Dialog/EntryDialog.cs b/LongoMatch/Gui/Dialog/EntryDialog.cs
index 0595bba..b6584c3 100644
--- a/LongoMatch/Gui/Dialog/EntryDialog.cs
+++ b/LongoMatch/Gui/Dialog/EntryDialog.cs
@@ -35,7 +35,7 @@ namespace LongoMatch.Gui.Dialog
 		public EntryDialog()
 		{
 			this.Build();
-			ShowCount = false;
+			ShowCount = showCount;
 			setAvailableTemplatesVisible(false);
 		}
 
diff --git a/LongoMatch/Gui/Dialog/TeamTemplateEditor.cs b/LongoMatch/Gui/Dialog/TeamTemplateEditor.cs
index 53ede37..34f3096 100644
--- a/LongoMatch/Gui/Dialog/TeamTemplateEditor.cs
+++ b/LongoMatch/Gui/Dialog/TeamTemplateEditor.cs
@@ -31,12 +31,13 @@ namespace LongoMatch.Gui.Dialog
 			this.Build();
 		}
 
-		public void SetTeamTemplate(TeamTemplate template) {
-			teamtemplatewidget1.TeamTemplate=template;
-		}
-
-		public TeamTemplate GetTeamTemplate() {
-			return teamtemplatewidget1.TeamTemplate;
+		public TeamTemplate Template {
+			set {
+				teamtemplatewidget1.Template = value;
+			}
+			get {
+				return teamtemplatewidget1.Template;
+			}
 		}
 	}
 }
diff --git a/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs b/LongoMatch/Gui/Dialog/TemplateEditorDialog.cs
similarity index 58%
rename from LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs
rename to LongoMatch/Gui/Dialog/TemplateEditorDialog.cs
index 7445443..cf3162a 100644
--- a/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs
+++ b/LongoMatch/Gui/Dialog/TemplateEditorDialog.cs
@@ -18,6 +18,9 @@
 //
 //
 using System;
+using Gtk;
+
+using LongoMatch.Interfaces;
 using LongoMatch.Store;
 using LongoMatch.Store.Templates;
 
@@ -26,38 +29,51 @@ namespace LongoMatch.Gui.Dialog
 
 	[System.ComponentModel.Category("LongoMatch")]
 	[System.ComponentModel.ToolboxItem(false)]
-	public partial class ProjectTemplateEditorDialog : Gtk.Dialog
+	public abstract partial class TemplateEditorDialog: Gtk.Dialog
 	{
-
-		public ProjectTemplateEditorDialog()
+		public TemplateEditorDialog()
 		{
 			this.Build();
-			projecttemplatewidget.CanExport = true;
 		}
-
-		public Project Project {
+		
+		public void AddTemplateEditor (Widget w){
+			templateeditorbox.Add(w);
+			w.Show();
+		}
+	}
+	
+	public class TemplateEditorDialog<T, U> : TemplateEditorDialog where T: ITemplate<U> {
+		ITemplateWidget<T, U> templateEditor;
+		
+		public TemplateEditorDialog () {
+			templateEditor = MainClass.ts.GetTemplateEditor<T, U> ();
+			templateEditor.CanExport = true;
+			AddTemplateEditor ((Widget)templateEditor);
+			
+		}
+		
+		public bool CanExport {
 			set {
-				projecttemplatewidget.Project = value;
+				templateEditor.CanExport = value;
 			}
 		}
-
-		public Categories Categories {
-			set {
-				projecttemplatewidget.Categories =value;
+		
+		public bool InProject {
+			set{
+				templateEditor.InProject = value;
 			}
-			get {
-				return projecttemplatewidget.Categories;
+			get{
+				return templateEditor.InProject;
 			}
 		}
-
-		public bool CanExport {
+		
+		public T Template {
 			set {
-				projecttemplatewidget.CanExport = value;
+				templateEditor.Template =value;
+			}
+			get {
+				return templateEditor.Template;
 			}
-		}
-
-		protected virtual void OnButtonOkClicked(object sender, System.EventArgs e)
-		{
 		}
 
 	}
diff --git a/LongoMatch/Gui/Dialog/TemplatesEditor.cs b/LongoMatch/Gui/Dialog/TemplatesManager.cs
similarity index 50%
rename from LongoMatch/Gui/Dialog/TemplatesEditor.cs
rename to LongoMatch/Gui/Dialog/TemplatesManager.cs
index 1aed71c..6501797 100644
--- a/LongoMatch/Gui/Dialog/TemplatesEditor.cs
+++ b/LongoMatch/Gui/Dialog/TemplatesManager.cs
@@ -20,68 +20,100 @@
 
 using System;
 using System.Collections.Generic;
+using System.IO;
 using Gtk;
-using LongoMatch.Store.Templates;
 using Mono.Unix;
 
+using LongoMatch.Interfaces;
+using LongoMatch.Gui.Component;
+using LongoMatch.Store.Templates;
+using LongoMatch.Services;
+
 namespace LongoMatch.Gui.Dialog
 {
 
-
+	/* HACK: Stetic doesn't allow the use of generics, which is needed for 
+	 * the different types of Template classes */
 	[System.ComponentModel.Category("LongoMatch")]
 	[System.ComponentModel.ToolboxItem(false)]
 	public partial class TemplatesManager : Gtk.Dialog
 	{
-
-		public enum UseType {
-			TeamTemplate,
-			CategoriesTemplate,
+		protected virtual void OnSavebuttonClicked(object sender, System.EventArgs e) {}
+		protected virtual void OnNewbuttonClicked(object sender, System.EventArgs e) {}
+		protected virtual void OnDeletebuttonClicked(object sender, System.EventArgs e) {}
+		protected virtual void OnButtonCancelClicked(object sender, System.EventArgs e) {}
+		protected virtual void OnTreeviewCursorChanged(object sender, System.EventArgs e) {}
+		protected virtual void OnButtonOkClicked(object sender, System.EventArgs e) {}
+		protected virtual void OnTreeviewRowActivated(object o, Gtk.RowActivatedArgs args) {}
+		
+		public TemplatesManager () {
+			this.Build();
 		}
-
-
+		
+		public TreeView TreeView {
+			get {
+				return treeview;
+			}
+		}
+		
+		public new bool Sensitive {
+			set{
+				savebutton.Sensitive = value;
+				deletebutton.Sensitive = value;
+				base.Sensitive = value;
+			}
+		}
+		
+		public void AddTemplateEditor (Widget w) {
+			templateditorbox.Add(w);
+			w.Show();
+		}
+	}
+	
+	public class TemplatesManager<T, U> : TemplatesManager where T: ITemplate<U>
+	{
+		private TreeView treeview;
 		private Gtk.ListStore dataFileListStore;
-		private Categories selectedCategoriesTemplate;
-		private TeamTemplate selectedTeamTemplate;
-		private UseType useType;
+		private ITemplateProvider<T, U> templatesProvider;
+		private T selectedTemplate;
+		private ITemplateWidget<T, U> templatesWidget;
 		private string templateName;
-		private string fileExtension;
 
-		public TemplatesManager(UseType type)
+		public TemplatesManager() : base()
 		{
-			this.Build();
+			treeview = this.TreeView;
+			templatesProvider = MainClass.ts.GetTemplateProvider<T, U> ();
+			templatesWidget = MainClass.ts.GetTemplateEditor <T, U> ();
+			AddTemplateEditor ((Widget) templatesWidget);
+			
 			Gtk.TreeViewColumn templateFileColumn = new Gtk.TreeViewColumn();
 			templateFileColumn.Title = Catalog.GetString("Templates Files");
 			Gtk.CellRendererText templateFileCell = new Gtk.CellRendererText();
 			templateFileColumn.PackStart(templateFileCell, true);
 			templateFileColumn.SetCellDataFunc(templateFileCell, new Gtk.TreeCellDataFunc(RenderTemplateFile));
 			treeview.AppendColumn(templateFileColumn);
-			Use = type;
-			sectionspropertieswidget1.CanExport = false;
+			Fill();
 		}
-
-		public UseType Use {
+		
+		public new bool Sensitive {
+			set{
+				(templatesWidget as Widget).Sensitive = value;
+				base.Sensitive = value;
+			}
+		}
+		
+		public bool Edited {
 			set {
-				useType = value;
-				if(useType == UseType.TeamTemplate) {
-					fileExtension = ".tem";
-					teamtemplatewidget1.Visible = true;
-
-				}
-				else {
-					fileExtension=".sct";
-					sectionspropertieswidget1.Visible = true;
-				}
-				Fill();
+				templatesWidget.Edited = value;
+			}
+			get {
+				return templatesWidget.Edited;
 			}
 		}
-
-		//Recorrer el directorio en busca de los archivos de configuraci..n validos
 		private void Fill() {
-			string[] allFiles = System.IO.Directory.GetFiles(MainClass.TemplatesDir(),"*"+fileExtension);
-
 			dataFileListStore = new Gtk.ListStore(typeof(string));
 
-			foreach(string filePath in allFiles) {
+			foreach(string filePath in templatesProvider.TemplatesNames) {
 				dataFileListStore.AppendValues(filePath);
 			}
 			treeview.Model = dataFileListStore;
@@ -89,54 +121,32 @@ namespace LongoMatch.Gui.Dialog
 
 		private void RenderTemplateFile(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
 		{
-			string _templateFilePath = (string) model.GetValue(iter, 0);
-			(cell as Gtk.CellRendererText).Text = System.IO.Path.GetFileNameWithoutExtension(_templateFilePath.ToString());
+			(cell as Gtk.CellRendererText).Text = (string) model.GetValue(iter, 0);
 		}
-
-		public void SetCategoriesTemplate(Categories sections) {
-			if(useType != UseType.CategoriesTemplate)
-				return;
-			sectionspropertieswidget1.Categories=sections;
+		
+		public void SetTemplate (T template) {
+			templatesWidget.Template = template;
 		}
-
-		public void SetTeamTemplate(TeamTemplate template) {
-			if(useType != UseType.TeamTemplate)
-				return;
-			teamtemplatewidget1.TeamTemplate=template;
+		
+		private void UpdateSelectedTemplate() {
+			templatesWidget.Template = templatesProvider.Load(templateName); 
 		}
-
-		private void UpdateCategories() {
-			selectedCategoriesTemplate = Categories.Load(templateName);
-			SetCategoriesTemplate(selectedCategoriesTemplate);
-			SetSensitive(true);
-		}
-
-		private void UpdateTeamTemplate() {
-			selectedTeamTemplate = TeamTemplate.Load(templateName);
-			SetTeamTemplate(selectedTeamTemplate);
-			SetSensitive(true);
-		}
-
-		private void SetSensitive(bool sensitive) {
-			if(useType == UseType.CategoriesTemplate)
-				sectionspropertieswidget1.Sensitive = true;
-			else
-				teamtemplatewidget1.Sensitive = true;
-			savebutton.Sensitive = sensitive;
-			deletebutton.Sensitive = sensitive;
+		
+		private void SaveTemplate() {
+			selectedTemplate = templatesWidget.Template;
+			templatesProvider.Save(selectedTemplate);
 		}
 
-		private void SelectTemplate(string templateName) {
+		private void SelectTemplate(string name) {
 			TreeIter iter;
 			string tName;
 			ListStore model = (ListStore)treeview.Model;
 
 			model.GetIterFirst(out iter);
 			while(model.IterIsValid(iter)) {
-				tName = System.IO.Path.GetFileNameWithoutExtension((string) model.GetValue(iter,0));
-				if(tName == templateName) {
-					//Do not delete 'this' as we want to change the class attribute
-					this.templateName = templateName = (string) this.dataFileListStore.GetValue(iter, 0);
+				tName = (string) model.GetValue(iter,0);
+				if(tName == name) {
+					this.templateName = tName;
 					treeview.SetCursor(model.GetPath(iter),null,false);
 					return;
 				}
@@ -144,56 +154,38 @@ namespace LongoMatch.Gui.Dialog
 			}
 		}
 
-		private void SaveTemplate() {
-			if(useType == UseType.CategoriesTemplate) {
-				selectedCategoriesTemplate = sectionspropertieswidget1.Categories;
-				selectedCategoriesTemplate.Save(templateName);
-			}
-			else {
-				selectedTeamTemplate = teamtemplatewidget1.TeamTemplate;
-				selectedTeamTemplate.Save(templateName);
-			}
-		}
-
 		private void PromptForSave() {
-			MessageDialog mes = new MessageDialog(this,DialogFlags.Modal,MessageType.Question,ButtonsType.YesNo,
-			                                      Catalog.GetString("The template has been modified. Do you want to save it? "));
+			MessageDialog mes = new MessageDialog(this,DialogFlags.Modal,
+			                                      MessageType.Question,
+			                                      ButtonsType.YesNo,
+			                                      Catalog.GetString("The template has been modified. " +
+			                                                        "Do you want to save it? "));
 			if(mes.Run() == (int)ResponseType.Yes) {
 				SaveTemplate();
 			}
 			mes.Destroy();
 		}
 
-		protected virtual void OnSavebuttonClicked(object sender, System.EventArgs e)
+		protected override void OnSavebuttonClicked(object sender, System.EventArgs e)
 		{
 			SaveTemplate();
-			sectionspropertieswidget1.Edited=false;
-			teamtemplatewidget1.Edited=false;
+			Edited = false;
 		}
 
-		protected virtual void OnNewbuttonClicked(object sender, System.EventArgs e)
+		protected override void OnNewbuttonClicked(object sender, System.EventArgs e)
 		{
 			string name;
 			int count;
-			string [] templates = null;
 			List<string> availableTemplates = new List<string>();
-			EntryDialog ed= new  EntryDialog();
-
-			ed.Title = Catalog.GetString("Template name");
-
-			if(useType == UseType.TeamTemplate) {
-				ed.ShowCount=true;
-			}
-
-			templates = System.IO.Directory.GetFiles(MainClass.TemplatesDir());
-			foreach(String text in templates) {
-				string templateName = System.IO.Path.GetFileName(text);
-				if(templateName.EndsWith(fileExtension) && templateName != "default"+fileExtension)
+			EntryDialog ed = new  EntryDialog{ShowCount = true,
+				Title = Catalog.GetString("Template name")};
+			
+			foreach(string templateName in templatesProvider.TemplatesNames) {
+				if(templateName != "default")
 					availableTemplates.Add(templateName);
 			}
 			ed.AvailableTemplates = availableTemplates;
 
-
 			if(ed.Run() == (int)ResponseType.Ok) {
 				name = ed.Text;
 				count = ed.Count;
@@ -202,44 +194,38 @@ namespace LongoMatch.Gui.Dialog
 					                          Catalog.GetString("You cannot create a template with a void name"));
 					ed.Destroy();
 					return;
-				}
-				if(System.IO.File.Exists(System.IO.Path.Combine(MainClass.TemplatesDir(),name+fileExtension))) {
+				} else if (templatesProvider.Exists(name)) {
 					MessagePopup.PopupMessage(ed, MessageType.Warning,
 					                          Catalog.GetString("A template with this name already exists"));
 					ed.Destroy();
 					return;
 				}
 
+				/* Check if we are copying an existing template */
 				if(ed.SelectedTemplate != null)
-					System.IO.File.Copy(System.IO.Path.Combine(MainClass.TemplatesDir(),ed.SelectedTemplate),
-					                    System.IO.Path.Combine(MainClass.TemplatesDir(),name+fileExtension));
-				else if(useType == UseType.CategoriesTemplate) {
-					Categories cat = Categories.DefaultTemplate();
-					cat.Save(name+fileExtension);
-				}
-				else {
-					TeamTemplate tt = TeamTemplate.DefaultTemplate(count);
-					tt.Save(System.IO.Path.Combine(MainClass.TemplatesDir(), name+fileExtension));
-				}
-
+					templatesProvider.Copy(ed.SelectedTemplate, name);
+				else
+					templatesProvider.Create(name, count);
+				
 				Fill();
 				SelectTemplate(name);
 			}
 			ed.Destroy();
 		}
 
-		protected virtual void OnDeletebuttonClicked(object sender, System.EventArgs e)
+		protected override void OnDeletebuttonClicked(object sender, System.EventArgs e)
 		{
-			if(System.IO.Path.GetFileNameWithoutExtension(templateName) =="default") {
-				MessagePopup.PopupMessage(this,MessageType.Warning,Catalog.GetString("You can't delete the 'default' template"));
+			if(templateName =="default") {
+				MessagePopup.PopupMessage(this,MessageType.Warning,
+				                          Catalog.GetString("You can't delete the 'default' template"));
 				return;
 			}
 
 			MessageDialog mes = new MessageDialog(this,DialogFlags.Modal,MessageType.Warning,ButtonsType.YesNo,
 			                                      Catalog.GetString("Do you really want to delete the template: ")+
-			                                      System.IO.Path.GetFileNameWithoutExtension(templateName));
+			                                      templateName);
 			if(mes.Run() == (int)ResponseType.Yes) {
-				System.IO.File.Delete(templateName);
+				templatesProvider.Delete(templateName);
 				this.Fill();
 				//The default template is always there so we select this one.
 				//This allow to reset all the fields in the sections/players
@@ -249,41 +235,35 @@ namespace LongoMatch.Gui.Dialog
 			mes.Destroy();
 		}
 
-		protected virtual void OnButtonCancelClicked(object sender, System.EventArgs e)
+		protected override void OnButtonCancelClicked(object sender, System.EventArgs e)
 		{
 			this.Destroy();
 		}
 
-		protected virtual void OnTreeviewCursorChanged(object sender, System.EventArgs e)
+		protected override void OnTreeviewCursorChanged(object sender, System.EventArgs e)
 		{
 			TreeIter iter;
 
-			if(sectionspropertieswidget1.Edited || teamtemplatewidget1.Edited)
+			if(Edited)
 				PromptForSave();
 
 			treeview.Selection.GetSelected(out iter);
 			templateName = (string) this.dataFileListStore.GetValue(iter, 0);
 
-			if(useType == UseType.CategoriesTemplate)
-				UpdateCategories();
-
-			else
-				UpdateTeamTemplate();
+			UpdateSelectedTemplate();
+			Sensitive = true;
 		}
 
-		protected virtual void OnButtonOkClicked(object sender, System.EventArgs e)
+		protected override void OnButtonOkClicked(object sender, System.EventArgs e)
 		{
-			if(sectionspropertieswidget1.Edited)
+			if(Edited)
 				PromptForSave();
 			this.Destroy();
 		}
 
-		protected virtual void OnTreeviewRowActivated(object o, Gtk.RowActivatedArgs args)
+		protected override void OnTreeviewRowActivated(object o, Gtk.RowActivatedArgs args)
 		{
-			if(useType == UseType.CategoriesTemplate)
-				UpdateCategories();
-			else
-				UpdateTeamTemplate();
+			UpdateSelectedTemplate();
 		}
 	}
 }
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index 19ee31e..5632a79 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -28,6 +28,7 @@ using LongoMatch.Common;
 using LongoMatch.Gui.Dialog;
 using LongoMatch.Handlers;
 using LongoMatch.Store;
+using LongoMatch.Store.Templates;
 using LongoMatch.Utils;
 using LongoMatch.Video.Capturer;
 using LongoMatch.Video.Common;
@@ -423,14 +424,14 @@ namespace LongoMatch.Gui
 
 		protected virtual void OnSectionsTemplatesManagerActivated(object sender, System.EventArgs e)
 		{
-			TemplatesManager tManager = new TemplatesManager(TemplatesManager.UseType.CategoriesTemplate);
+			var tManager = new TemplatesManager<Categories, Category>();
 			tManager.TransientFor = this;
 			tManager.Show();
 		}
 
 		protected virtual void OnTeamsTemplatesManagerActionActivated(object sender, System.EventArgs e)
 		{
-			TemplatesManager tManager = new TemplatesManager(TemplatesManager.UseType.TeamTemplate);
+			var tManager = new TemplatesManager<TeamTemplate, Player>();
 			tManager.TransientFor = this;
 			tManager.Show();
 		}
diff --git a/LongoMatch/Interfaces/ITemplates.cs b/LongoMatch/Interfaces/ITemplates.cs
index 80f8e0c..2d47317 100644
--- a/LongoMatch/Interfaces/ITemplates.cs
+++ b/LongoMatch/Interfaces/ITemplates.cs
@@ -26,6 +26,8 @@ namespace LongoMatch.Interfaces
 		string Name {get; set;}
 	}
 	
+	public interface ITemplate<T>: ITemplate, IList<T> {}
+	
 	public interface ITemplateProvider
 	{
 		void CheckDefaultTemplate();
@@ -36,16 +38,19 @@ namespace LongoMatch.Interfaces
 		void Create (string templateName, params object [] list);
 	}
 	
-	public interface ITemplateProvider<T>: ITemplateProvider where T: ITemplate
+	public interface ITemplateProvider<T, U>: ITemplateProvider where T: ITemplate<U>
 	{
 		List<T> Templates {get;}
 		T Load (string name);
-		void Save (ITemplate template);
+		void Save (ITemplate<U> template);
 	}
 	
-	public interface ITemplateWidget<T>
+	public interface ITemplateWidget<T, U> where T: ITemplate<U>
 	{
 		T Template {get; set;}
+		bool Edited {get; set;}
+		bool CanExport {get; set;}
+		bool InProject {get; set;}
 	}
 }
 
diff --git a/LongoMatch/LongoMatch.mdp b/LongoMatch/LongoMatch.mdp
index bedc404..2888b18 100644
--- a/LongoMatch/LongoMatch.mdp
+++ b/LongoMatch/LongoMatch.mdp
@@ -11,7 +11,7 @@
   </MonoDevelop.Autotools.MakefileInfo>
   <Configurations active="Release">
     <Configuration name="Debug" ctype="DotNetProjectConfiguration">
-      <Output directory="bin/Debug" assembly="LongoMatch.exe" assemblyKeyFile="." />
+      <Output directory="bin/Debug" assembly="LongoMatch.exe" assemblyKeyFile="/home/andoni/Proyectos/longomatch/LongoMatch/." />
       <Build debugmode="True" target="WinExe" />
       <Execution consolepause="True" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
       <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
@@ -34,7 +34,6 @@
     <File subtype="Directory" buildaction="Compile" name="Handlers" />
     <File subtype="Code" buildaction="Compile" name="Handlers/Handlers.cs" />
     <File subtype="Directory" buildaction="Compile" name="IO" />
-    <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="EmbedAsResource" name="images/longomatch.png" DeployService.RelativeDeployPath="images/longomatch.png" DeployService.TargetDirectoryId="CommonApplicationDataRoot" />
     <File subtype="Directory" buildaction="Compile" name="images" />
     <File subtype="Code" name="images/background.png" DeployService.Deploy="True" DeployService.RelativeDeployPath="images/background.png" DeployService.TargetDirectoryId="CommonApplicationDataRoot" buildaction="FileCopy" />
@@ -76,23 +75,20 @@
     <File subtype="Directory" buildaction="Compile" name="Gui/Popup" />
     <File subtype="Code" buildaction="Compile" name="Gui/Popup/CalendarPopup.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Popup/MessagePopup.cs" />
-    <File subtype="Code" buildaction="Compile" name="Gui/Dialog/ProjectTemplateEditorDialog.cs" />
+    <File subtype="Code" buildaction="Compile" name="Gui/Dialog/TemplateEditorDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/PlayersListTreeWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Dialog/ProjectsManager.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/PlayListWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/ProjectListWidget.cs" />
-    <File subtype="Code" buildaction="Compile" name="Gui/Dialog/TemplatesEditor.cs" />
-    <File subtype="Code" buildaction="Compile" name="Gui/Component/ProjectTemplateWidget.cs" />
+    <File subtype="Code" buildaction="Compile" name="Gui/Dialog/TemplatesManager.cs" />
+    <File subtype="Code" buildaction="Compile" name="Gui/Component/TemplatesEditorBase.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/TreeView/CategoriesTreeView.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/TimeLineWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/TimeScale.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Dialog/VideoEditionProperties.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/TimeReferenceWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/CategoryProperties.cs" />
-    <File subtype="Code" buildaction="Compile" name="Gui/Component/TeamTemplateWidget.cs" />
-    <File subtype="Code" buildaction="Compile" name="Gui/Component/TimeAdjustWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/PlaysListTreeWidget.cs" />
-    <File subtype="Code" buildaction="Compile" name="Gui/Dialog/TeamTemplateEditor.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/DrawingWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Dialog/DrawingTool.cs" />
     <File subtype="Code" buildaction="Compile" name="Handlers/VideoDrawingsManager.cs" />
@@ -124,11 +120,8 @@
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.OpenProjectDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs" />
-    <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.TimeAdjustWidget.cs" />
-    <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.ProjectTemplateWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.MainWindow.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs" />
-    <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.TimeLineWidget.cs" />
@@ -139,7 +132,6 @@
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.UpdateDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.HotKeySelectorDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.PlayerProperties.cs" />
-    <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.TeamTemplateWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.PlayersSelectionDialog.cs" />
@@ -148,7 +140,6 @@
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.EditPlayerDialog.cs" />
-    <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.TeamTemplateEditor.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.DrawingWidget.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs" />
@@ -171,34 +162,29 @@
     <File subtype="Code" buildaction="Compile" name="Store/ProjectDescription.cs" />
     <File subtype="Directory" buildaction="Compile" name="DB" />
     <File subtype="Code" buildaction="Compile" name="Store/Category.cs" />
-    <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="Compile" name="Store/Drawing.cs" />
-    <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="Compile" name="Store/DrawingsList.cs" />
-    <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="Compile" name="Store/HotKey.cs" />
-    <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="Compile" name="Store/PixbufTimeNode.cs" />
-    <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="Compile" name="Store/Play.cs" />
-    <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="Compile" name="Store/Player.cs" />
-    <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="Compile" name="Store/PlayListPlay.cs" />
-    <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="Compile" name="Store/Tag.cs" />
-    <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="Compile" name="Store/Time.cs" />
-    <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="Compile" name="Store/TimeNode.cs" />
-    <File subtype="Directory" buildaction="Compile" name="Time" />
     <File subtype="Code" buildaction="Compile" name="Store/Templates/TeamTemplate.cs" />
     <File subtype="Code" buildaction="Compile" name="Common/SerializableObject.cs" />
     <File subtype="Code" buildaction="Compile" name="Store/SubCategory.cs" />
-    <File subtype="Code" buildaction="Compile" name="Store/Templates/SubCategoriesTemplate.cs" />
+    <File subtype="Code" buildaction="Compile" name="Store/Templates/SubCategoryTemplate.cs" />
     <File subtype="Code" buildaction="Compile" name="Store/Templates/CategoriesTemplate.cs" />
     <File subtype="Code" buildaction="Compile" name="Common/Log.cs" />
     <File subtype="Code" buildaction="Compile" name="Common/ConsoleCrayon.cs" />
+    <File subtype="Directory" buildaction="Compile" name="Services" />
+    <File subtype="Code" buildaction="Compile" name="Services/TemplatesService.cs" />
+    <File subtype="Code" buildaction="Compile" name="Interfaces/ITemplates.cs" />
+    <File subtype="Code" buildaction="Compile" name="Interfaces/ISubCategory.cs" />
+    <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.TemplatesEditorBase.cs" />
+    <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.TemplateEditorDialog.cs" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
diff --git a/LongoMatch/Main.cs b/LongoMatch/Main.cs
index 60396f8..839aa62 100644
--- a/LongoMatch/Main.cs
+++ b/LongoMatch/Main.cs
@@ -51,8 +51,8 @@ namespace LongoMatch
 			//Configuramos el directorio base de la ejecucui..n y el directorio HOME
 			baseDirectory = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory,"../../");
 			homeDirectory = System.Environment.GetFolderPath(Environment.SpecialFolder.Personal);
-			configDirectory = System.IO.Path.Combine(homeDirectory,".longomatch");
-			homeDirectory = System.IO.Path.Combine(homeDirectory,Constants.SOFTWARE_NAME);
+			configDirectory = System.IO.Path.Combine(homeDirectory,".longomatch_dev");
+			homeDirectory = System.IO.Path.Combine(homeDirectory,Constants.SOFTWARE_NAME + "_dev");
 
 
 			if(Environment.OSVersion.Platform == PlatformID.Win32NT) {
diff --git a/LongoMatch/Services/TemplatesService.cs b/LongoMatch/Services/TemplatesService.cs
index bf17d56..38dad36 100644
--- a/LongoMatch/Services/TemplatesService.cs
+++ b/LongoMatch/Services/TemplatesService.cs
@@ -22,6 +22,7 @@ using System.Reflection;
 using Mono.Unix;
 
 using LongoMatch.Common;
+using LongoMatch.Gui.Component;
 using LongoMatch.Interfaces;
 using LongoMatch.Store;
 using LongoMatch.Store.Templates;
@@ -38,13 +39,13 @@ namespace LongoMatch.Services
 		{
 			dict = new Dictionary<Type, ITemplateProvider>();
 			dict.Add(typeof(SubCategoryTemplate),
-			         new TemplatesProvider<SubCategoryTemplate> (basePath,
+			         new TemplatesProvider<SubCategoryTemplate, string> (basePath,
 			                                                 Constants.SUBCAT_TEMPLATE_EXT));
 			dict.Add(typeof(TeamTemplate),
-			         new TemplatesProvider<TeamTemplate> (basePath,
+			         new TemplatesProvider<TeamTemplate, Player> (basePath,
 			                                                 Constants.TEAMS_TEMPLATE_EXT));
 			dict.Add(typeof(Categories),
-			         new TemplatesProvider<Categories> (basePath,
+			         new TemplatesProvider<Categories, Category> (basePath,
 			                                                 Constants.CAT_TEMPLATE_EXT));
 			CheckDefaultTemplates();
 		}
@@ -54,32 +55,40 @@ namespace LongoMatch.Services
 				t.CheckDefaultTemplate();
 		}
 		
-		public ITemplateProvider<T> GetTemplateProvider<T>() where T: ITemplate {
+		public ITemplateProvider<T, U> GetTemplateProvider<T, U>() where T: ITemplate<U> {
 			if (dict.ContainsKey(typeof(T)))
-				return (ITemplateProvider<T>)dict[typeof(T)];
+				return (ITemplateProvider<T, U>)dict[typeof(T)];
 			return null;
 		}
 		
-		public ITemplateProvider<SubCategoryTemplate> SubCategoriesTemplateProvider {
+		public ITemplateWidget<T, U> GetTemplateEditor<T, U>() where T: ITemplate<U>{
+			if (typeof(T) == typeof(Categories))
+				return (ITemplateWidget<T, U>) new CategoriesTemplateEditorWidget ();
+			if (typeof(T) == typeof(TeamTemplate))
+				return (ITemplateWidget<T, U>) new TeamTemplateEditorWidget();
+			return null;
+		}
+		
+		public ITemplateProvider<SubCategoryTemplate, string> SubCategoriesTemplateProvider {
 			get {
-				return (ITemplateProvider<SubCategoryTemplate>) dict[typeof(SubCategoryTemplate)]; 
+				return (ITemplateProvider<SubCategoryTemplate, string>) dict[typeof(SubCategoryTemplate)]; 
 			}
 		}
 		
-		public ITemplateProvider<TeamTemplate> TeamTemplateProvider {
+		public ITemplateProvider<TeamTemplate, Player> TeamTemplateProvider {
 			get {
-				return (ITemplateProvider<TeamTemplate>) dict[typeof(TeamTemplate)]; 
+				return (ITemplateProvider<TeamTemplate, Player>) dict[typeof(TeamTemplate)]; 
 			}
 		}
 
-		public ITemplateProvider<Categories> CategoriesTemplateProvider {
+		public ITemplateProvider<Categories, Category> CategoriesTemplateProvider {
 			get {
-				return (ITemplateProvider<Categories>) dict[typeof(Categories)]; 
+				return (ITemplateProvider<Categories, Category>) dict[typeof(Categories)]; 
 			}
 		}
 	}
 	
-	public class TemplatesProvider<T>: ITemplateProvider<T> where T: ITemplate
+	public class TemplatesProvider<T, U>: ITemplateProvider<T, U> where T: ITemplate<U>
 	{
 		private readonly string basePath;
 		private readonly string extension;
@@ -141,7 +150,7 @@ namespace LongoMatch.Services
 			return (T)methodLoad.Invoke(null, new object[] {GetPath(name)});
 		}
 		
-		public void Save (ITemplate template) {
+		public void Save (ITemplate<U> template) {
 			string filename =  GetPath(template.Name);
 			
 			Log.Information("Saving template " + filename);
@@ -180,7 +189,7 @@ namespace LongoMatch.Services
 			if (list.Length == 0)
 				list = new object[] {0};
 			Log.Information(String.Format("Creating default {0} template", typeof(T)));
-			ITemplate t =(ITemplate)methodDefaultTemplate.Invoke(null, list);
+			ITemplate<U> t =(ITemplate<U>)methodDefaultTemplate.Invoke(null, list);
 			t.Name = templateName;
 			Save(t);
 		}
diff --git a/LongoMatch/Store/SubCategory.cs b/LongoMatch/Store/SubCategory.cs
index 5c02fda..bf55c99 100644
--- a/LongoMatch/Store/SubCategory.cs
+++ b/LongoMatch/Store/SubCategory.cs
@@ -71,7 +71,7 @@ namespace LongoMatch.Store
 	}
 
 	[Serializable]
-	public class TagSubCategory: SubCategory<string> {}
+	public class TagSubCategory: SubCategory<string>, IList<string> {}
 
 	/// <summary>
 	/// SubCategory to tag Players
diff --git a/LongoMatch/Store/Templates/CategoriesTemplate.cs b/LongoMatch/Store/Templates/CategoriesTemplate.cs
index 510d1cf..44bdd68 100644
--- a/LongoMatch/Store/Templates/CategoriesTemplate.cs
+++ b/LongoMatch/Store/Templates/CategoriesTemplate.cs
@@ -37,7 +37,7 @@ namespace LongoMatch.Store.Templates
 	/// The <see cref="LongoMatch.DB.Project"/> must handle all the changes
 	/// </summary>
 	[Serializable]
-	public class Categories: List<Category>, ITemplate
+	public class Categories: List<Category>, ITemplate, ITemplate<Category>
 	{
 
 		/// <summary>
@@ -57,18 +57,18 @@ namespace LongoMatch.Store.Templates
 			return SerializableObject.Load<Categories>(filePath);
 		}
 
-		public static Categories DefaultTemplate() {
+		public static Categories DefaultTemplate(int count) {
 			Categories defaultTemplate = new Categories();
-			defaultTemplate.FillDefaultTemplate();
+			defaultTemplate.FillDefaultTemplate(count);
 			return defaultTemplate;
 		}
 
-		private void FillDefaultTemplate() {
+		private void FillDefaultTemplate(int count) {
 			Color c = new Color((Byte)255, (Byte)0, (Byte)0);
 			HotKey h = new HotKey();
 
 
-			for(int i=1; i<=20; i++) {
+			for(int i=1; i<=count; i++) {
 				PlayerSubCategory localplayers, visitorplayers;
 				TeamSubCategory team;
 
diff --git a/LongoMatch/Store/Templates/SubCategoryTemplate.cs b/LongoMatch/Store/Templates/SubCategoryTemplate.cs
index 770dda8..8f2524c 100644
--- a/LongoMatch/Store/Templates/SubCategoryTemplate.cs
+++ b/LongoMatch/Store/Templates/SubCategoryTemplate.cs
@@ -26,7 +26,7 @@ namespace LongoMatch.Store.Templates
 {
 
 	[Serializable]
-	public class SubCategoryTemplate: TagSubCategory, ITemplate
+	public class SubCategoryTemplate: TagSubCategory, ITemplate<string>
 	{
 
 		public SubCategoryTemplate() {}
@@ -39,7 +39,7 @@ namespace LongoMatch.Store.Templates
 			return SerializableObject.Load<SubCategoryTemplate>(filePath);
 		}
 		
-		public static SubCategoryTemplate DefaultTemplate (int count) {
+		public static SubCategoryTemplate DefaultTemplate (int not_used) {
 			SubCategoryTemplate template = new SubCategoryTemplate();
 			return template;
 		}
diff --git a/LongoMatch/Store/Templates/TeamTemplate.cs b/LongoMatch/Store/Templates/TeamTemplate.cs
index 9d7caa6..dcc0cbc 100644
--- a/LongoMatch/Store/Templates/TeamTemplate.cs
+++ b/LongoMatch/Store/Templates/TeamTemplate.cs
@@ -27,7 +27,7 @@ namespace LongoMatch.Store.Templates
 {
 	[Serializable]
 
-	public class TeamTemplate: List<Player>, ITemplate
+	public class TeamTemplate: List<Player>, ITemplate<Player>
 	{
 		public TeamTemplate() {}
 
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
index 24f1cf4..253617a 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
@@ -6,32 +6,60 @@ namespace LongoMatch.Gui.Component
 	{
 		private global::Gtk.VBox vbox3;
 
-		private global::Gtk.HBox hbox4;
+		private global::Gtk.Frame frame2;
 
-		private global::Gtk.Label label1;
-
-		private global::Gtk.Entry nameentry;
+		private global::Gtk.Alignment GtkAlignment5;
 
-		private global::LongoMatch.Gui.Component.TimeAdjustWidget timeadjustwidget1;
+		private global::Gtk.Table table2;
 
-		private global::Gtk.HBox hbox2;
+		private global::Gtk.ColorButton colorbutton1;
 
-		private global::Gtk.Label label4;
+		private global::Gtk.HBox hbox5;
 
-		private global::Gtk.ColorButton colorbutton1;
+		private global::Gtk.Label hotKeyLabel;
 
 		private global::Gtk.Button changebuton;
 
-		private global::Gtk.Label hotKeyLabel;
+		private global::Gtk.Label label1;
+
+		private global::Gtk.Label label4;
 
 		private global::Gtk.Label label6;
 
-		private global::Gtk.HBox hbox1;
+		private global::Gtk.Label label7;
+
+		private global::Gtk.Label label8;
 
-		private global::Gtk.Label label5;
+		private global::Gtk.Label label9;
+
+		private global::Gtk.SpinButton lagtimebutton;
+
+		private global::Gtk.SpinButton leadtimebutton;
+
+		private global::Gtk.Entry nameentry;
 
 		private global::Gtk.ComboBox sortmethodcombobox;
 
+		private global::Gtk.Label GtkLabel4;
+
+		private global::Gtk.Frame frame1;
+
+		private global::Gtk.Alignment GtkAlignment2;
+
+		private global::Gtk.VBox vbox1;
+
+		private global::Gtk.Button newfirstbutton;
+
+		private global::Gtk.HBox hbox3;
+
+		private global::Gtk.ComboBox subcatcombobox;
+
+		private global::Gtk.Button addbutton;
+
+		private global::Gtk.Button newbutton;
+
+		private global::Gtk.Label GtkLabel3;
+
 		protected virtual void Build ()
 		{
 			global::Stetic.Gui.Initialize (this);
@@ -43,113 +71,165 @@ namespace LongoMatch.Gui.Component
 			this.vbox3.Name = "vbox3";
 			this.vbox3.Spacing = 6;
 			// Container child vbox3.Gtk.Box+BoxChild
-			this.hbox4 = new global::Gtk.HBox ();
-			this.hbox4.Name = "hbox4";
-			this.hbox4.Spacing = 6;
-			// Container child hbox4.Gtk.Box+BoxChild
-			this.label1 = new global::Gtk.Label ();
-			this.label1.Name = "label1";
-			this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("Name:");
-			this.hbox4.Add (this.label1);
-			global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.label1]));
-			w1.Position = 0;
-			w1.Expand = false;
-			w1.Fill = false;
-			// Container child hbox4.Gtk.Box+BoxChild
-			this.nameentry = new global::Gtk.Entry ();
-			this.nameentry.CanFocus = true;
-			this.nameentry.Name = "nameentry";
-			this.nameentry.IsEditable = true;
-			this.nameentry.InvisibleChar = '.ùÅ';
-			this.hbox4.Add (this.nameentry);
-			global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.nameentry]));
-			w2.Position = 1;
-			this.vbox3.Add (this.hbox4);
-			global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox4]));
-			w3.Position = 0;
-			w3.Fill = false;
-			// Container child vbox3.Gtk.Box+BoxChild
-			this.timeadjustwidget1 = new global::LongoMatch.Gui.Component.TimeAdjustWidget ();
-			this.timeadjustwidget1.Events = ((global::Gdk.EventMask)(256));
-			this.timeadjustwidget1.Name = "timeadjustwidget1";
-			this.vbox3.Add (this.timeadjustwidget1);
-			global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.timeadjustwidget1]));
-			w4.Position = 1;
-			w4.Expand = false;
-			w4.Fill = false;
-			// Container child vbox3.Gtk.Box+BoxChild
-			this.hbox2 = new global::Gtk.HBox ();
-			this.hbox2.Name = "hbox2";
-			this.hbox2.Spacing = 6;
-			// Container child hbox2.Gtk.Box+BoxChild
-			this.label4 = new global::Gtk.Label ();
-			this.label4.Name = "label4";
-			this.label4.LabelProp = global::Mono.Unix.Catalog.GetString ("Color:        ");
-			this.hbox2.Add (this.label4);
-			global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.label4]));
-			w5.Position = 0;
-			w5.Expand = false;
-			w5.Fill = false;
-			// Container child hbox2.Gtk.Box+BoxChild
+			this.frame2 = new global::Gtk.Frame ();
+			this.frame2.Name = "frame2";
+			this.frame2.ShadowType = ((global::Gtk.ShadowType)(0));
+			// Container child frame2.Gtk.Container+ContainerChild
+			this.GtkAlignment5 = new global::Gtk.Alignment (0f, 0f, 1f, 1f);
+			this.GtkAlignment5.Name = "GtkAlignment5";
+			this.GtkAlignment5.LeftPadding = ((uint)(12));
+			// Container child GtkAlignment5.Gtk.Container+ContainerChild
+			this.table2 = new global::Gtk.Table (((uint)(3)), ((uint)(4)), false);
+			this.table2.Name = "table2";
+			this.table2.RowSpacing = ((uint)(6));
+			this.table2.ColumnSpacing = ((uint)(6));
+			// Container child table2.Gtk.Table+TableChild
 			this.colorbutton1 = new global::Gtk.ColorButton ();
 			this.colorbutton1.CanFocus = true;
 			this.colorbutton1.Events = ((global::Gdk.EventMask)(784));
 			this.colorbutton1.Name = "colorbutton1";
-			this.hbox2.Add (this.colorbutton1);
-			global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.colorbutton1]));
-			w6.Position = 1;
-			w6.Expand = false;
-			w6.Fill = false;
-			// Container child hbox2.Gtk.Box+BoxChild
+			this.table2.Add (this.colorbutton1);
+			global::Gtk.Table.TableChild w1 = ((global::Gtk.Table.TableChild)(this.table2[this.colorbutton1]));
+			w1.LeftAttach = ((uint)(3));
+			w1.RightAttach = ((uint)(4));
+			w1.XOptions = ((global::Gtk.AttachOptions)(4));
+			w1.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table2.Gtk.Table+TableChild
+			this.hbox5 = new global::Gtk.HBox ();
+			this.hbox5.Name = "hbox5";
+			this.hbox5.Spacing = 6;
+			// Container child hbox5.Gtk.Box+BoxChild
+			this.hotKeyLabel = new global::Gtk.Label ();
+			this.hotKeyLabel.Name = "hotKeyLabel";
+			this.hotKeyLabel.LabelProp = global::Mono.Unix.Catalog.GetString ("none");
+			this.hbox5.Add (this.hotKeyLabel);
+			global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox5[this.hotKeyLabel]));
+			w2.Position = 0;
+			w2.Expand = false;
+			w2.Fill = false;
+			// Container child hbox5.Gtk.Box+BoxChild
 			this.changebuton = new global::Gtk.Button ();
 			this.changebuton.CanFocus = true;
 			this.changebuton.Name = "changebuton";
 			this.changebuton.UseUnderline = true;
 			this.changebuton.Label = global::Mono.Unix.Catalog.GetString ("Change");
-			this.hbox2.Add (this.changebuton);
-			global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.changebuton]));
-			w7.PackType = ((global::Gtk.PackType)(1));
-			w7.Position = 2;
-			w7.Expand = false;
-			w7.Fill = false;
-			// Container child hbox2.Gtk.Box+BoxChild
-			this.hotKeyLabel = new global::Gtk.Label ();
-			this.hotKeyLabel.Name = "hotKeyLabel";
-			this.hotKeyLabel.LabelProp = global::Mono.Unix.Catalog.GetString ("none");
-			this.hbox2.Add (this.hotKeyLabel);
-			global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.hotKeyLabel]));
-			w8.PackType = ((global::Gtk.PackType)(1));
-			w8.Position = 3;
-			w8.Expand = false;
-			w8.Fill = false;
-			// Container child hbox2.Gtk.Box+BoxChild
+			this.hbox5.Add (this.changebuton);
+			global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox5[this.changebuton]));
+			w3.Position = 1;
+			w3.Expand = false;
+			w3.Fill = false;
+			this.table2.Add (this.hbox5);
+			global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table2[this.hbox5]));
+			w4.TopAttach = ((uint)(2));
+			w4.BottomAttach = ((uint)(3));
+			w4.LeftAttach = ((uint)(1));
+			w4.RightAttach = ((uint)(2));
+			w4.XOptions = ((global::Gtk.AttachOptions)(4));
+			w4.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table2.Gtk.Table+TableChild
+			this.label1 = new global::Gtk.Label ();
+			this.label1.Name = "label1";
+			this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("Name:");
+			this.table2.Add (this.label1);
+			global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table2[this.label1]));
+			w5.XOptions = ((global::Gtk.AttachOptions)(4));
+			w5.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table2.Gtk.Table+TableChild
+			this.label4 = new global::Gtk.Label ();
+			this.label4.Name = "label4";
+			this.label4.LabelProp = global::Mono.Unix.Catalog.GetString ("Color:        ");
+			this.table2.Add (this.label4);
+			global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table2[this.label4]));
+			w6.LeftAttach = ((uint)(2));
+			w6.RightAttach = ((uint)(3));
+			w6.XOptions = ((global::Gtk.AttachOptions)(4));
+			w6.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table2.Gtk.Table+TableChild
 			this.label6 = new global::Gtk.Label ();
 			this.label6.Name = "label6";
 			this.label6.LabelProp = global::Mono.Unix.Catalog.GetString ("HotKey:");
-			this.hbox2.Add (this.label6);
-			global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.label6]));
-			w9.PackType = ((global::Gtk.PackType)(1));
-			w9.Position = 4;
-			w9.Expand = false;
-			w9.Fill = false;
-			this.vbox3.Add (this.hbox2);
-			global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox2]));
-			w10.Position = 2;
-			w10.Fill = false;
-			// Container child vbox3.Gtk.Box+BoxChild
-			this.hbox1 = new global::Gtk.HBox ();
-			this.hbox1.Name = "hbox1";
-			this.hbox1.Spacing = 6;
-			// Container child hbox1.Gtk.Box+BoxChild
-			this.label5 = new global::Gtk.Label ();
-			this.label5.Name = "label5";
-			this.label5.LabelProp = global::Mono.Unix.Catalog.GetString ("Sort Method");
-			this.hbox1.Add (this.label5);
-			global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.label5]));
-			w11.Position = 0;
-			w11.Expand = false;
-			w11.Fill = false;
-			// Container child hbox1.Gtk.Box+BoxChild
+			this.table2.Add (this.label6);
+			global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table2[this.label6]));
+			w7.TopAttach = ((uint)(2));
+			w7.BottomAttach = ((uint)(3));
+			w7.XOptions = ((global::Gtk.AttachOptions)(4));
+			w7.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table2.Gtk.Table+TableChild
+			this.label7 = new global::Gtk.Label ();
+			this.label7.Name = "label7";
+			this.label7.LabelProp = global::Mono.Unix.Catalog.GetString ("Lead time:");
+			this.table2.Add (this.label7);
+			global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table2[this.label7]));
+			w8.TopAttach = ((uint)(1));
+			w8.BottomAttach = ((uint)(2));
+			w8.XOptions = ((global::Gtk.AttachOptions)(4));
+			w8.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table2.Gtk.Table+TableChild
+			this.label8 = new global::Gtk.Label ();
+			this.label8.Name = "label8";
+			this.label8.LabelProp = global::Mono.Unix.Catalog.GetString ("Lag time:");
+			this.table2.Add (this.label8);
+			global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table2[this.label8]));
+			w9.TopAttach = ((uint)(1));
+			w9.BottomAttach = ((uint)(2));
+			w9.LeftAttach = ((uint)(2));
+			w9.RightAttach = ((uint)(3));
+			w9.XOptions = ((global::Gtk.AttachOptions)(4));
+			w9.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table2.Gtk.Table+TableChild
+			this.label9 = new global::Gtk.Label ();
+			this.label9.Name = "label9";
+			this.label9.LabelProp = global::Mono.Unix.Catalog.GetString ("Sort Method");
+			this.table2.Add (this.label9);
+			global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table2[this.label9]));
+			w10.TopAttach = ((uint)(2));
+			w10.BottomAttach = ((uint)(3));
+			w10.LeftAttach = ((uint)(2));
+			w10.RightAttach = ((uint)(3));
+			w10.XOptions = ((global::Gtk.AttachOptions)(4));
+			w10.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table2.Gtk.Table+TableChild
+			this.lagtimebutton = new global::Gtk.SpinButton (0, 100, 1);
+			this.lagtimebutton.CanFocus = true;
+			this.lagtimebutton.Name = "lagtimebutton";
+			this.lagtimebutton.Adjustment.PageIncrement = 1;
+			this.lagtimebutton.ClimbRate = 1;
+			this.lagtimebutton.Numeric = true;
+			this.table2.Add (this.lagtimebutton);
+			global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table2[this.lagtimebutton]));
+			w11.TopAttach = ((uint)(1));
+			w11.BottomAttach = ((uint)(2));
+			w11.LeftAttach = ((uint)(3));
+			w11.RightAttach = ((uint)(4));
+			w11.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table2.Gtk.Table+TableChild
+			this.leadtimebutton = new global::Gtk.SpinButton (0, 100, 1);
+			this.leadtimebutton.CanFocus = true;
+			this.leadtimebutton.Name = "leadtimebutton";
+			this.leadtimebutton.Adjustment.PageIncrement = 1;
+			this.leadtimebutton.ClimbRate = 1;
+			this.leadtimebutton.Numeric = true;
+			this.table2.Add (this.leadtimebutton);
+			global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table2[this.leadtimebutton]));
+			w12.TopAttach = ((uint)(1));
+			w12.BottomAttach = ((uint)(2));
+			w12.LeftAttach = ((uint)(1));
+			w12.RightAttach = ((uint)(2));
+			w12.XOptions = ((global::Gtk.AttachOptions)(4));
+			w12.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table2.Gtk.Table+TableChild
+			this.nameentry = new global::Gtk.Entry ();
+			this.nameentry.CanFocus = true;
+			this.nameentry.Name = "nameentry";
+			this.nameentry.IsEditable = true;
+			this.nameentry.InvisibleChar = 'â??';
+			this.table2.Add (this.nameentry);
+			global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table2[this.nameentry]));
+			w13.LeftAttach = ((uint)(1));
+			w13.RightAttach = ((uint)(2));
+			w13.XOptions = ((global::Gtk.AttachOptions)(4));
+			w13.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table2.Gtk.Table+TableChild
 			this.sortmethodcombobox = global::Gtk.ComboBox.NewText ();
 			this.sortmethodcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Sort by name"));
 			this.sortmethodcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Sort by start time"));
@@ -157,23 +237,129 @@ namespace LongoMatch.Gui.Component
 			this.sortmethodcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Sort by duration"));
 			this.sortmethodcombobox.Name = "sortmethodcombobox";
 			this.sortmethodcombobox.Active = 0;
-			this.hbox1.Add (this.sortmethodcombobox);
-			global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.sortmethodcombobox]));
-			w12.Position = 1;
-			this.vbox3.Add (this.hbox1);
-			global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox1]));
-			w13.Position = 3;
-			w13.Expand = false;
-			w13.Fill = false;
+			this.table2.Add (this.sortmethodcombobox);
+			global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table2[this.sortmethodcombobox]));
+			w14.TopAttach = ((uint)(2));
+			w14.BottomAttach = ((uint)(3));
+			w14.LeftAttach = ((uint)(3));
+			w14.RightAttach = ((uint)(4));
+			w14.XOptions = ((global::Gtk.AttachOptions)(4));
+			w14.YOptions = ((global::Gtk.AttachOptions)(4));
+			this.GtkAlignment5.Add (this.table2);
+			this.frame2.Add (this.GtkAlignment5);
+			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.frame2.LabelWidget = this.GtkLabel4;
+			this.vbox3.Add (this.frame2);
+			global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.frame2]));
+			w17.Position = 0;
+			w17.Expand = false;
+			w17.Fill = false;
+			// Container child vbox3.Gtk.Box+BoxChild
+			this.frame1 = new global::Gtk.Frame ();
+			this.frame1.Name = "frame1";
+			this.frame1.ShadowType = ((global::Gtk.ShadowType)(0));
+			// Container child frame1.Gtk.Container+ContainerChild
+			this.GtkAlignment2 = new global::Gtk.Alignment (0f, 0f, 1f, 1f);
+			this.GtkAlignment2.Name = "GtkAlignment2";
+			this.GtkAlignment2.LeftPadding = ((uint)(12));
+			// Container child GtkAlignment2.Gtk.Container+ContainerChild
+			this.vbox1 = new global::Gtk.VBox ();
+			this.vbox1.Name = "vbox1";
+			this.vbox1.Spacing = 6;
+			// Container child vbox1.Gtk.Box+BoxChild
+			this.newfirstbutton = new global::Gtk.Button ();
+			this.newfirstbutton.CanFocus = true;
+			this.newfirstbutton.Name = "newfirstbutton";
+			this.newfirstbutton.UseUnderline = true;
+			// Container child newfirstbutton.Gtk.Container+ContainerChild
+			global::Gtk.Alignment w18 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
+			// Container child GtkAlignment.Gtk.Container+ContainerChild
+			global::Gtk.HBox w19 = new global::Gtk.HBox ();
+			w19.Spacing = 2;
+			// Container child GtkHBox.Gtk.Container+ContainerChild
+			global::Gtk.Image w20 = new global::Gtk.Image ();
+			w20.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-new", global::Gtk.IconSize.Menu);
+			w19.Add (w20);
+			// Container child GtkHBox.Gtk.Container+ContainerChild
+			global::Gtk.Label w22 = new global::Gtk.Label ();
+			w22.LabelProp = global::Mono.Unix.Catalog.GetString ("No sub categories available. Click here to create one.");
+			w22.UseUnderline = true;
+			w19.Add (w22);
+			w18.Add (w19);
+			this.newfirstbutton.Add (w18);
+			this.vbox1.Add (this.newfirstbutton);
+			global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.newfirstbutton]));
+			w26.Position = 0;
+			w26.Expand = false;
+			w26.Fill = false;
+			// Container child vbox1.Gtk.Box+BoxChild
+			this.hbox3 = new global::Gtk.HBox ();
+			this.hbox3.Name = "hbox3";
+			this.hbox3.Spacing = 6;
+			// Container child hbox3.Gtk.Box+BoxChild
+			this.subcatcombobox = global::Gtk.ComboBox.NewText ();
+			this.subcatcombobox.Name = "subcatcombobox";
+			this.hbox3.Add (this.subcatcombobox);
+			global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.subcatcombobox]));
+			w27.Position = 0;
+			// Container child hbox3.Gtk.Box+BoxChild
+			this.addbutton = new global::Gtk.Button ();
+			this.addbutton.TooltipMarkup = "Add this subcategory";
+			this.addbutton.CanFocus = true;
+			this.addbutton.Name = "addbutton";
+			this.addbutton.UseStock = true;
+			this.addbutton.UseUnderline = true;
+			this.addbutton.Label = "gtk-add";
+			this.hbox3.Add (this.addbutton);
+			global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.addbutton]));
+			w28.Position = 1;
+			w28.Expand = false;
+			w28.Fill = false;
+			// Container child hbox3.Gtk.Box+BoxChild
+			this.newbutton = new global::Gtk.Button ();
+			this.newbutton.TooltipMarkup = "Create a new sub-category";
+			this.newbutton.CanFocus = true;
+			this.newbutton.Name = "newbutton";
+			this.newbutton.UseStock = true;
+			this.newbutton.UseUnderline = true;
+			this.newbutton.Label = "gtk-new";
+			this.hbox3.Add (this.newbutton);
+			global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.newbutton]));
+			w29.Position = 2;
+			w29.Expand = false;
+			w29.Fill = false;
+			this.vbox1.Add (this.hbox3);
+			global::Gtk.Box.BoxChild w30 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox3]));
+			w30.Position = 1;
+			w30.Expand = false;
+			w30.Fill = false;
+			this.GtkAlignment2.Add (this.vbox1);
+			this.frame1.Add (this.GtkAlignment2);
+			this.GtkLabel3 = new global::Gtk.Label ();
+			this.GtkLabel3.Name = "GtkLabel3";
+			this.GtkLabel3.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Sub Categories</b>");
+			this.GtkLabel3.UseMarkup = true;
+			this.frame1.LabelWidget = this.GtkLabel3;
+			this.vbox3.Add (this.frame1);
+			global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.frame1]));
+			w33.Position = 1;
+			w33.Expand = false;
+			w33.Fill = false;
 			this.Add (this.vbox3);
 			if ((this.Child != null)) {
 				this.Child.ShowAll ();
 			}
 			this.Show ();
+			this.sortmethodcombobox.Changed += new global::System.EventHandler (this.OnSortmethodcomboboxChanged);
 			this.nameentry.Changed += new global::System.EventHandler (this.OnNameentryChanged);
-			this.colorbutton1.ColorSet += new global::System.EventHandler (this.OnColorbutton1ColorSet);
 			this.changebuton.Clicked += new global::System.EventHandler (this.OnChangebutonClicked);
-			this.sortmethodcombobox.Changed += new global::System.EventHandler (this.OnSortmethodcomboboxChanged);
+			this.colorbutton1.ColorSet += new global::System.EventHandler (this.OnColorbutton1ColorSet);
+			this.newfirstbutton.Clicked += new global::System.EventHandler (this.OnNewfirstbuttonClicked);
+			this.addbutton.Clicked += new global::System.EventHandler (this.OnAddbuttonClicked);
+			this.newbutton.Clicked += new global::System.EventHandler (this.OnNewbuttonClicked);
 		}
 	}
 }
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayerProperties.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayerProperties.cs
index ec005be..33aa7ec 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayerProperties.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayerProperties.cs
@@ -230,7 +230,7 @@ namespace LongoMatch.Gui.Component
 			this.nameentry.CanFocus = true;
 			this.nameentry.Name = "nameentry";
 			this.nameentry.IsEditable = true;
-			this.nameentry.InvisibleChar = '.ùÅ';
+			this.nameentry.InvisibleChar = 'â??';
 			this.table1.Add (this.nameentry);
 			global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.table1[this.nameentry]));
 			w17.LeftAttach = ((uint)(1));
@@ -242,7 +242,7 @@ namespace LongoMatch.Gui.Component
 			this.nationalityentry.CanFocus = true;
 			this.nationalityentry.Name = "nationalityentry";
 			this.nationalityentry.IsEditable = true;
-			this.nationalityentry.InvisibleChar = '.ùÅ';
+			this.nationalityentry.InvisibleChar = 'â??';
 			this.table1.Add (this.nationalityentry);
 			global::Gtk.Table.TableChild w18 = ((global::Gtk.Table.TableChild)(this.table1[this.nationalityentry]));
 			w18.TopAttach = ((uint)(6));
@@ -284,7 +284,7 @@ namespace LongoMatch.Gui.Component
 			this.positionentry.CanFocus = true;
 			this.positionentry.Name = "positionentry";
 			this.positionentry.IsEditable = true;
-			this.positionentry.InvisibleChar = '.ùÅ';
+			this.positionentry.InvisibleChar = 'â??';
 			this.table1.Add (this.positionentry);
 			global::Gtk.Table.TableChild w21 = ((global::Gtk.Table.TableChild)(this.table1[this.positionentry]));
 			w21.TopAttach = ((uint)(2));
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs
index 35fdb46..90c9351 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs
@@ -120,7 +120,7 @@ namespace LongoMatch.Gui.Component
 			this.competitionentry.CanFocus = true;
 			this.competitionentry.Name = "competitionentry";
 			this.competitionentry.IsEditable = true;
-			this.competitionentry.InvisibleChar = '.ùÅ';
+			this.competitionentry.InvisibleChar = 'â??';
 			this.table1.Add (this.competitionentry);
 			global::Gtk.Table.TableChild w1 = ((global::Gtk.Table.TableChild)(this.table1[this.competitionentry]));
 			w1.TopAttach = ((uint)(4));
@@ -148,7 +148,7 @@ namespace LongoMatch.Gui.Component
 			this.fileEntry.CanFocus = true;
 			this.fileEntry.Name = "fileEntry";
 			this.fileEntry.IsEditable = false;
-			this.fileEntry.InvisibleChar = '.ùÅ';
+			this.fileEntry.InvisibleChar = 'â??';
 			this.filehbox.Add (this.fileEntry);
 			global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.filehbox[this.fileEntry]));
 			w3.Position = 0;
@@ -325,7 +325,7 @@ namespace LongoMatch.Gui.Component
 			this.dateEntry.CanFocus = true;
 			this.dateEntry.Name = "dateEntry";
 			this.dateEntry.IsEditable = false;
-			this.dateEntry.InvisibleChar = '.ùÅ';
+			this.dateEntry.InvisibleChar = 'â??';
 			this.hbox5.Add (this.dateEntry);
 			global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox5[this.dateEntry]));
 			w20.Position = 0;
@@ -415,7 +415,7 @@ namespace LongoMatch.Gui.Component
 			this.localTeamEntry.CanFocus = true;
 			this.localTeamEntry.Name = "localTeamEntry";
 			this.localTeamEntry.IsEditable = true;
-			this.localTeamEntry.InvisibleChar = '.ùÅ';
+			this.localTeamEntry.InvisibleChar = 'â??';
 			this.table1.Add (this.localTeamEntry);
 			global::Gtk.Table.TableChild w36 = ((global::Gtk.Table.TableChild)(this.table1[this.localTeamEntry]));
 			w36.LeftAttach = ((uint)(1));
@@ -435,7 +435,7 @@ namespace LongoMatch.Gui.Component
 			this.seasonentry.CanFocus = true;
 			this.seasonentry.Name = "seasonentry";
 			this.seasonentry.IsEditable = true;
-			this.seasonentry.InvisibleChar = '.ùÅ';
+			this.seasonentry.InvisibleChar = 'â??';
 			this.table1.Add (this.seasonentry);
 			global::Gtk.Table.TableChild w38 = ((global::Gtk.Table.TableChild)(this.table1[this.seasonentry]));
 			w38.TopAttach = ((uint)(3));
@@ -459,7 +459,7 @@ namespace LongoMatch.Gui.Component
 			this.visitorTeamEntry.CanFocus = true;
 			this.visitorTeamEntry.Name = "visitorTeamEntry";
 			this.visitorTeamEntry.IsEditable = true;
-			this.visitorTeamEntry.InvisibleChar = '.ùÅ';
+			this.visitorTeamEntry.InvisibleChar = 'â??';
 			this.table1.Add (this.visitorTeamEntry);
 			global::Gtk.Table.TableChild w40 = ((global::Gtk.Table.TableChild)(this.table1[this.visitorTeamEntry]));
 			w40.TopAttach = ((uint)(1));
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectListWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectListWidget.cs
index 90d3018..c5fc46d 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectListWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectListWidget.cs
@@ -51,7 +51,7 @@ namespace LongoMatch.Gui.Component
 			this.filterEntry.CanFocus = true;
 			this.filterEntry.Name = "filterEntry";
 			this.filterEntry.IsEditable = true;
-			this.filterEntry.InvisibleChar = '.ùÅ';
+			this.filterEntry.InvisibleChar = 'â??';
 			this.hbox1.Add (this.filterEntry);
 			global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.filterEntry]));
 			w3.Position = 1;
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs
index 0bb973a..2942355 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs
@@ -64,7 +64,7 @@ namespace LongoMatch.Gui.Component
 			this.entry1.CanFocus = true;
 			this.entry1.Name = "entry1";
 			this.entry1.IsEditable = true;
-			this.entry1.InvisibleChar = '.Çó';
+			this.entry1.InvisibleChar = 'â?¢';
 			this.hbox1.Add (this.entry1);
 			global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.entry1]));
 			w6.Position = 0;
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectTemplateWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TemplatesEditorBase.cs
similarity index 61%
rename from LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectTemplateWidget.cs
rename to LongoMatch/gtk-gui/LongoMatch.Gui.Component.TemplatesEditorBase.cs
index 3c8de3f..e3e885a 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectTemplateWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TemplatesEditorBase.cs
@@ -2,14 +2,12 @@
 // This file has been generated by the GUI designer. Do not modify.
 namespace LongoMatch.Gui.Component
 {
-	public partial class ProjectTemplateWidget
+	public partial class TemplatesEditorBase
 	{
 		private global::Gtk.HBox hbox1;
 
 		private global::Gtk.ScrolledWindow scrolledwindow2;
 
-		private global::LongoMatch.Gui.Component.CategoriesTreeView categoriestreeview;
-
 		private global::Gtk.VBox vbox2;
 
 		private global::Gtk.Button newprevbutton;
@@ -27,10 +25,10 @@ namespace LongoMatch.Gui.Component
 		protected virtual void Build ()
 		{
 			global::Stetic.Gui.Initialize (this);
-			// Widget LongoMatch.Gui.Component.ProjectTemplateWidget
+			// Widget LongoMatch.Gui.Component.TemplatesEditorBase
 			global::Stetic.BinContainer.Attach (this);
-			this.Name = "LongoMatch.Gui.Component.ProjectTemplateWidget";
-			// Container child LongoMatch.Gui.Component.ProjectTemplateWidget.Gtk.Container+ContainerChild
+			this.Name = "LongoMatch.Gui.Component.TemplatesEditorBase";
+			// Container child LongoMatch.Gui.Component.TemplatesEditorBase.Gtk.Container+ContainerChild
 			this.hbox1 = new global::Gtk.HBox ();
 			this.hbox1.Name = "hbox1";
 			this.hbox1.Spacing = 6;
@@ -39,14 +37,9 @@ namespace LongoMatch.Gui.Component
 			this.scrolledwindow2.CanFocus = true;
 			this.scrolledwindow2.Name = "scrolledwindow2";
 			this.scrolledwindow2.ShadowType = ((global::Gtk.ShadowType)(1));
-			// Container child scrolledwindow2.Gtk.Container+ContainerChild
-			this.categoriestreeview = new global::LongoMatch.Gui.Component.CategoriesTreeView ();
-			this.categoriestreeview.CanFocus = true;
-			this.categoriestreeview.Name = "categoriestreeview";
-			this.scrolledwindow2.Add (this.categoriestreeview);
 			this.hbox1.Add (this.scrolledwindow2);
-			global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.scrolledwindow2]));
-			w2.Position = 0;
+			global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.scrolledwindow2]));
+			w1.Position = 0;
 			// Container child hbox1.Gtk.Box+BoxChild
 			this.vbox2 = new global::Gtk.VBox ();
 			this.vbox2.Name = "vbox2";
@@ -59,26 +52,26 @@ namespace LongoMatch.Gui.Component
 			this.newprevbutton.Name = "newprevbutton";
 			this.newprevbutton.UseUnderline = true;
 			// Container child newprevbutton.Gtk.Container+ContainerChild
-			global::Gtk.Alignment w3 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
+			global::Gtk.Alignment w2 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
 			// Container child GtkAlignment.Gtk.Container+ContainerChild
-			global::Gtk.HBox w4 = new global::Gtk.HBox ();
-			w4.Spacing = 2;
-			// Container child GtkHBox.Gtk.Container+ContainerChild
-			global::Gtk.Image w5 = new global::Gtk.Image ();
-			w5.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-goto-top", global::Gtk.IconSize.Menu);
-			w4.Add (w5);
+			global::Gtk.HBox w3 = new global::Gtk.HBox ();
+			w3.Spacing = 2;
 			// Container child GtkHBox.Gtk.Container+ContainerChild
-			global::Gtk.Label w7 = new global::Gtk.Label ();
-			w7.LabelProp = global::Mono.Unix.Catalog.GetString ("New Before");
-			w7.UseUnderline = true;
-			w4.Add (w7);
+			global::Gtk.Image w4 = new global::Gtk.Image ();
+			w4.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-goto-top", global::Gtk.IconSize.Menu);
 			w3.Add (w4);
-			this.newprevbutton.Add (w3);
+			// Container child GtkHBox.Gtk.Container+ContainerChild
+			global::Gtk.Label w6 = new global::Gtk.Label ();
+			w6.LabelProp = global::Mono.Unix.Catalog.GetString ("New Before");
+			w6.UseUnderline = true;
+			w3.Add (w6);
+			w2.Add (w3);
+			this.newprevbutton.Add (w2);
 			this.vbox2.Add (this.newprevbutton);
-			global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.newprevbutton]));
-			w11.Position = 0;
-			w11.Expand = false;
-			w11.Fill = false;
+			global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.newprevbutton]));
+			w10.Position = 0;
+			w10.Expand = false;
+			w10.Fill = false;
 			// Container child vbox2.Gtk.Box+BoxChild
 			this.newafterbutton = new global::Gtk.Button ();
 			this.newafterbutton.TooltipMarkup = "Insert a new category after the selected one";
@@ -87,26 +80,26 @@ namespace LongoMatch.Gui.Component
 			this.newafterbutton.Name = "newafterbutton";
 			this.newafterbutton.UseUnderline = true;
 			// Container child newafterbutton.Gtk.Container+ContainerChild
-			global::Gtk.Alignment w12 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
+			global::Gtk.Alignment w11 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
 			// Container child GtkAlignment.Gtk.Container+ContainerChild
-			global::Gtk.HBox w13 = new global::Gtk.HBox ();
-			w13.Spacing = 2;
+			global::Gtk.HBox w12 = new global::Gtk.HBox ();
+			w12.Spacing = 2;
 			// Container child GtkHBox.Gtk.Container+ContainerChild
-			global::Gtk.Image w14 = new global::Gtk.Image ();
-			w14.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-goto-bottom", global::Gtk.IconSize.Menu);
-			w13.Add (w14);
-			// Container child GtkHBox.Gtk.Container+ContainerChild
-			global::Gtk.Label w16 = new global::Gtk.Label ();
-			w16.LabelProp = global::Mono.Unix.Catalog.GetString ("New After");
-			w16.UseUnderline = true;
-			w13.Add (w16);
+			global::Gtk.Image w13 = new global::Gtk.Image ();
+			w13.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-goto-bottom", global::Gtk.IconSize.Menu);
 			w12.Add (w13);
-			this.newafterbutton.Add (w12);
+			// Container child GtkHBox.Gtk.Container+ContainerChild
+			global::Gtk.Label w15 = new global::Gtk.Label ();
+			w15.LabelProp = global::Mono.Unix.Catalog.GetString ("New After");
+			w15.UseUnderline = true;
+			w12.Add (w15);
+			w11.Add (w12);
+			this.newafterbutton.Add (w11);
 			this.vbox2.Add (this.newafterbutton);
-			global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.newafterbutton]));
-			w20.Position = 1;
-			w20.Expand = false;
-			w20.Fill = false;
+			global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.newafterbutton]));
+			w19.Position = 1;
+			w19.Expand = false;
+			w19.Fill = false;
 			// Container child vbox2.Gtk.Box+BoxChild
 			this.removebutton = new global::Gtk.Button ();
 			this.removebutton.TooltipMarkup = "Remove the selected category";
@@ -115,26 +108,26 @@ namespace LongoMatch.Gui.Component
 			this.removebutton.Name = "removebutton";
 			this.removebutton.UseUnderline = true;
 			// Container child removebutton.Gtk.Container+ContainerChild
-			global::Gtk.Alignment w21 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
+			global::Gtk.Alignment w20 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
 			// Container child GtkAlignment.Gtk.Container+ContainerChild
-			global::Gtk.HBox w22 = new global::Gtk.HBox ();
-			w22.Spacing = 2;
+			global::Gtk.HBox w21 = new global::Gtk.HBox ();
+			w21.Spacing = 2;
 			// Container child GtkHBox.Gtk.Container+ContainerChild
-			global::Gtk.Image w23 = new global::Gtk.Image ();
-			w23.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-remove", global::Gtk.IconSize.Menu);
-			w22.Add (w23);
-			// Container child GtkHBox.Gtk.Container+ContainerChild
-			global::Gtk.Label w25 = new global::Gtk.Label ();
-			w25.LabelProp = global::Mono.Unix.Catalog.GetString ("Remove");
-			w25.UseUnderline = true;
-			w22.Add (w25);
+			global::Gtk.Image w22 = new global::Gtk.Image ();
+			w22.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-remove", global::Gtk.IconSize.Menu);
 			w21.Add (w22);
-			this.removebutton.Add (w21);
+			// Container child GtkHBox.Gtk.Container+ContainerChild
+			global::Gtk.Label w24 = new global::Gtk.Label ();
+			w24.LabelProp = global::Mono.Unix.Catalog.GetString ("Remove");
+			w24.UseUnderline = true;
+			w21.Add (w24);
+			w20.Add (w21);
+			this.removebutton.Add (w20);
 			this.vbox2.Add (this.removebutton);
-			global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.removebutton]));
-			w29.Position = 2;
-			w29.Expand = false;
-			w29.Fill = false;
+			global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.removebutton]));
+			w28.Position = 2;
+			w28.Expand = false;
+			w28.Fill = false;
 			// Container child vbox2.Gtk.Box+BoxChild
 			this.editbutton = new global::Gtk.Button ();
 			this.editbutton.TooltipMarkup = "Edit the selected category";
@@ -143,34 +136,34 @@ namespace LongoMatch.Gui.Component
 			this.editbutton.Name = "editbutton";
 			this.editbutton.UseUnderline = true;
 			// Container child editbutton.Gtk.Container+ContainerChild
-			global::Gtk.Alignment w30 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
+			global::Gtk.Alignment w29 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
 			// Container child GtkAlignment.Gtk.Container+ContainerChild
-			global::Gtk.HBox w31 = new global::Gtk.HBox ();
-			w31.Spacing = 2;
+			global::Gtk.HBox w30 = new global::Gtk.HBox ();
+			w30.Spacing = 2;
 			// Container child GtkHBox.Gtk.Container+ContainerChild
-			global::Gtk.Image w32 = new global::Gtk.Image ();
-			w32.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-edit", global::Gtk.IconSize.Menu);
-			w31.Add (w32);
-			// Container child GtkHBox.Gtk.Container+ContainerChild
-			global::Gtk.Label w34 = new global::Gtk.Label ();
-			w34.LabelProp = global::Mono.Unix.Catalog.GetString ("Edit");
-			w34.UseUnderline = true;
-			w31.Add (w34);
+			global::Gtk.Image w31 = new global::Gtk.Image ();
+			w31.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-edit", global::Gtk.IconSize.Menu);
 			w30.Add (w31);
-			this.editbutton.Add (w30);
+			// Container child GtkHBox.Gtk.Container+ContainerChild
+			global::Gtk.Label w33 = new global::Gtk.Label ();
+			w33.LabelProp = global::Mono.Unix.Catalog.GetString ("Edit");
+			w33.UseUnderline = true;
+			w30.Add (w33);
+			w29.Add (w30);
+			this.editbutton.Add (w29);
 			this.vbox2.Add (this.editbutton);
-			global::Gtk.Box.BoxChild w38 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.editbutton]));
-			w38.Position = 3;
-			w38.Expand = false;
-			w38.Fill = false;
+			global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.editbutton]));
+			w37.Position = 3;
+			w37.Expand = false;
+			w37.Fill = false;
 			// Container child vbox2.Gtk.Box+BoxChild
 			this.hseparator1 = new global::Gtk.HSeparator ();
 			this.hseparator1.Name = "hseparator1";
 			this.vbox2.Add (this.hseparator1);
-			global::Gtk.Box.BoxChild w39 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hseparator1]));
-			w39.Position = 4;
-			w39.Expand = false;
-			w39.Fill = false;
+			global::Gtk.Box.BoxChild w38 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hseparator1]));
+			w38.Position = 4;
+			w38.Expand = false;
+			w38.Fill = false;
 			// Container child vbox2.Gtk.Box+BoxChild
 			this.exportbutton = new global::Gtk.Button ();
 			this.exportbutton.TooltipMarkup = "Export the template to a file";
@@ -178,32 +171,32 @@ namespace LongoMatch.Gui.Component
 			this.exportbutton.Name = "exportbutton";
 			this.exportbutton.UseUnderline = true;
 			// Container child exportbutton.Gtk.Container+ContainerChild
-			global::Gtk.Alignment w40 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
+			global::Gtk.Alignment w39 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
 			// Container child GtkAlignment.Gtk.Container+ContainerChild
-			global::Gtk.HBox w41 = new global::Gtk.HBox ();
-			w41.Spacing = 2;
+			global::Gtk.HBox w40 = new global::Gtk.HBox ();
+			w40.Spacing = 2;
 			// Container child GtkHBox.Gtk.Container+ContainerChild
-			global::Gtk.Image w42 = new global::Gtk.Image ();
-			w42.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-save-as", global::Gtk.IconSize.Menu);
-			w41.Add (w42);
-			// Container child GtkHBox.Gtk.Container+ContainerChild
-			global::Gtk.Label w44 = new global::Gtk.Label ();
-			w44.LabelProp = global::Mono.Unix.Catalog.GetString ("Export");
-			w44.UseUnderline = true;
-			w41.Add (w44);
+			global::Gtk.Image w41 = new global::Gtk.Image ();
+			w41.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-save-as", global::Gtk.IconSize.Menu);
 			w40.Add (w41);
-			this.exportbutton.Add (w40);
+			// Container child GtkHBox.Gtk.Container+ContainerChild
+			global::Gtk.Label w43 = new global::Gtk.Label ();
+			w43.LabelProp = global::Mono.Unix.Catalog.GetString ("Export");
+			w43.UseUnderline = true;
+			w40.Add (w43);
+			w39.Add (w40);
+			this.exportbutton.Add (w39);
 			this.vbox2.Add (this.exportbutton);
-			global::Gtk.Box.BoxChild w48 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.exportbutton]));
-			w48.PackType = ((global::Gtk.PackType)(1));
-			w48.Position = 5;
+			global::Gtk.Box.BoxChild w47 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.exportbutton]));
+			w47.PackType = ((global::Gtk.PackType)(1));
+			w47.Position = 5;
+			w47.Expand = false;
+			w47.Fill = false;
+			this.hbox1.Add (this.vbox2);
+			global::Gtk.Box.BoxChild w48 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.vbox2]));
+			w48.Position = 1;
 			w48.Expand = false;
 			w48.Fill = false;
-			this.hbox1.Add (this.vbox2);
-			global::Gtk.Box.BoxChild w49 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.vbox2]));
-			w49.Position = 1;
-			w49.Expand = false;
-			w49.Fill = false;
 			this.Add (this.hbox1);
 			if ((this.Child != null)) {
 				this.Child.ShowAll ();
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs
index 3040e4e..61634e6 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs
@@ -64,7 +64,7 @@ namespace LongoMatch.Gui.Dialog
 			this.entry1.CanFocus = true;
 			this.entry1.Name = "entry1";
 			this.entry1.IsEditable = true;
-			this.entry1.InvisibleChar = '.ùÅ';
+			this.entry1.InvisibleChar = 'â??';
 			this.table1.Add (this.entry1);
 			global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1[this.entry1]));
 			w3.LeftAttach = ((uint)(1));
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.SnapshotsDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.SnapshotsDialog.cs
index 6535f81..6be2e54 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.SnapshotsDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.SnapshotsDialog.cs
@@ -44,7 +44,7 @@ namespace LongoMatch.Gui.Dialog
 			this.entry1.CanFocus = true;
 			this.entry1.Name = "entry1";
 			this.entry1.IsEditable = true;
-			this.entry1.InvisibleChar = '.ùÅ';
+			this.entry1.InvisibleChar = 'â??';
 			this.table1.Add (this.entry1);
 			global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table1[this.entry1]));
 			w2.TopAttach = ((uint)(1));
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplateEditorDialog.cs
similarity index 68%
rename from LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.cs
rename to LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplateEditorDialog.cs
index 5205418..62abd23 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplateEditorDialog.cs
@@ -2,17 +2,17 @@
 // This file has been generated by the GUI designer. Do not modify.
 namespace LongoMatch.Gui.Dialog
 {
-	public partial class ProjectTemplateEditorDialog
+	public partial class TemplateEditorDialog
 	{
-		private global::LongoMatch.Gui.Component.ProjectTemplateWidget projecttemplatewidget;
+		private global::Gtk.HBox templateeditorbox;
 
 		private global::Gtk.Button buttonOk;
 
 		protected virtual void Build ()
 		{
 			global::Stetic.Gui.Initialize (this);
-			// Widget LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog
-			this.Name = "LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog";
+			// Widget LongoMatch.Gui.Dialog.TemplateEditorDialog
+			this.Name = "LongoMatch.Gui.Dialog.TemplateEditorDialog";
 			this.Title = global::Mono.Unix.Catalog.GetString ("Categories Template");
 			this.Icon = global::Stetic.IconLoader.LoadIcon (this, "longomatch", global::Gtk.IconSize.Dialog);
 			this.WindowPosition = ((global::Gtk.WindowPosition)(4));
@@ -20,19 +20,18 @@ namespace LongoMatch.Gui.Dialog
 			this.Gravity = ((global::Gdk.Gravity)(5));
 			this.SkipPagerHint = true;
 			this.SkipTaskbarHint = true;
-			// Internal child LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.VBox
+			// Internal child LongoMatch.Gui.Dialog.TemplateEditorDialog.VBox
 			global::Gtk.VBox w1 = this.VBox;
 			w1.Name = "dialog1_VBox";
 			w1.BorderWidth = ((uint)(2));
 			// Container child dialog1_VBox.Gtk.Box+BoxChild
-			this.projecttemplatewidget = new global::LongoMatch.Gui.Component.ProjectTemplateWidget ();
-			this.projecttemplatewidget.Events = ((global::Gdk.EventMask)(256));
-			this.projecttemplatewidget.Name = "projecttemplatewidget";
-			this.projecttemplatewidget.Edited = false;
-			w1.Add (this.projecttemplatewidget);
-			global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(w1[this.projecttemplatewidget]));
+			this.templateeditorbox = new global::Gtk.HBox ();
+			this.templateeditorbox.Name = "templateeditorbox";
+			this.templateeditorbox.Spacing = 6;
+			w1.Add (this.templateeditorbox);
+			global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(w1[this.templateeditorbox]));
 			w2.Position = 0;
-			// Internal child LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.ActionArea
+			// Internal child LongoMatch.Gui.Dialog.TemplateEditorDialog.ActionArea
 			global::Gtk.HButtonBox w3 = this.ActionArea;
 			w3.Name = "dialog1_ActionArea";
 			w3.Spacing = 6;
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs
index c18c874..8f4a56c 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs
@@ -18,11 +18,7 @@ namespace LongoMatch.Gui.Dialog
 
 		private global::Gtk.Button savebutton;
 
-		private global::Gtk.HBox hbox1;
-
-		private global::LongoMatch.Gui.Component.ProjectTemplateWidget sectionspropertieswidget1;
-
-		private global::LongoMatch.Gui.Component.TeamTemplateWidget teamtemplatewidget1;
+		private global::Gtk.HBox templateditorbox;
 
 		private global::Gtk.Button buttonOk;
 
@@ -148,37 +144,19 @@ namespace LongoMatch.Gui.Dialog
 			global::Gtk.Paned.PanedChild w31 = ((global::Gtk.Paned.PanedChild)(this.hpaned1[this.vbox2]));
 			w31.Resize = false;
 			// Container child hpaned1.Gtk.Paned+PanedChild
-			this.hbox1 = new global::Gtk.HBox ();
-			this.hbox1.Name = "hbox1";
-			this.hbox1.Spacing = 6;
-			// Container child hbox1.Gtk.Box+BoxChild
-			this.sectionspropertieswidget1 = new global::LongoMatch.Gui.Component.ProjectTemplateWidget ();
-			this.sectionspropertieswidget1.Sensitive = false;
-			this.sectionspropertieswidget1.Events = ((global::Gdk.EventMask)(256));
-			this.sectionspropertieswidget1.Name = "sectionspropertieswidget1";
-			this.sectionspropertieswidget1.Edited = false;
-			this.hbox1.Add (this.sectionspropertieswidget1);
-			global::Gtk.Box.BoxChild w32 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.sectionspropertieswidget1]));
-			w32.Position = 0;
-			// Container child hbox1.Gtk.Box+BoxChild
-			this.teamtemplatewidget1 = new global::LongoMatch.Gui.Component.TeamTemplateWidget ();
-			this.teamtemplatewidget1.Sensitive = false;
-			this.teamtemplatewidget1.Events = ((global::Gdk.EventMask)(256));
-			this.teamtemplatewidget1.Name = "teamtemplatewidget1";
-			this.teamtemplatewidget1.Edited = false;
-			this.hbox1.Add (this.teamtemplatewidget1);
-			global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.teamtemplatewidget1]));
-			w33.Position = 1;
-			this.hpaned1.Add (this.hbox1);
+			this.templateditorbox = new global::Gtk.HBox ();
+			this.templateditorbox.Name = "templateditorbox";
+			this.templateditorbox.Spacing = 6;
+			this.hpaned1.Add (this.templateditorbox);
 			w1.Add (this.hpaned1);
-			global::Gtk.Box.BoxChild w35 = ((global::Gtk.Box.BoxChild)(w1[this.hpaned1]));
-			w35.Position = 0;
+			global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(w1[this.hpaned1]));
+			w33.Position = 0;
 			// Internal child LongoMatch.Gui.Dialog.TemplatesManager.ActionArea
-			global::Gtk.HButtonBox w36 = this.ActionArea;
-			w36.Name = "dialog1_ActionArea";
-			w36.Spacing = 6;
-			w36.BorderWidth = ((uint)(5));
-			w36.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+			global::Gtk.HButtonBox w34 = this.ActionArea;
+			w34.Name = "dialog1_ActionArea";
+			w34.Spacing = 6;
+			w34.BorderWidth = ((uint)(5));
+			w34.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
 			// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
 			this.buttonOk = new global::Gtk.Button ();
 			this.buttonOk.CanDefault = true;
@@ -188,16 +166,14 @@ namespace LongoMatch.Gui.Dialog
 			this.buttonOk.UseUnderline = true;
 			this.buttonOk.Label = "gtk-quit";
 			this.AddActionWidget (this.buttonOk, 0);
-			global::Gtk.ButtonBox.ButtonBoxChild w37 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w36[this.buttonOk]));
-			w37.Expand = false;
-			w37.Fill = false;
+			global::Gtk.ButtonBox.ButtonBoxChild w35 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w34[this.buttonOk]));
+			w35.Expand = false;
+			w35.Fill = false;
 			if ((this.Child != null)) {
 				this.Child.ShowAll ();
 			}
 			this.DefaultWidth = 483;
 			this.DefaultHeight = 336;
-			this.sectionspropertieswidget1.Hide ();
-			this.teamtemplatewidget1.Hide ();
 			this.Show ();
 			this.treeview.RowActivated += new global::Gtk.RowActivatedHandler (this.OnTreeviewRowActivated);
 			this.treeview.CursorChanged += new global::System.EventHandler (this.OnTreeviewCursorChanged);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.VideoEditionProperties.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.VideoEditionProperties.cs
index 75546d4..0b51d5e 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.VideoEditionProperties.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.VideoEditionProperties.cs
@@ -199,7 +199,7 @@ namespace LongoMatch.Gui.Dialog
 			this.fileentry.CanFocus = true;
 			this.fileentry.Name = "fileentry";
 			this.fileentry.IsEditable = false;
-			this.fileentry.InvisibleChar = '.ùÅ';
+			this.fileentry.InvisibleChar = 'â??';
 			this.hbox3.Add (this.fileentry);
 			global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.fileentry]));
 			w15.Position = 0;
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
index b3a2863..942f928 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -187,7 +187,7 @@ namespace LongoMatch.Gui
 			this.ImportProjectAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Import Project");
 			w1.Add (this.ImportProjectAction, "<Control>i");
 			this.FreeCaptureModeAction = new global::Gtk.RadioAction ("FreeCaptureModeAction", global::Mono.Unix.Catalog.GetString ("Free Capture Mode"), null, null, 0);
-			this.FreeCaptureModeAction.Group = this.AnalyzeModeAction.Group;
+			this.FreeCaptureModeAction.Group = this.CaptureModeAction.Group;
 			this.FreeCaptureModeAction.Sensitive = false;
 			this.FreeCaptureModeAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Free Capture Mode");
 			w1.Add (this.FreeCaptureModeAction, "<Control>f");
diff --git a/LongoMatch/gtk-gui/gui.stetic b/LongoMatch/gtk-gui/gui.stetic
index 28f6434..a5ac910 100644
--- a/LongoMatch/gtk-gui/gui.stetic
+++ b/LongoMatch/gtk-gui/gui.stetic
@@ -1453,120 +1453,7 @@
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.TimeAdjustWidget" design-size="266 27">
-    <property name="MemberName" />
-    <child>
-      <widget class="Gtk.Table" id="table1">
-        <property name="MemberName" />
-        <property name="NColumns">5</property>
-        <property name="RowSpacing">6</property>
-        <property name="ColumnSpacing">6</property>
-        <child>
-          <widget class="Gtk.Label" id="label1">
-            <property name="MemberName" />
-            <property name="LabelProp" translatable="yes">Lead time:</property>
-          </widget>
-          <packing>
-            <property name="AutoSize">False</property>
-            <property name="XOptions">0</property>
-            <property name="YOptions">Fill</property>
-            <property name="XExpand">False</property>
-            <property name="XFill">False</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="label3">
-            <property name="MemberName" />
-            <property name="LabelProp" translatable="yes">Lag time:</property>
-          </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">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="spinbutton1">
-            <property name="MemberName" />
-            <property name="CanFocus">True</property>
-            <property name="Upper">100</property>
-            <property name="PageIncrement">1</property>
-            <property name="StepIncrement">1</property>
-            <property name="ClimbRate">1</property>
-            <property name="Numeric">True</property>
-            <signal name="ValueChanged" handler="OnSpinbutton1ValueChanged" />
-          </widget>
-          <packing>
-            <property name="LeftAttach">2</property>
-            <property name="RightAttach">3</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="spinbutton2">
-            <property name="MemberName" />
-            <property name="CanFocus">True</property>
-            <property name="Upper">100</property>
-            <property name="PageIncrement">1</property>
-            <property name="StepIncrement">1</property>
-            <property name="ClimbRate">1</property>
-            <property name="Numeric">True</property>
-            <signal name="ValueChanged" handler="OnSpinbutton2ValueChanged" />
-          </widget>
-          <packing>
-            <property name="LeftAttach">4</property>
-            <property name="RightAttach">5</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.Label" id="startlabel">
-            <property name="MemberName" />
-          </widget>
-          <packing>
-            <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>
-      </widget>
-    </child>
-  </widget>
-  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.ProjectTemplateWidget" design-size="527 227">
+  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.TemplatesEditorBase" design-size="527 227">
     <property name="MemberName" />
     <signal name="KeyPressEvent" handler="OnKeyPressEvent" />
     <child>
@@ -1579,9 +1466,12 @@
             <property name="CanFocus">True</property>
             <property name="ShadowType">In</property>
             <child>
-              <widget class="LongoMatch.Gui.Component.CategoriesTreeView" id="categoriestreeview">
+              <widget class="Gtk.Viewport" id="GtkViewport">
                 <property name="MemberName" />
-                <property name="CanFocus">True</property>
+                <property name="ShadowType">None</property>
+                <child>
+                  <placeholder />
+                </child>
               </widget>
             </child>
           </widget>
@@ -2225,176 +2115,445 @@
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.CategoryProperties" design-size="479 120">
+  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.CategoryProperties" design-size="479 188">
     <property name="MemberName" />
     <child>
       <widget class="Gtk.VBox" id="vbox3">
         <property name="MemberName" />
         <property name="Spacing">6</property>
         <child>
-          <widget class="Gtk.HBox" id="hbox4">
-            <property name="MemberName" />
-            <property name="Spacing">6</property>
-            <child>
-              <widget class="Gtk.Label" id="label1">
-                <property name="MemberName" />
-                <property name="LabelProp" translatable="yes">Name:</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.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="Position">1</property>
-                <property name="AutoSize">True</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="Position">0</property>
-            <property name="AutoSize">False</property>
-            <property name="Fill">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="LongoMatch.Gui.Component.TimeAdjustWidget" id="timeadjustwidget1">
+          <widget class="Gtk.Frame" id="frame2">
             <property name="MemberName" />
-            <property name="Events">ButtonPressMask</property>
-          </widget>
-          <packing>
-            <property name="Position">1</property>
-            <property name="AutoSize">True</property>
-            <property name="Expand">False</property>
-            <property name="Fill">False</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="Gtk.HBox" id="hbox2">
-            <property name="MemberName" />
-            <property name="Spacing">6</property>
-            <child>
-              <widget class="Gtk.Label" id="label4">
-                <property name="MemberName" />
-                <property name="LabelProp" translatable="yes">Color:        </property>
-              </widget>
-              <packing>
-                <property name="Position">0</property>
-                <property name="AutoSize">False</property>
-                <property name="Expand">False</property>
-                <property name="Fill">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="Gtk.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="Position">1</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="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="PackType">End</property>
-                <property name="Position">2</property>
-                <property name="AutoSize">True</property>
-                <property name="Expand">False</property>
-                <property name="Fill">False</property>
-              </packing>
-            </child>
+            <property name="ShadowType">None</property>
             <child>
-              <widget class="Gtk.Label" id="hotKeyLabel">
+              <widget class="Gtk.Alignment" id="GtkAlignment5">
                 <property name="MemberName" />
-                <property name="LabelProp" translatable="yes">none</property>
+                <property name="Xalign">0</property>
+                <property name="Yalign">0</property>
+                <property name="LeftPadding">12</property>
+                <child>
+                  <widget class="Gtk.Table" id="table2">
+                    <property name="MemberName" />
+                    <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">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.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="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">True</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">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="label1">
+                        <property name="MemberName" />
+                        <property name="LabelProp" translatable="yes">Name:</property>
+                      </widget>
+                      <packing>
+                        <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="label4">
+                        <property name="MemberName" />
+                        <property name="LabelProp" translatable="yes">Color:        </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="LabelProp" translatable="yes">HotKey:</property>
+                      </widget>
+                      <packing>
+                        <property name="TopAttach">2</property>
+                        <property name="BottomAttach">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="label7">
+                        <property name="MemberName" />
+                        <property name="LabelProp" translatable="yes">Lead time:</property>
+                      </widget>
+                      <packing>
+                        <property name="TopAttach">1</property>
+                        <property name="BottomAttach">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.Label" id="label8">
+                        <property name="MemberName" />
+                        <property name="LabelProp" translatable="yes">Lag time:</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="LabelProp" translatable="yes">Sort Method</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">100</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">100</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">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.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">0</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">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>
+                  </widget>
+                </child>
               </widget>
-              <packing>
-                <property name="PackType">End</property>
-                <property name="Position">3</property>
-                <property name="AutoSize">True</property>
-                <property name="Expand">False</property>
-                <property name="Fill">False</property>
-              </packing>
             </child>
             <child>
-              <widget class="Gtk.Label" id="label6">
+              <widget class="Gtk.Label" id="GtkLabel4">
                 <property name="MemberName" />
-                <property name="LabelProp" translatable="yes">HotKey:</property>
+                <property name="LabelProp" translatable="yes">&lt;b&gt;Properties&lt;/b&gt;</property>
+                <property name="UseMarkup">True</property>
               </widget>
               <packing>
-                <property name="PackType">End</property>
-                <property name="Position">4</property>
-                <property name="AutoSize">True</property>
-                <property name="Expand">False</property>
-                <property name="Fill">False</property>
+                <property name="type">label_item</property>
               </packing>
             </child>
           </widget>
           <packing>
-            <property name="Position">2</property>
-            <property name="AutoSize">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="hbox1">
+          <widget class="Gtk.Frame" id="frame1">
             <property name="MemberName" />
-            <property name="Spacing">6</property>
+            <property name="ShadowType">None</property>
             <child>
-              <widget class="Gtk.Label" id="label5">
+              <widget class="Gtk.Alignment" id="GtkAlignment2">
                 <property name="MemberName" />
-                <property name="LabelProp" translatable="yes">Sort Method</property>
+                <property name="Xalign">0</property>
+                <property name="Yalign">0</property>
+                <property name="LeftPadding">12</property>
+                <child>
+                  <widget class="Gtk.VBox" id="vbox1">
+                    <property name="MemberName" />
+                    <property name="Spacing">6</property>
+                    <child>
+                      <widget class="Gtk.Button" id="newfirstbutton">
+                        <property name="MemberName" />
+                        <property name="CanFocus">True</property>
+                        <property name="Type">TextAndIcon</property>
+                        <property name="Icon">stock:gtk-new Menu</property>
+                        <property name="Label" translatable="yes">No sub categories available. Click here to create one.</property>
+                        <property name="UseUnderline">True</property>
+                        <signal name="Clicked" handler="OnNewfirstbuttonClicked" />
+                      </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.HBox" id="hbox3">
+                        <property name="MemberName" />
+                        <property name="Spacing">6</property>
+                        <child>
+                          <widget class="Gtk.ComboBox" id="subcatcombobox">
+                            <property name="MemberName" />
+                            <property name="IsTextCombo">True</property>
+                            <property name="Items" translatable="yes" />
+                          </widget>
+                          <packing>
+                            <property name="Position">0</property>
+                            <property name="AutoSize">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.Button" id="addbutton">
+                            <property name="MemberName" />
+                            <property name="Tooltip" translatable="yes">Add this subcategory</property>
+                            <property name="CanFocus">True</property>
+                            <property name="UseStock">True</property>
+                            <property name="Type">StockItem</property>
+                            <property name="StockId">gtk-add</property>
+                            <signal name="Clicked" handler="OnAddbuttonClicked" />
+                            <property name="label">gtk-add</property>
+                          </widget>
+                          <packing>
+                            <property name="Position">1</property>
+                            <property name="AutoSize">True</property>
+                            <property name="Expand">False</property>
+                            <property name="Fill">False</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="Gtk.Button" id="newbutton">
+                            <property name="MemberName" />
+                            <property name="Tooltip" translatable="yes">Create a new sub-category</property>
+                            <property name="CanFocus">True</property>
+                            <property name="UseStock">True</property>
+                            <property name="Type">StockItem</property>
+                            <property name="StockId">gtk-new</property>
+                            <signal name="Clicked" handler="OnNewbuttonClicked" />
+                            <property name="label">gtk-new</property>
+                          </widget>
+                          <packing>
+                            <property name="Position">2</property>
+                            <property name="AutoSize">True</property>
+                            <property name="Expand">False</property>
+                            <property name="Fill">False</property>
+                          </packing>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="Position">1</property>
+                        <property name="AutoSize">True</property>
+                        <property name="Expand">False</property>
+                        <property name="Fill">False</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
               </widget>
-              <packing>
-                <property name="Position">0</property>
-                <property name="AutoSize">True</property>
-                <property name="Expand">False</property>
-                <property name="Fill">False</property>
-              </packing>
             </child>
             <child>
-              <widget class="Gtk.ComboBox" id="sortmethodcombobox">
+              <widget class="Gtk.Label" id="GtkLabel3">
                 <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">0</property>
-                <signal name="Changed" handler="OnSortmethodcomboboxChanged" />
+                <property name="LabelProp" translatable="yes">&lt;b&gt;Sub Categories&lt;/b&gt;</property>
+                <property name="UseMarkup">True</property>
               </widget>
               <packing>
-                <property name="Position">1</property>
-                <property name="AutoSize">False</property>
+                <property name="type">label_item</property>
               </packing>
             </child>
           </widget>
           <packing>
-            <property name="Position">3</property>
+            <property name="Position">1</property>
             <property name="AutoSize">True</property>
             <property name="Expand">False</property>
             <property name="Fill">False</property>
@@ -2403,7 +2562,7 @@ Sort by duration</property>
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog" design-size="518 243">
+  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.TemplateEditorDialog" design-size="518 243">
     <property name="MemberName" />
     <property name="Title" translatable="yes">Categories Template</property>
     <property name="Icon">stock:longomatch Dialog</property>
@@ -2419,14 +2578,16 @@ Sort by duration</property>
         <property name="MemberName" />
         <property name="BorderWidth">2</property>
         <child>
-          <widget class="LongoMatch.Gui.Component.ProjectTemplateWidget" id="projecttemplatewidget">
+          <widget class="Gtk.HBox" id="templateeditorbox">
             <property name="MemberName" />
-            <property name="Events">ButtonPressMask</property>
-            <property name="Edited">False</property>
+            <property name="Spacing">6</property>
+            <child>
+              <placeholder />
+            </child>
           </widget>
           <packing>
             <property name="Position">0</property>
-            <property name="AutoSize">False</property>
+            <property name="AutoSize">True</property>
           </packing>
         </child>
       </widget>
@@ -4216,35 +4377,6 @@ No</property>
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.TeamTemplateWidget" design-size="365 186">
-    <property name="MemberName" />
-    <property name="Visible">False</property>
-    <child>
-      <widget class="Gtk.HBox" id="hbox1">
-        <property name="MemberName" />
-        <property name="Spacing">6</property>
-        <child>
-          <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
-            <property name="MemberName" />
-            <property name="CanFocus">True</property>
-            <property name="ShadowType">In</property>
-            <child>
-              <widget class="LongoMatch.Gui.Component.PlayerPropertiesTreeView" id="playerpropertiestreeview1">
-                <property name="MemberName" />
-                <property name="CanFocus">True</property>
-                <signal name="PlayerClicked" handler="OnPlayerpropertiestreeview1PlayerClicked" />
-                <signal name="PlayerSelected" handler="OnPlayerpropertiestreeview1PlayerSelected" />
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="Position">0</property>
-            <property name="AutoSize">True</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
   <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.TemplatesManager" design-size="483 336">
     <property name="MemberName" />
     <property name="Title" translatable="yes">Templates Manager</property>
@@ -4355,34 +4487,11 @@ No</property>
               </packing>
             </child>
             <child>
-              <widget class="Gtk.HBox" id="hbox1">
+              <widget class="Gtk.HBox" id="templateditorbox">
                 <property name="MemberName" />
                 <property name="Spacing">6</property>
                 <child>
-                  <widget class="LongoMatch.Gui.Component.ProjectTemplateWidget" id="sectionspropertieswidget1">
-                    <property name="MemberName" />
-                    <property name="Visible">False</property>
-                    <property name="Sensitive">False</property>
-                    <property name="Events">ButtonPressMask</property>
-                    <property name="Edited">False</property>
-                  </widget>
-                  <packing>
-                    <property name="Position">0</property>
-                    <property name="AutoSize">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="LongoMatch.Gui.Component.TeamTemplateWidget" id="teamtemplatewidget1">
-                    <property name="MemberName" />
-                    <property name="Visible">False</property>
-                    <property name="Sensitive">False</property>
-                    <property name="Events">ButtonPressMask</property>
-                    <property name="Edited">False</property>
-                  </widget>
-                  <packing>
-                    <property name="Position">1</property>
-                    <property name="AutoSize">False</property>
-                  </packing>
+                  <placeholder />
                 </child>
               </widget>
             </child>
@@ -5073,59 +5182,6 @@ Show-&gt;&lt;b&gt; S&lt;/b&gt;
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.TeamTemplateEditor" design-size="436 313">
-    <property name="MemberName" />
-    <property name="Icon">resource:longomatch.png</property>
-    <property name="WindowPosition">CenterOnParent</property>
-    <property name="Modal">True</property>
-    <property name="Gravity">Center</property>
-    <property name="SkipPagerHint">True</property>
-    <property name="SkipTaskbarHint">True</property>
-    <property name="Buttons">1</property>
-    <property name="HelpButton">False</property>
-    <child internal-child="VBox">
-      <widget class="Gtk.VBox" id="dialog1_VBox">
-        <property name="MemberName" />
-        <property name="BorderWidth">2</property>
-        <child>
-          <widget class="LongoMatch.Gui.Component.TeamTemplateWidget" id="teamtemplatewidget1">
-            <property name="MemberName" />
-            <property name="Events">ButtonPressMask</property>
-            <property name="Edited">False</property>
-          </widget>
-          <packing>
-            <property name="Position">0</property>
-            <property name="AutoSize">False</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-    <child internal-child="ActionArea">
-      <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
-        <property name="MemberName" />
-        <property name="Spacing">6</property>
-        <property name="BorderWidth">5</property>
-        <property name="Size">1</property>
-        <property name="LayoutStyle">End</property>
-        <child>
-          <widget class="Gtk.Button" id="buttonOk">
-            <property name="MemberName" />
-            <property name="CanDefault">True</property>
-            <property name="CanFocus">True</property>
-            <property name="UseStock">True</property>
-            <property name="Type">StockItem</property>
-            <property name="StockId">gtk-apply</property>
-            <property name="ResponseId">-10</property>
-            <property name="label">gtk-apply</property>
-          </widget>
-          <packing>
-            <property name="Expand">False</property>
-            <property name="Fill">False</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
   <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.DrawingWidget" design-size="300 300">
     <property name="MemberName" />
     <property name="Visible">False</property>
diff --git a/po/Translations.mdse b/po/Translations.mdse
index 841ddda..02571ff 100644
--- a/po/Translations.mdse
+++ b/po/Translations.mdse
@@ -3,11 +3,11 @@
     <Configuration name="Release" ctype="TranslationProjectConfiguration" />
     <Configuration name="Debug" ctype="TranslationProjectConfiguration" />
   </Configurations>
-  <projectInformations>
-    <TranslationProjectInformation projectName="libcesarplayer" isIncluded="False" />
-  </projectInformations>
   <translations>
     <Translation isoCode="es" />
     <Translation isoCode="fr" />
   </translations>
+  <projectInformations>
+    <TranslationProjectInformation projectName="libcesarplayer" isIncluded="False" />
+  </projectInformations>
 </CombineEntry>
\ No newline at end of file



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