[longomatch] Adapt GUI to last changes



commit 18f1d18a6614dafc1eaafb06b248d7245dda9998
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Dec 9 19:54:43 2011 +0100

    Adapt GUI to last changes

 LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs       |   67 ++++------
 LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs         |   53 ++++----
 LongoMatch.GUI.Multimedia/Gui/VolumeWindow.cs      |    1 +
 LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic       |    1 -
 LongoMatch.GUI/Gui/Component/ButtonsWidget.cs      |    5 +-
 LongoMatch.GUI/Gui/Component/CategoryProperties.cs |    4 +-
 LongoMatch.GUI/Gui/Component/DrawingToolBox.cs     |    2 +-
 LongoMatch.GUI/Gui/Component/PlayListWidget.cs     |   11 ++-
 LongoMatch.GUI/Gui/Component/PlayerProperties.cs   |   16 +--
 .../Gui/Component/PlayersListTreeWidget.cs         |   22 +++-
 .../Gui/Component/PlaysListTreeWidget.cs           |   24 +++-
 .../Gui/Component/ProjectDetailsWidget.cs          |    6 +-
 LongoMatch.GUI/Gui/Component/ProjectListWidget.cs  |    2 +-
 LongoMatch.GUI/Gui/Component/RenderingStateBar.cs  |    4 +-
 LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs |   10 +-
 .../Gui/Component/TimelineLabelsWidget.cs          |    2 +-
 LongoMatch.GUI/Gui/Dialog/BusyDialog.cs            |    4 +-
 LongoMatch.GUI/Gui/Dialog/DrawingTool.cs           |   10 +-
 .../Gui/Dialog/FramesCaptureProgressDialog.cs      |    8 +-
 LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs  |    4 +-
 LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs   |    5 +-
 LongoMatch.GUI/Gui/MainWindow.cs                   |   55 +++-----
 LongoMatch.GUI/Gui/TreeView/CategoriesTreeView.cs  |    3 +-
 LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs    |   10 +-
 .../Gui/TreeView/PlayerPropertiesTreeView.cs       |    2 +-
 LongoMatch.GUI/LongoMatch.GUI.mdp                  |    8 +-
 .../gtk-gui/LongoMatch.Gui.MainWindow.cs           |   10 +-
 LongoMatch.GUI/gtk-gui/gui.stetic                  |    1 -
 LongoMatch.GUI/gtk-gui/objects.xml                 |  148 +++++++++++---------
 29 files changed, 270 insertions(+), 228 deletions(-)
---
diff --git a/LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs b/LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs
index 7db84e3..aa16f1c 100644
--- a/LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs
@@ -20,9 +20,11 @@
 
 using System;
 using Gtk;
-using Gdk;
+
+using Image = LongoMatch.Common.Image;
 using LongoMatch.Common;
-using LongoMatch.Multimedia.Interfaces;
+using LongoMatch.Handlers;
+using LongoMatch.Interfaces.GUI;
 using LongoMatch.Video;
 using LongoMatch.Video.Common;
 using LongoMatch.Video.Capturer;
@@ -35,19 +37,19 @@ namespace LongoMatch.Gui
 
 	[System.ComponentModel.Category("CesarPlayer")]
 	[System.ComponentModel.ToolboxItem(true)]
-	public partial class CapturerBin : Gtk.Bin
+	public partial class CapturerBin : Gtk.Bin, ICapturer
 	{
 		public event EventHandler CaptureFinished;
-		public event ErrorHandler Error;
+		public event LongoMatch.Handlers.ErrorHandler Error;
 
-		private Pixbuf logopix;
+		private Image logopix;
 		private CaptureSettings captureProps;
 		private CapturerType capturerType;
 		private bool captureStarted;
 		private bool capturing;
 		private const int THUMBNAIL_MAX_WIDTH = 100;
 
-		ICapturer capturer;
+		LongoMatch.Multimedia.Interfaces.ICapturer capturer;
 
 		public CapturerBin()
 		{
@@ -62,7 +64,7 @@ namespace LongoMatch.Gui
 				Close();
 
 				MultimediaFactory factory = new MultimediaFactory();
-				capturer = factory.getCapturer(value);
+				capturer = factory.GetCapturer(value);
 				capturer.EllapsedTime += OnTick;
 				if(value != CapturerType.Fake) {
 					capturer.Error += OnError;
@@ -85,7 +87,7 @@ namespace LongoMatch.Gui
 		public string Logo {
 			set {
 				try {
-					this.logopix = new Pixbuf(value);
+					this.logopix = new Image(new Gdk.Pixbuf(value));
 				} catch {
 					/* FIXME: Add log */
 				}
@@ -173,36 +175,17 @@ namespace LongoMatch.Gui
 			capturer = null;
 		}
 
-		public Pixbuf CurrentMiniatureFrame {
+		public Image CurrentMiniatureFrame {
 			get {
-				int h, w;
-				double rate;
-				Pixbuf scaled_pix;
-				Pixbuf pix;
-
 				if(capturer == null)
 					return null;
 
-				pix = capturer.CurrentFrame;
+				Image image = new Image(capturer.CurrentFrame);
 
-				if(pix == null)
+				if(image.Value == null)
 					return null;
-
-				w = pix.Width;
-				h = pix.Height;
-				rate = (double)w / (double)h;
-
-				if(h > w) {
-					w = (int)(THUMBNAIL_MAX_WIDTH * rate);
-					h = THUMBNAIL_MAX_WIDTH;
-				} else {
-					h = (int)(THUMBNAIL_MAX_WIDTH / rate);
-					w = THUMBNAIL_MAX_WIDTH;
-				}
-				scaled_pix = pix.ScaleSimple(w, h, Gdk.InterpType.Bilinear);
-				pix.Dispose();
-
-				return scaled_pix;
+				image.Scale(THUMBNAIL_MAX_WIDTH, THUMBNAIL_MAX_WIDTH);
+				return image;
 			}
 		}
 
@@ -275,7 +258,7 @@ namespace LongoMatch.Gui
 		protected virtual void OnError(object o, ErrorArgs args)
 		{
 			if(Error != null)
-				Error(o, args);
+				Error(o, args.Message);
 
 			Close();
 		}
@@ -314,16 +297,18 @@ namespace LongoMatch.Gui
 		protected virtual void OnLogodrawingareaExposeEvent(object o, Gtk.ExposeEventArgs args)
 		{
 			Gdk.Window win;
-			Pixbuf frame;
+			Gdk.Pixbuf logo, frame;
 			int width, height, allocWidth, allocHeight, logoX, logoY;
 			float ratio;
 
-			if(logopix == null)
+			logo = logopix.Value;
+			
+			if(logo == null)
 				return;
 
 			win = logodrawingarea.GdkWindow;
-			width = logopix.Width;
-			height = logopix.Height;
+			width = logo.Width;
+			height = logo.Height;
 			allocWidth = logodrawingarea.Allocation.Width;
 			allocHeight = logodrawingarea.Allocation.Height;
 
@@ -340,13 +325,13 @@ namespace LongoMatch.Gui
 			logoY = (allocHeight / 2) - (height / 2);
 
 			/* Drawing our frame */
-			frame = new Pixbuf(Colorspace.Rgb, false, 8, allocWidth, allocHeight);
-			logopix.Composite(frame, 0, 0, allocWidth, allocHeight, logoX, logoY,
-			                  ratio, ratio, InterpType.Bilinear, 255);
+			frame = new Gdk.Pixbuf(Gdk.Colorspace.Rgb, false, 8, allocWidth, allocHeight);
+			logo.Composite(frame, 0, 0, allocWidth, allocHeight, logoX, logoY,
+			                  ratio, ratio, Gdk.InterpType.Bilinear, 255);
 
 			win.DrawPixbuf(this.Style.BlackGC, frame, 0, 0,
 			               0, 0, allocWidth, allocHeight,
-			               RgbDither.Normal, 0, 0);
+			               Gdk.RgbDither.Normal, 0, 0);
 			frame.Dispose();
 			return;
 		}
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
index 7f98fbe..043f542 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
@@ -22,6 +22,10 @@ using Gtk;
 using Gdk;
 using Mono.Unix;
 using System.Runtime.InteropServices;
+
+using Image = LongoMatch.Common.Image;
+using LongoMatch.Handlers;
+using LongoMatch.Interfaces.GUI;
 using LongoMatch.Multimedia.Interfaces;
 using LongoMatch.Video;
 using LongoMatch.Video.Common;
@@ -33,21 +37,21 @@ namespace LongoMatch.Gui
 	[System.ComponentModel.Category("LongoMatch")]
 	[System.ComponentModel.ToolboxItem(true)]
 
-	public partial class PlayerBin : Gtk.Bin
+	public partial class PlayerBin : Gtk.Bin, LongoMatch.Interfaces.GUI.IPlayer
 	{
 
 		public event SegmentClosedHandler SegmentClosedEvent;
-		public event TickHandler Tick;
-		public event ErrorHandler Error;
-		public event StateChangeHandler PlayStateChanged;
+		public event LongoMatch.Handlers.TickHandler Tick;
+		public event LongoMatch.Handlers.ErrorHandler Error;
+		public event LongoMatch.Handlers.StateChangeHandler PlayStateChanged;
 		public event NextButtonClickedHandler Next;
 		public event PrevButtonClickedHandler Prev;
-		public event DrawFrameHandler DrawFrame;
+		public event LongoMatch.Handlers.DrawFrameHandler DrawFrame;
 		public event SeekEventHandler SeekEvent;
 
 		private const int THUMBNAIL_MAX_WIDTH = 100;
-		private TickHandler tickHandler;
-		private IPlayer player;
+		private LongoMatch.Video.Common.TickHandler tickHandler;
+		private LongoMatch.Multimedia.Interfaces.IPlayer player;
 		private long length=0;
 		private string slength;
 		private long segmentStartTime;
@@ -91,12 +95,6 @@ namespace LongoMatch.Gui
 
 		#region Properties
 
-		public IPlayer Player {
-			get {
-				return player;
-			}
-		}
-
 		public long AccurateCurrentTime {
 			get {
 				return player.AccurateCurrentTime;
@@ -133,20 +131,19 @@ namespace LongoMatch.Gui
 			}
 		}
 
-		public Pixbuf CurrentMiniatureFrame {
+		public Image CurrentMiniatureFrame {
 			get {
-				Pixbuf pixbuf = player.GetCurrentFrame(THUMBNAIL_MAX_WIDTH,THUMBNAIL_MAX_WIDTH);
-				return pixbuf;
+				return player.GetCurrentFrame(THUMBNAIL_MAX_WIDTH, THUMBNAIL_MAX_WIDTH);
 			}
 		}
 
-		public Pixbuf CurrentFrame {
+		public Image CurrentFrame {
 			get {
 				return player.GetCurrentFrame();
 			}
 		}
 
-		public Pixbuf LogoPixbuf {
+		public Image LogoPixbuf {
 			set {
 				player.LogoPixbuf = value;
 			}
@@ -158,7 +155,7 @@ namespace LongoMatch.Gui
 			}
 		}
 
-		public Pixbuf DrawingPixbuf {
+		public Image DrawingPixbuf {
 			set {
 				player.DrawingPixbuf=value;
 			}
@@ -385,14 +382,14 @@ namespace LongoMatch.Gui
 			Widget playerWidget;
 
 			factory= new MultimediaFactory();
-			player = factory.getPlayer(320,280);
+			player = factory.GetPlayer(320,280);
 
-			tickHandler = new TickHandler(OnTick);
+			tickHandler = new LongoMatch.Video.Common.TickHandler(OnTick);
 			player.Tick += tickHandler;
-			player.StateChange += new StateChangeHandler(OnStateChanged);
-			player.Eos += new EventHandler(OnEndOfStream);
-			player.Error += new ErrorHandler(OnError);
-			player.ReadyToSeek += new EventHandler(OnReadyToSeek);
+			player.StateChange += OnStateChanged;
+			player.Eos += OnEndOfStream;
+			player.Error += OnError;
+			player.ReadyToSeek += OnReadyToSeek;
 
 			playerWidget = (Widget)player;
 			playerWidget.ButtonPressEvent += OnVideoboxButtonPressEvent;
@@ -429,7 +426,7 @@ namespace LongoMatch.Gui
 				pausebutton.Hide();
 			}
 			if(PlayStateChanged != null)
-				PlayStateChanged(this,args);
+				PlayStateChanged(this,args.Playing);
 		}
 
 		protected void OnReadyToSeek(object o, EventArgs args) {
@@ -463,7 +460,7 @@ namespace LongoMatch.Gui
 			timelabel.Text = TimeString.MSecondsToSecondsString(currentTime) + "/" + slength;
 			timescale.Value = currentposition;
 			if(Tick != null)
-				Tick(o,args);
+				Tick(o, args.CurrentTime, args.StreamLength, args.CurrentPosition, args.Seekable);
 
 		}
 
@@ -542,7 +539,7 @@ namespace LongoMatch.Gui
 
 		protected virtual void OnError(object o, ErrorArgs args) {
 			if(Error != null)
-				Error(o,args);
+				Error(o, args.Message);
 		}
 
 		protected virtual void OnClosebuttonClicked(object sender, System.EventArgs e)
diff --git a/LongoMatch.GUI.Multimedia/Gui/VolumeWindow.cs b/LongoMatch.GUI.Multimedia/Gui/VolumeWindow.cs
index c2bbe4e..6f83f90 100644
--- a/LongoMatch.GUI.Multimedia/Gui/VolumeWindow.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/VolumeWindow.cs
@@ -19,6 +19,7 @@
 //
 using System;
 using LongoMatch.Video.Common;
+using LongoMatch.Handlers;
 
 namespace LongoMatch.Gui
 {
diff --git a/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic b/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic
index 5d0435e..1b5c1b5 100644
--- a/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic
@@ -6,7 +6,6 @@
   </configuration>
   <import>
     <widget-library name="../../bin/LongoMatch.Multimedia.dll" />
-    <widget-library name="../../bin/LongoMatch.dll" />
     <widget-library name="../../bin/LongoMatch.GUI.Multimedia.dll" internal="true" />
   </import>
   <widget class="Gtk.Window" id="LongoMatch.Gui.VolumeWindow" design-size="31 204">
diff --git a/LongoMatch.GUI/Gui/Component/ButtonsWidget.cs b/LongoMatch.GUI/Gui/Component/ButtonsWidget.cs
index 8414975..158d20a 100644
--- a/LongoMatch.GUI/Gui/Component/ButtonsWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/ButtonsWidget.cs
@@ -26,6 +26,7 @@ using LongoMatch.Common;
 using LongoMatch.Handlers;
 using LongoMatch.Store;
 using LongoMatch.Store.Templates;
+using LongoMatch.Gui;
 
 namespace LongoMatch.Gui.Component
 {
@@ -94,14 +95,14 @@ namespace LongoMatch.Gui.Component
 					var c = new Color();
 					Color.Parse("black", ref c);
 					l.ModifyFg(StateType.Normal, c);
-					l.ModifyFg(StateType.Prelight, cat.Color);
+					l.ModifyFg(StateType.Prelight, Helpers.ToGdkColor(cat.Color));
                     l.Markup = cat.Name;
 
 					b.Add(l);
 					b.Name = i.ToString();
 					b.Clicked += new EventHandler(OnButtonClicked);
 					b.CanFocus = false;
-					b.ModifyBg(StateType.Normal, cat.Color);
+					b.ModifyBg(StateType.Normal, Helpers.ToGdkColor(cat.Color));
 
 					l.Show();
 					b.Show();
diff --git a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
index 1e6eef6..6b47906 100644
--- a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
@@ -118,7 +118,7 @@ namespace LongoMatch.Gui.Component
 				
 			lagtimebutton.Value = cat.Start.Seconds;
 			leadtimebutton.Value = cat.Stop.Seconds;
-			colorbutton1.Color = cat.Color;
+			colorbutton1.Color = Helpers.ToGdkColor(cat.Color);
 			sortmethodcombobox.Active = (int)cat.SortMethod;
 			
 			if(cat.HotKey.Defined)
@@ -166,7 +166,7 @@ namespace LongoMatch.Gui.Component
 		protected virtual void OnColorbutton1ColorSet(object sender, System.EventArgs e)
 		{
 			if(cat != null)
-				cat.Color=colorbutton1.Color;
+				cat.Color= Helpers.ToDrawingColor(colorbutton1.Color);
 		}
 
 		protected virtual void OnLeadTimeChanged(object sender, System.EventArgs e)
diff --git a/LongoMatch.GUI/Gui/Component/DrawingToolBox.cs b/LongoMatch.GUI/Gui/Component/DrawingToolBox.cs
index c0cae4a..c641567 100644
--- a/LongoMatch.GUI/Gui/Component/DrawingToolBox.cs
+++ b/LongoMatch.GUI/Gui/Component/DrawingToolBox.cs
@@ -123,7 +123,7 @@ namespace LongoMatch.Gui.Component
 		protected virtual void OnColorbuttonColorSet(object sender, System.EventArgs e)
 		{
 			if(ColorChanged != null)
-				ColorChanged(colorbutton.Color);
+				ColorChanged(Helpers.ToDrawingColor(colorbutton.Color));
 		}
 	}
 }
diff --git a/LongoMatch.GUI/Gui/Component/PlayListWidget.cs b/LongoMatch.GUI/Gui/Component/PlayListWidget.cs
index 1e48f75..1b86583 100644
--- a/LongoMatch.GUI/Gui/Component/PlayListWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlayListWidget.cs
@@ -24,6 +24,7 @@ using LongoMatch.Common;
 using LongoMatch.Handlers;
 using LongoMatch.Store;
 using LongoMatch.Interfaces;
+using LongoMatch.Interfaces.GUI;
 
 
 namespace LongoMatch.Gui.Component
@@ -63,7 +64,7 @@ namespace LongoMatch.Gui.Component
 			playlisttreeview1.PlayList = playlist;
 			playlisttreeview1.Sensitive = true;
 			savebutton.Sensitive = true;
-			Model = playlist.GetModel();
+			Model = GetModel(playlist);
 		}
 
 		public ListStore Model {
@@ -83,6 +84,14 @@ namespace LongoMatch.Gui.Component
 			playlisttreeview1.Selection.SelectPath(new TreePath(index.ToString()));
 			playlisttreeview1.LoadedPlay = plNode;
 		}
+		
+		ListStore GetModel(IPlayList playlist) {
+			ListStore listStore = new ListStore(typeof(PlayListPlay));
+			foreach(PlayListPlay plNode in playlist) {
+				listStore.AppendValues(plNode);
+			}
+			return listStore;
+		}
 
 		protected virtual void OnPlaylisttreeview1RowActivated(object o, Gtk.RowActivatedArgs args)
 		{
diff --git a/LongoMatch.GUI/Gui/Component/PlayerProperties.cs b/LongoMatch.GUI/Gui/Component/PlayerProperties.cs
index 45f86c0..b5abd2f 100644
--- a/LongoMatch.GUI/Gui/Component/PlayerProperties.cs
+++ b/LongoMatch.GUI/Gui/Component/PlayerProperties.cs
@@ -61,7 +61,7 @@ namespace LongoMatch.Gui.Component
 				numberspinbutton.Value = value.Number;
 				weightspinbutton.Value = value.Weight;
 				heightspinbutton.Value = value.Height;
-				image.Pixbuf = value.Photo;
+				image.Pixbuf = value.Photo.Value;
 				playscombobox.Active = value.Playing ? 0 : 1;
 			}
 			get {
@@ -84,8 +84,6 @@ namespace LongoMatch.Gui.Component
 		{
 			Pixbuf pimage;
 			StreamReader file;
-			int h,w;
-			double rate;
 
 			FileChooserDialog fChooser = new FileChooserDialog(Catalog.GetString("Choose an image"),
 			                (Gtk.Window)this.Toplevel,
@@ -100,14 +98,10 @@ namespace LongoMatch.Gui.Component
 				file = new StreamReader(fChooser.Filename);
 				pimage= new Gdk.Pixbuf(file.BaseStream);
 				if(pimage != null) {
-					h = pimage.Height;
-					w = pimage.Width;
-					rate = (double)w/(double)h;
-					if(h>w)
-						player.Photo = pimage.ScaleSimple((int)(THUMBNAIL_MAX_HEIGHT*rate),THUMBNAIL_MAX_HEIGHT,InterpType.Bilinear);
-					else
-						player.Photo = pimage.ScaleSimple(THUMBNAIL_MAX_WIDTH,(int)(THUMBNAIL_MAX_WIDTH/rate),InterpType.Bilinear);
-					image.Pixbuf = player.Photo;
+					var img = new LongoMatch.Common.Image(pimage);
+					img.Scale(THUMBNAIL_MAX_WIDTH, THUMBNAIL_MAX_HEIGHT);
+					player.Photo = img;
+					image.Pixbuf = img.Value;
 				}
 			}
 			fChooser.Destroy();
diff --git a/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs b/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
index 32be788..a0d3a0e 100644
--- a/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
@@ -57,9 +57,25 @@ namespace LongoMatch.Gui.Component
 				playerstreeview.ProjectIsLive = value;
 			}
 		}
-
-		public void SetTeam(TreeStore model) {
-			playerstreeview.Model = model;
+		
+		public void SetTeam(TeamTemplate template, List<Play> plays) {
+			TreeStore team;
+			Dictionary<Player, TreeIter> playersDict = new Dictionary<Player, TreeIter>();
+			
+			team = new TreeStore(typeof(object));
+
+			foreach(var player in template) {
+				/* Add a root in the tree with the option name */
+				var iter = team.AppendValues(player);
+				playersDict.Add(player, iter);
+			}
+			
+			foreach (var play in plays) {
+				foreach (var player in play.Players.AllUniqueElements) {
+					if (playersDict.ContainsKey(player.Value))
+						team.AppendValues(playersDict[player.Value], new object[1] {play});
+				}
+			}
 		}
 
 		public void UpdatePlaysList(TreeStore model) {
diff --git a/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs b/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
index 28f1395..843d1c2 100644
--- a/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
@@ -119,7 +119,7 @@ namespace LongoMatch.Gui.Component
 			set {
 				project = value;
 				if(project != null) {
-					treeview.Model = project.GetModel();
+					treeview.Model = GetModel(project);
 					treeview.Colors = true;
 				}
 				else {
@@ -133,6 +133,27 @@ namespace LongoMatch.Gui.Component
 				treeview.PlayListLoaded=value;
 			}
 		}
+		
+		private TreeStore GetModel(Project project){
+			Dictionary<Category, TreeIter> itersDic = new Dictionary<Category, TreeIter>();
+			Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof(Play));
+
+			foreach(Category cat in project.Categories) {
+				Gtk.TreeIter iter = dataFileListStore.AppendValues(cat);
+				itersDic.Add(cat, iter);
+			}
+			
+			var queryPlaysByCategory = project.PlaysGroupedByCategory;
+			foreach(var playsGroup in queryPlaysByCategory) {
+				Category cat = playsGroup.Key;
+				if(!itersDic.ContainsKey(cat))
+					continue;
+				foreach(Play play in playsGroup) {
+					dataFileListStore.AppendValues(itersDic[cat],play);
+				}
+			}
+			return dataFileListStore;
+		}
 
 		private string CategoryPath(Category cat) {
 			return project.Categories.IndexOf(cat).ToString();
@@ -183,7 +204,6 @@ namespace LongoMatch.Gui.Component
 		
 		protected virtual void OnNewRenderingJob (object sender, EventArgs args)
 		{
-			Job job;
 			PlayList playlist = new PlayList();
 			TreePath[] paths = treeview.Selection.GetSelectedRows();
 
diff --git a/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs b/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
index 696a146..eaf7769 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
@@ -81,8 +81,8 @@ namespace LongoMatch.Gui.Component
 			set {
 				tpc = value.CategoriesTemplateProvider;
 				tpt = value.TeamTemplateProvider;
-				twc = value.GetTemplateEditor<Categories, Category> ();
-				twt = value.GetTemplateEditor<TeamTemplate, Player>();
+				twc = new CategoriesTemplateEditorWidget(tpc);
+				twt = new TeamTemplateEditorWidget(tpt);
 				FillCategories();
 				FillTeamsTemplate();
 			}
@@ -264,6 +264,8 @@ namespace LongoMatch.Gui.Component
 
 		public void SetProject(Project project) {
 			this.project = project;
+			if (project == null)
+				return;
 			var desc = project.Description;
 			mFile = desc.File;
 			Filename = mFile != null ? mFile.FilePath : "";
diff --git a/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs b/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
index a752040..a9f01b7 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
@@ -107,7 +107,7 @@ namespace LongoMatch.Gui.Component
 		{
 			ProjectDescription project = (ProjectDescription) model.GetValue(iter, 0);
 
-			(cell as Gtk.CellRendererPixbuf).Pixbuf= project.File.Preview;
+			(cell as Gtk.CellRendererPixbuf).Pixbuf= project.File.Preview.Value;
 		}
 
 		private void RenderProperties(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
diff --git a/LongoMatch.GUI/Gui/Component/RenderingStateBar.cs b/LongoMatch.GUI/Gui/Component/RenderingStateBar.cs
index 06db51d..7ba426a 100644
--- a/LongoMatch.GUI/Gui/Component/RenderingStateBar.cs
+++ b/LongoMatch.GUI/Gui/Component/RenderingStateBar.cs
@@ -16,10 +16,12 @@
 //  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 // 
 using System;
+using LongoMatch.Interfaces.GUI;
+
 namespace LongoMatch.Gui.Component
 {
 	[System.ComponentModel.ToolboxItem(true)]
-	public partial class RenderingStateBar : Gtk.Bin
+	public partial class RenderingStateBar : Gtk.Bin, IRenderingStateBar
 	{
 		public event EventHandler Cancel;
 		public event EventHandler ManageJobs;
diff --git a/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs b/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
index 01e8e31..43fbace 100644
--- a/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
+++ b/LongoMatch.GUI/Gui/Component/TeamTemplateEditor.cs
@@ -22,6 +22,8 @@ using Gdk;
 using Gtk;
 using Mono.Unix;
 using Stetic;
+
+using Image = LongoMatch.Common.Image;
 using LongoMatch.Common;
 using LongoMatch.Gui.Base;
 using LongoMatch.Gui.Dialog;
@@ -60,7 +62,7 @@ namespace LongoMatch.Gui.Component
 				treeview.Model=playersListStore;
 				teamentry.Text = template.TeamName;
 				if (template.Shield != null) {
-					shieldImage.Pixbuf = template.Shield;
+					shieldImage.Pixbuf = template.Shield.Value;
 				}
 				box.Sensitive = true;
 			}
@@ -113,10 +115,10 @@ namespace LongoMatch.Gui.Component
 		{
 			Pixbuf shield;
 			
-			shield = ImageUtils.OpenImage((Gtk.Window)this.Toplevel);
+			shield = Helpers.OpenImage((Gtk.Window)this.Toplevel);
 			if (shield != null) {
-				Template.Shield = shield;
-				shieldImage.Pixbuf = Template.Shield;
+				Template.Shield = new Image(shield);
+				shieldImage.Pixbuf = shield;
 			}
 		}
 
diff --git a/LongoMatch.GUI/Gui/Component/TimelineLabelsWidget.cs b/LongoMatch.GUI/Gui/Component/TimelineLabelsWidget.cs
index 43ed277..6c4b589 100644
--- a/LongoMatch.GUI/Gui/Component/TimelineLabelsWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/TimelineLabelsWidget.cs
@@ -58,7 +58,7 @@ namespace LongoMatch.Gui.Component
 			set {
 				labelsDict.Clear();
 				foreach (Category cat in value)
-					labelsDict.Add(cat.Name, cat.Color);
+					labelsDict.Add(cat.Name, Helpers.ToGdkColor(cat.Color));
 			}
 		}
 
diff --git a/LongoMatch.GUI/Gui/Dialog/BusyDialog.cs b/LongoMatch.GUI/Gui/Dialog/BusyDialog.cs
index 8edd2d4..bcfa8d3 100644
--- a/LongoMatch.GUI/Gui/Dialog/BusyDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/BusyDialog.cs
@@ -18,11 +18,13 @@
 
 using System;
 
+using LongoMatch.Interfaces.GUI;
+
 namespace LongoMatch.Gui.Dialog
 {
 
 
-	public partial class BusyDialog : Gtk.Window
+	public partial class BusyDialog : Gtk.Window, IBusyDialog
 	{
 
 		public BusyDialog() :
diff --git a/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs b/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
index 70a7423..8ef0d6d 100644
--- a/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
+++ b/LongoMatch.GUI/Gui/Dialog/DrawingTool.cs
@@ -20,6 +20,8 @@ using System;
 using Gdk;
 using Gtk;
 using Mono.Unix;
+
+using Image = LongoMatch.Common.Image;
 using LongoMatch.Common;
 using LongoMatch.Gui.Component;
 using LongoMatch.Store;
@@ -63,9 +65,9 @@ namespace LongoMatch.Gui.Dialog
 			drawingwidget1.LineWidth = width;
 		}
 
-		protected virtual void OnDrawingtoolbox1ColorChanged(Gdk.Color color)
+		protected virtual void OnDrawingtoolbox1ColorChanged(System.Drawing.Color color)
 		{
-			drawingwidget1.LineColor = color;
+			drawingwidget1.LineColor = Helpers.ToGdkColor(color);
 		}
 
 		protected virtual void OnDrawingtoolbox1VisibilityChanged(bool visible)
@@ -119,10 +121,10 @@ namespace LongoMatch.Gui.Dialog
 			string tempFile = System.IO.Path.GetTempFileName();
 			drawingwidget1.SaveDrawings(tempFile);
 			Pixbuf frame = new Pixbuf(tempFile);
-			play.Drawings.Add(new Drawing { Pixbuf=frame, RenderTime = stopTime});
+			play.Drawings.Add(new Drawing { Pixbuf= new Image(frame), RenderTime = stopTime});
 			drawingwidget1.SaveAll(tempFile);
 			frame.Dispose();
-			play.Miniature = new Pixbuf(tempFile);
+			play.Miniature = new Image(new Pixbuf(tempFile));
 		}
 	}
 }
diff --git a/LongoMatch.GUI/Gui/Dialog/FramesCaptureProgressDialog.cs b/LongoMatch.GUI/Gui/Dialog/FramesCaptureProgressDialog.cs
index 6a630a2..f355548 100644
--- a/LongoMatch.GUI/Gui/Dialog/FramesCaptureProgressDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/FramesCaptureProgressDialog.cs
@@ -22,6 +22,8 @@ using System;
 using Gtk;
 using Gdk;
 using Mono.Unix;
+
+using LongoMatch.Handlers;
 using LongoMatch.Video.Utils;
 using LongoMatch.Video.Common;
 
@@ -39,18 +41,18 @@ namespace LongoMatch.Gui.Dialog
 			this.Build();
 			this.Deletable = false;
 			this.capturer = capturer;
-			capturer.Progress += new FramesProgressHandler(Update);
+			capturer.Progress += Update;
 			capturer.Start();
 		}
 
-		protected virtual void Update(int actual, int total,Pixbuf frame) {
+		protected virtual void Update(int actual, int total, LongoMatch.Common.Image frame) {
 			if(actual <= total) {
 				progressbar.Text= Catalog.GetString("Capturing frame: ")+actual+"/"+total;
 				progressbar.Fraction = (double)actual/(double)total;
 				if(frame != null) {
 					if(image.Pixbuf != null)
 						image.Pixbuf.Dispose();
-					image.Pixbuf = frame;
+					image.Pixbuf = frame.Value;
 				}
 			}
 			if(actual == total) {
diff --git a/LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs b/LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs
index dc66d95..070a16b 100644
--- a/LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/HotKeySelectorDialog.cs
@@ -66,8 +66,8 @@ namespace LongoMatch.Gui.Dialog
 			                && key != Gdk.Key.Control_L
 			                && key != Gdk.Key.Control_R)
 			{
-				hotKey.Key = key;
-				hotKey.Modifier = modifier & (ModifierType.Mod1Mask | ModifierType.ShiftMask);
+				hotKey.Key = (int)key;
+				hotKey.Modifier = (int) (modifier & (ModifierType.Mod1Mask | ModifierType.ShiftMask));
 				this.Respond(ResponseType.Ok);
 			}
 
diff --git a/LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs b/LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs
index 8b9eb33..f081ee0 100644
--- a/LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/RenderingJobsDialog.cs
@@ -42,7 +42,10 @@ namespace LongoMatch.Gui.Dialog
 		}
 		
 		private void UpdateModel() {
-			model = manager.Model;
+			TreeStore model = new TreeStore(typeof(Job));
+			
+			foreach (Job job in manager.Jobs)
+				model.AppendValues(job);
 			renderingjobstreeview2.Model = model;
 			QueueDraw();
 		}
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index 05665ea..30e26d3 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -24,25 +24,24 @@ using System.IO;
 using Gdk;
 using GLib;
 using Gtk;
+using Mono.Unix;
+
 using LongoMatch.Common;
 using LongoMatch.Gui.Dialog;
 using LongoMatch.Handlers;
 using LongoMatch.Interfaces;
+using LongoMatch.Interfaces.GUI;
 using LongoMatch.Store;
 using LongoMatch.Store.Templates;
 using LongoMatch.Video.Common;
-
-using Mono.Unix;
 using LongoMatch.Gui.Component;
-using LongoMatch.Multimedia.Interfaces;
-
 
 
 namespace LongoMatch.Gui
 {
 	[System.ComponentModel.Category("LongoMatch")]
 	[System.ComponentModel.ToolboxItem(false)]
-	public partial class MainWindow : Gtk.Window
+	public partial class MainWindow : Gtk.Window, IMainWindow
 	{
 	
 		/* Tags */
@@ -154,25 +153,25 @@ namespace LongoMatch.Gui
 			timeline.QueueDraw();
 		}
 		
-		public RenderingStateBar RenderingStateBar{
+		public IRenderingStateBar RenderingStateBar{
 			get {
 				return renderingstatebar1;
 			}
 		}
 		
-		public PlayerBin Player{
+		public IPlayer Player{
 			get {
 				return player;
 			}
 		}
 		
-		public CapturerBin Capturer{
+		public ICapturer Capturer{
 			get {
 				return capturer;
 			}
 		}
 		
-		public PlayListWidget Playlist{
+		public IPlaylistWidget Playlist{
 			get {
 				return playlist;
 			}
@@ -268,14 +267,11 @@ namespace LongoMatch.Gui
 		}
 		
 		private void UpdateTeamsModels() {
-			TreeStore local, visitor;
-		
-			openedProject.GetPlayersModel (out local, out visitor);
-			localPlayersList.SetTeam(local);
-			visitorPlayersList.SetTeam(visitor);
+			localPlayersList.SetTeam(openedProject.LocalTeamTemplate, openedProject.AllPlays());
+			visitorPlayersList.SetTeam(openedProject.VisitorTeamTemplate, openedProject.AllPlays());
 		}
 
-		public bool SetProject(Project project, ProjectType projectType, CaptureSettings props)
+		public void SetProject(Project project, ProjectType projectType, CaptureSettings props)
 		{
 			bool isLive = false;
 			
@@ -310,21 +306,12 @@ namespace LongoMatch.Gui
 			tagsList.ProjectIsLive = isLive;
 			playsList.Project=project;
 			tagsList.Project = project;
-			UpdateTeamsModels(project);
+			UpdateTeamsModels();
 			buttonswidget.Categories = project.Categories;
 			MakeActionsSensitive(true,projectType);
 			ShowWidgets();
-			return true;
 		}
 		
-		private void UpdateTeamsModels(Project project) {
-			TreeStore local, visitor;
-			
-			project.GetPlayersModel (out local, out visitor);
-			localPlayersList.SetTeam(local);
-			visitorPlayersList.SetTeam(visitor);
-		}
-
 		private void CloseCaptureProject() {
 			if(projectType == ProjectType.CaptureProject) {
 				capturer.Close();
@@ -535,10 +522,10 @@ namespace LongoMatch.Gui
 		}
 		#endregion
 
-		protected virtual void OnPlayerbin1Error(object o, LongoMatch.Video.Common.ErrorArgs args)
+		protected virtual void OnPlayerbin1Error(object o, string message)
 		{
 			MessagePopup.PopupMessage(this, MessageType.Info,
-			                          Catalog.GetString("The actual project will be closed due to an error in the media player:")+"\n" +args.Message);
+			                          Catalog.GetString("The actual project will be closed due to an error in the media player:")+"\n" + message);
 			EmitCloseOpenedProject(true);
 		}
 
@@ -603,12 +590,13 @@ namespace LongoMatch.Gui
 			notes.Visible = false;
 		}
 		
-		protected virtual void OnTick(object o, TickArgs args)
+		protected virtual void OnTick(object o, long currentTime, long streamLength,
+			float currentPosition, bool seekable)
 		{
-			if(args.CurrentTime != 0 && timeline != null && openedProject != null)
-				timeline.CurrentFrame=(uint)(args.CurrentTime *
+			if(currentTime != 0 && timeline != null && openedProject != null)
+				timeline.CurrentFrame=(uint)(currentTime *
 				                             openedProject.Description.File.Fps / 1000);
-			gameunitstaggerwidget1.CurrentTime = new Time{MSeconds = (int)args.CurrentTime};
+			gameunitstaggerwidget1.CurrentTime = new Time{MSeconds = (int)currentTime};
 		}
 
 		
@@ -632,10 +620,11 @@ namespace LongoMatch.Gui
 			return true;
 		}
 
-		protected virtual void OnCapturerBinError(object o, LongoMatch.Video.Common.ErrorArgs args)
+		protected virtual void OnCapturerBinError(object o, string message)
 		{
 			MessagePopup.PopupMessage(this, MessageType.Info,
-			                          Catalog.GetString("An error occured in the video capturer and the current project will be closed:")+"\n" +args.Message);
+				Catalog.GetString("An error occured in the video capturer and" +
+				" the current project will be closed:")+"\n" + message);
 			EmitCloseOpenedProject(true);
 		}
 		#endregion
diff --git a/LongoMatch.GUI/Gui/TreeView/CategoriesTreeView.cs b/LongoMatch.GUI/Gui/TreeView/CategoriesTreeView.cs
index 3c50a26..33ab0d8 100644
--- a/LongoMatch.GUI/Gui/TreeView/CategoriesTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/CategoriesTreeView.cs
@@ -25,6 +25,7 @@ using Gtk;
 using Mono.Unix;
 using LongoMatch.Handlers;
 using LongoMatch.Store;
+using LongoMatch.Gui;
 
 namespace LongoMatch.Gui.Component
 {
@@ -115,7 +116,7 @@ namespace LongoMatch.Gui.Component
 		{
 			Category tNode = (Category) model.GetValue(iter, 0);
 
-			(cell as Gtk.CellRendererText).CellBackgroundGdk = tNode.Color;
+			(cell as Gtk.CellRendererText).CellBackgroundGdk = Helpers.ToGdkColor(tNode.Color);
 		}
 
 		private void RenderHotKey(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
diff --git a/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs b/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs
index 2dcfe48..5bad23d 100644
--- a/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs
+++ b/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs
@@ -99,8 +99,6 @@ namespace LongoMatch.Gui.Component
 		}
 
 		protected void SetMenu() {
-			MenuItem team;
-
 			menu = new Menu();
 
 			name = new MenuItem(Catalog.GetString("Edit name"));
@@ -153,15 +151,15 @@ namespace LongoMatch.Gui.Component
 			var c = cell as CellRendererPixbuf;
 
 			if(item is Play) {
-				c.Pixbuf = (item as Play).Miniature;
+				c.Pixbuf = (item as Play).Miniature.Value;
 				if(Colors) {
-					c.CellBackgroundGdk = (item as Play).Category.Color;
+					c.CellBackgroundGdk = Helpers.ToGdkColor((item as Play).Category.Color);
 				} else {
 					c.CellBackground = "white";
 				}
 			}
 			else if(item is Player) {
-				c.Pixbuf= (item as Player).Photo;
+				c.Pixbuf= (item as Player).Photo.Value;
 				c.CellBackground = "white";
 			}
 			else {
@@ -188,7 +186,7 @@ namespace LongoMatch.Gui.Component
 			if(o is Play) {
 				var mtn = o as Play;
 				if(Colors) {
-					Color col = mtn.Category.Color;
+					Color col = Helpers.ToGdkColor(mtn.Category.Color);
 					c.CellBackgroundGdk = col;
 					c.BackgroundGdk = col;
 				} else {
diff --git a/LongoMatch.GUI/Gui/TreeView/PlayerPropertiesTreeView.cs b/LongoMatch.GUI/Gui/TreeView/PlayerPropertiesTreeView.cs
index 4f0efc3..7bbb3b9 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlayerPropertiesTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlayerPropertiesTreeView.cs
@@ -113,7 +113,7 @@ namespace LongoMatch.Gui.Component
 		{
 			Player player = (Player) model.GetValue(iter, 0);
 
-			(cell as Gtk.CellRendererPixbuf).Pixbuf = player.Photo;
+			(cell as Gtk.CellRendererPixbuf).Pixbuf = player.Photo.Value;
 		}
 
 		private void RenderName(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
diff --git a/LongoMatch.GUI/LongoMatch.GUI.mdp b/LongoMatch.GUI/LongoMatch.GUI.mdp
index d1bdea3..aef0626 100644
--- a/LongoMatch.GUI/LongoMatch.GUI.mdp
+++ b/LongoMatch.GUI/LongoMatch.GUI.mdp
@@ -123,7 +123,6 @@
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.RenderingJobsDialog.cs" />
     <File subtype="Directory" buildaction="Compile" name="." />
     <File subtype="Directory" buildaction="Compile" name="." />
-    <File subtype="Directory" buildaction="Compile" name="." />
     <File subtype="Code" buildaction="Compile" name="Gui/Dialog/About.cs" />
     <File subtype="Code" buildaction="EmbedAsResource" name="../images/longomatch.png" />
     <File subtype="Code" buildaction="EmbedAsResource" name="../images/stock_draw-circle-unfilled.png" />
@@ -148,6 +147,12 @@
     <File subtype="Code" buildaction="Compile" name="Gui/Base/TimelineWidgetBase.cs" />
     <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Base.TimelineWidgetBase.cs" />
     <File subtype="Code" buildaction="Compile" name="Gui/Component/GameUnitsTimelineWidget.cs" />
+    <File subtype="Code" buildaction="Compile" name="Gui/GUIToolkit.cs" />
+    <File subtype="Directory" buildaction="Compile" name="." />
+    <File subtype="Directory" buildaction="Compile" name=".." />
+    <File subtype="Directory" buildaction="Compile" name="Gui" />
+    <File subtype="Code" buildaction="Compile" name="Gui/Helpers.cs" />
+    <File subtype="Code" buildaction="Compile" name="Gui/Cairo.cs" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
@@ -162,6 +167,7 @@
     <ProjectReference type="Gac" localcopy="True" refto="Mono.Cairo, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
     <ProjectReference type="Gac" localcopy="True" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
     <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+    <ProjectReference type="Gac" localcopy="True" refto="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   </References>
   <LanguageParameters ApplicationIcon="." CodePage="65001" ctype="CSharpProjectParameters" />
 </Project>
\ No newline at end of file
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
index d0a68c2..3317678 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -139,12 +139,12 @@ namespace LongoMatch.Gui
 			this.ImportProjectAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Import Project");
 			w1.Add (this.ImportProjectAction, "<Control>i");
 			this.ManualTaggingViewAction = new global::Gtk.RadioAction ("ManualTaggingViewAction", global::Mono.Unix.Catalog.GetString ("Manual tagging view"), null, null, 0);
-			this.ManualTaggingViewAction.Group = this.TimelineViewAction.Group;
+			this.ManualTaggingViewAction.Group = this.TaggingViewAction.Group;
 			this.ManualTaggingViewAction.Sensitive = false;
 			this.ManualTaggingViewAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Free Capture Mode");
 			w1.Add (this.ManualTaggingViewAction, "<Control>f");
 			this.GameUnitsViewAction = new global::Gtk.RadioAction ("GameUnitsViewAction", global::Mono.Unix.Catalog.GetString ("Game units view"), null, null, 0);
-			this.GameUnitsViewAction.Group = this.TimelineViewAction.Group;
+			this.GameUnitsViewAction.Group = this.TaggingViewAction.Group;
 			this.GameUnitsViewAction.Sensitive = false;
 			this.GameUnitsViewAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Game units view");
 			w1.Add (this.GameUnitsViewAction, null);
@@ -387,9 +387,9 @@ namespace LongoMatch.Gui
 			this.ManualTaggingViewAction.Toggled += new global::System.EventHandler (this.OnViewToggled);
 			this.GameUnitsViewAction.Toggled += new global::System.EventHandler (this.OnViewToggled);
 			this.playsList.TimeNodeSelected += new global::LongoMatch.Handlers.PlaySelectedHandler (this.OnTimeNodeSelected);
-			this.player.Error += new global::LongoMatch.Video.Common.ErrorHandler (this.OnPlayerbin1Error);
-			this.player.SegmentClosedEvent += new global::LongoMatch.Video.Common.SegmentClosedHandler (this.OnSegmentClosedEvent);
-			this.capturer.Error += new global::LongoMatch.Video.Common.ErrorHandler (this.OnCapturerBinError);
+			this.player.Error += new global::LongoMatch.Handlers.ErrorHandler (this.OnPlayerbin1Error);
+			this.player.SegmentClosedEvent += new global::LongoMatch.Handlers.SegmentClosedHandler (this.OnSegmentClosedEvent);
+			this.capturer.Error += new global::LongoMatch.Handlers.ErrorHandler (this.OnCapturerBinError);
 		}
 	}
 }
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index ff3d4f5..b1314ec 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -7,7 +7,6 @@
   <import>
     <widget-library name="../../bin/LongoMatch.GUI.Multimedia.dll" />
     <widget-library name="../../bin/LongoMatch.Multimedia.dll" />
-    <widget-library name="../../bin/LongoMatch.dll" />
     <widget-library name="../../bin/LongoMatch.Gui.dll" internal="true" />
   </import>
   <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.ProjectDetailsWidget" design-size="378 268">
diff --git a/LongoMatch.GUI/gtk-gui/objects.xml b/LongoMatch.GUI/gtk-gui/objects.xml
index 0f73630..1ec76a5 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -47,10 +47,6 @@
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.DrawingWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals />
-  </object>
   <object type="LongoMatch.Gui.Component.TaggerWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals />
@@ -79,18 +75,6 @@
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.PlayerProperties" palette-category="General" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals />
-  </object>
-  <object type="LongoMatch.Gui.Component.ProjectListWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals>
-      <itemgroup label="ProjectListWidget Signals">
-        <signal name="ProjectsSelected" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.PlayersTaggerWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals />
@@ -139,27 +123,6 @@
     <itemgroups />
     <signals />
   </object>
-  <object type="LongoMatch.Gui.Component.RenderingStateBar" palette-category="General" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups>
-      <itemgroup label="RenderingStateBar Properties">
-        <property name="Fraction" />
-      </itemgroup>
-    </itemgroups>
-    <signals>
-      <itemgroup label="RenderingStateBar Signals">
-        <signal name="Cancel" />
-        <signal name="ManageJobs" />
-      </itemgroup>
-    </signals>
-  </object>
-  <object type="LongoMatch.Gui.Component.CategoryProperties" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals>
-      <itemgroup label="CategoryProperties Signals">
-        <signal name="HotKeyChanged" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.DrawingToolBox" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals>
@@ -173,20 +136,6 @@
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.PlaysListTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals>
-      <itemgroup label="PlaysListTreeWidget Signals">
-        <signal name="TimeNodeSelected" />
-        <signal name="TimeNodeChanged" />
-        <signal name="TimeNodeDeleted" />
-        <signal name="PlayListNodeAdded" />
-        <signal name="SnapshotSeriesEvent" />
-        <signal name="TagPlay" />
-        <signal name="RenderPlaylistEvent" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.GameUnitsTagger" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals>
@@ -195,23 +144,6 @@
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.ProjectDetailsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups>
-      <itemgroup label="ProjectDetailsWidget Properties">
-        <property name="Edited" />
-        <property name="Season" />
-        <property name="Competition" />
-        <property name="LocalGoals" />
-        <property name="VisitorGoals" />
-        <property name="Date" />
-      </itemgroup>
-    </itemgroups>
-    <signals>
-      <itemgroup label="ProjectDetailsWidget Signals">
-        <signal name="EditedEvent" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.GameUnitsEditor" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups />
     <signals />
@@ -251,16 +183,28 @@
   </object>
   <object type="LongoMatch.Gui.Base.TemplatesEditorWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups>
+      <itemgroup label="TemplatesEditorBase Properties">
+        <property name="CanExport" />
+        <property name="Edited" />
+      </itemgroup>
     </itemgroups>
     <signals />
   </object>
   <object type="LongoMatch.Gui.Component.CategoriesTemplateEditorWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
     <itemgroups>
+      <itemgroup label="TemplatesEditorBase Properties">
+        <property name="CanExport" />
+        <property name="Edited" />
+      </itemgroup>
     </itemgroups>
     <signals />
   </object>
   <object type="LongoMatch.Gui.Component.TeamTemplateEditorWidget" palette-category="General" allow-children="false" base-type="LongoMatch.Gui.Base.TemplatesEditorBase">
     <itemgroups>
+      <itemgroup label="TemplatesEditorBase Properties">
+        <property name="CanExport" />
+        <property name="Edited" />
+      </itemgroup>
     </itemgroups>
     <signals />
   </object>
@@ -344,4 +288,72 @@
       </itemgroup>
     </signals>
   </object>
+  <object type="LongoMatch.Gui.Component.RenderingStateBar" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups>
+      <itemgroup label="RenderingStateBar Properties">
+        <property name="Fraction" />
+      </itemgroup>
+    </itemgroups>
+    <signals>
+      <itemgroup label="RenderingStateBar Signals">
+        <signal name="Cancel" />
+        <signal name="ManageJobs" />
+      </itemgroup>
+    </signals>
+  </object>
+  <object type="LongoMatch.Gui.Component.ProjectDetailsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups>
+      <itemgroup label="ProjectDetailsWidget Properties">
+        <property name="Edited" />
+        <property name="Season" />
+        <property name="Competition" />
+        <property name="LocalGoals" />
+        <property name="VisitorGoals" />
+        <property name="Date" />
+      </itemgroup>
+    </itemgroups>
+    <signals>
+      <itemgroup label="ProjectDetailsWidget Signals">
+        <signal name="EditedEvent" />
+      </itemgroup>
+    </signals>
+  </object>
+  <object type="LongoMatch.Gui.Component.DrawingWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals />
+  </object>
+  <object type="LongoMatch.Gui.Component.ProjectListWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals>
+      <itemgroup label="ProjectListWidget Signals">
+        <signal name="ProjectsSelected" />
+      </itemgroup>
+    </signals>
+  </object>
+  <object type="LongoMatch.Gui.Component.CategoryProperties" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals>
+      <itemgroup label="CategoryProperties Signals">
+        <signal name="HotKeyChanged" />
+      </itemgroup>
+    </signals>
+  </object>
+  <object type="LongoMatch.Gui.Component.PlayerProperties" palette-category="General" allow-children="false" base-type="Gtk.Widget">
+    <itemgroups />
+    <signals />
+  </object>
+  <object type="LongoMatch.Gui.Component.PlaysListTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals>
+      <itemgroup label="PlaysListTreeWidget Signals">
+        <signal name="TimeNodeSelected" />
+        <signal name="TimeNodeChanged" />
+        <signal name="TimeNodeDeleted" />
+        <signal name="PlayListNodeAdded" />
+        <signal name="SnapshotSeriesEvent" />
+        <signal name="TagPlay" />
+        <signal name="RenderPlaylistEvent" />
+      </itemgroup>
+    </signals>
+  </object>
 </objects>
\ No newline at end of file



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