[longomatch/redesign: 11/11] WIP
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/redesign: 11/11] WIP
- Date: Sat, 16 Oct 2010 17:47:43 +0000 (UTC)
commit 79e82bac72a5dfd7519ecd34e6f87e88a39318ee
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sat Oct 16 19:45:23 2010 +0200
WIP
LongoMatch/DB/DataBase.cs | 62 ++--
LongoMatch/DB/Project.cs | 450 ++++---------------
LongoMatch/DB/ProjectDescription.cs | 9 +-
LongoMatch/DB/Sections.cs | 196 ++-------
LongoMatch/DB/TeamTemplate.cs | 47 ++-
LongoMatch/Gui/Component/ButtonsWidget.cs | 10 +-
LongoMatch/Gui/Component/CategoryProperties.cs | 6 +-
LongoMatch/Gui/Component/NotesWidget.cs | 4 +-
LongoMatch/Gui/Component/PlayListWidget.cs | 12 +-
LongoMatch/Gui/Component/PlayersListTreeWidget.cs | 23 +-
LongoMatch/Gui/Component/PlaysListTreeWidget.cs | 50 +--
LongoMatch/Gui/Component/ProjectDetailsWidget.cs | 4 +-
LongoMatch/Gui/Component/ProjectTemplateWidget.cs | 52 ++--
LongoMatch/Gui/Component/TagsTreeWidget.cs | 22 +-
LongoMatch/Gui/Component/TimeAdjustWidget.cs | 2 +-
LongoMatch/Gui/Component/TimeLineWidget.cs | 14 +-
LongoMatch/Gui/Component/TimeScale.cs | 36 +-
LongoMatch/Gui/Dialog/DrawingTool.cs | 4 +-
LongoMatch/Gui/Dialog/EditCategoryDialog.cs | 14 +-
LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs | 36 +-
.../Gui/Dialog/ProjectTemplateEditorDialog.cs | 6 +-
LongoMatch/Gui/Dialog/TemplatesEditor.cs | 38 +-
LongoMatch/Gui/MainWindow.cs | 33 +-
LongoMatch/Gui/TreeView/PlayListTreeView.cs | 8 +-
LongoMatch/Handlers/EventsManager.cs | 94 +++--
LongoMatch/Handlers/Handlers.cs | 26 +-
LongoMatch/Handlers/HotKeysManager.cs | 21 +-
LongoMatch/Handlers/VideoDrawingsManager.cs | 4 +-
LongoMatch/IO/CSVExport.cs | 22 +-
LongoMatch/IO/SectionsReader.cs | 15 +-
LongoMatch/IO/SectionsWriter.cs | 27 +-
LongoMatch/LongoMatch.mdp | 32 +-
LongoMatch/Main.cs | 9 +-
LongoMatch/Playlist/IPlayList.cs | 21 +-
LongoMatch/Playlist/PlayList.cs | 30 +-
LongoMatch/Time/Category.cs | 114 +++++
LongoMatch/Time/MediaTimeNode.cs | 367 ----------------
LongoMatch/Time/PixbufTimeNode.cs | 24 -
LongoMatch/Time/Play.cs | 278 ++++++++++++
.../Time/{PlayListTimeNode.cs => PlayListPlay.cs} | 37 +--
LongoMatch/Time/Player.cs | 100 +----
LongoMatch/Time/SectionsTimeNode.cs | 165 -------
LongoMatch/Time/Tag.cs | 26 +-
LongoMatch/Time/TimeNode.cs | 54 +--
.../LongoMatch.Gui.Component.ButtonsWidget.cs | 1 +
.../LongoMatch.Gui.Component.CategoryProperties.cs | 6 +-
.../LongoMatch.Gui.Component.DrawingToolBox.cs | 1 +
.../LongoMatch.Gui.Component.PlayListWidget.cs | 6 +-
.../LongoMatch.Gui.Component.PlayerProperties.cs | 1 +
...ngoMatch.Gui.Component.PlayersListTreeWidget.cs | 4 +-
...LongoMatch.Gui.Component.PlaysListTreeWidget.cs | 4 +-
...ongoMatch.Gui.Component.ProjectDetailsWidget.cs | 1 +
...ngoMatch.Gui.Component.ProjectTemplateWidget.cs | 6 +-
.../LongoMatch.Gui.Component.TaggerWidget.cs | 1 +
.../LongoMatch.Gui.Component.TagsTreeWidget.cs | 4 +-
.../LongoMatch.Gui.Component.TeamTemplateWidget.cs | 6 +-
.../LongoMatch.Gui.Component.TimeAdjustWidget.cs | 1 +
.../gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs | 12 +-
.../LongoMatch.Gui.Dialog.EditCategoryDialog.cs | 4 +-
.../LongoMatch.Gui.Dialog.EditPlayerDialog.cs | 4 +-
.../gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs | 1 +
.../gtk-gui/LongoMatch.Gui.Dialog.Migrator.cs | 196 ---------
.../LongoMatch.Gui.Dialog.NewProjectDialog.cs | 7 +-
.../LongoMatch.Gui.Dialog.OpenProjectDialog.cs | 5 +-
...LongoMatch.Gui.Dialog.PlayersSelectionDialog.cs | 1 +
...Match.Gui.Dialog.ProjectTemplateEditorDialog.cs | 5 +-
.../LongoMatch.Gui.Dialog.ProjectsManager.cs | 15 +-
.../LongoMatch.Gui.Dialog.SnapshotsDialog.cs | 1 +
.../gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs | 4 +-
.../LongoMatch.Gui.Dialog.TeamTemplateEditor.cs | 5 +-
.../LongoMatch.Gui.Dialog.TemplatesManager.cs | 14 +-
LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs | 48 +--
LongoMatch/gtk-gui/gui.stetic | 197 ---------
LongoMatch/gtk-gui/objects.xml | 122 +++---
74 files changed, 1075 insertions(+), 2212 deletions(-)
---
diff --git a/LongoMatch/DB/DataBase.cs b/LongoMatch/DB/DataBase.cs
index a55f319..65359ed 100644
--- a/LongoMatch/DB/DataBase.cs
+++ b/LongoMatch/DB/DataBase.cs
@@ -49,9 +49,9 @@ namespace LongoMatch.DB
private Version dbVersion;
- private const int MAYOR=0;
+ private const int MAYOR=1;
- private const int MINOR=1;
+ private const int MINOR=0;
/// <summary>
/// Creates a proxy for the database
@@ -126,36 +126,36 @@ namespace LongoMatch.DB
while (result.HasNext()) {
try{
Project p = (Project)result.Next();
+ ProjectDescription desc = p.Description;
+ db.Activate(desc,3);
try{
- db.Activate(p.File,3);
//FIXME: It happens that the project's File object is set to null?¿?¿
// In that case, reset the value to let the user change it with the
// projects manager.
- if (p.File.FilePath == null){}
+ if (desc.File.FilePath == null){}
}catch{
MessagePopup.PopupMessage(null, MessageType.Warning,
- Catalog.GetString("Error retrieving the file info for project:")+" "+p.Title+"\n"+
- Catalog.GetString("This value will be reset. Remember to change it later with the projects manager"));
- p.File = new PreviewMediaFile(Catalog.GetString("Change Me"),0,0,false,false,"","",0,0,null);
- db.Store(p);
+ Catalog.GetString("Error retrieving the file " +
+ "info for project:")+
+ " "+ desc.Title+"\n"+
+ Catalog.GetString("This value will be reset. " +
+ "Remember to change it later with the " +
+ "projects manager"));
+ desc.File = new PreviewMediaFile{
+ FilePath = Catalog.GetString("Change Me"),
+ VideoHeight = 0,
+ VideoWidth = 0,
+ HasVideo = false,
+ HasAudio = false,
+ Length = 0,
+ Fps = 0,
+ VideoCodec = "",
+ AudioCodec = "",
+ Preview = null,
+ };
+ db.Store(p);
}
- ProjectDescription pd = new ProjectDescription {
- File = p.File.FilePath,
- LocalName= p.LocalName,
- VisitorName = p.VisitorName,
- Season = p.Season,
- Competition = p.Competition,
- LocalGoals = p.LocalGoals,
- VisitorGoals = p.VisitorGoals,
- MatchDate = p.MatchDate,
- Preview = p.File.Preview,
- VideoCodec = p.File.VideoCodec,
- AudioCodec = p.File.AudioCodec,
- Length = new Time((int)(p.File.Length/1000)),
- Format = String.Format("{0}x{1} {2}fps",
- p.File.VideoWidth, p.File.VideoHeight, p.File.Fps),
- };
- list.Add(pd);
+ list.Add(desc);
}catch{
Console.WriteLine("Error retreiving project. Skip");
}
@@ -209,7 +209,7 @@ namespace LongoMatch.DB
IObjectContainer db = Db4oFactory.OpenFile(file);
try
{
- if (!this.Exists(project.File.FilePath,db)) {
+ if (!Exists(project.Description.File.FilePath,db)) {
db.Store(project);
db.Commit();
}
@@ -267,7 +267,7 @@ namespace LongoMatch.DB
IObjectContainer db = Db4oFactory.OpenFile(file);
try {
// We look for a project with the same filename
- if (!Exists(project.File.FilePath,db)) {
+ if (!Exists(project.Description.File.FilePath,db)) {
IQuery query = db.Query();
query.Constrain(typeof(Project));
query.Descend("file").Descend("filePath").Constrain(previousFileName);
@@ -307,7 +307,7 @@ namespace LongoMatch.DB
try {
IQuery query = db.Query();
query.Constrain(typeof(Project));
- query.Descend("file").Descend("filePath").Constrain(project.File.FilePath);
+ query.Descend("file").Descend("filePath").Constrain(project.Description.File.FilePath);
IObjectSet result = query.Execute();
//Get the stored project and replace it with the new one
Project fd = (Project)result.Next();
@@ -334,7 +334,7 @@ namespace LongoMatch.DB
public bool Exists(Project project){
IObjectContainer db = Db4oFactory.OpenFile(file);
try{
- return Exists(project.File.FilePath, db);
+ return Exists(project.Description.File.FilePath, db);
}catch{
return false;
}finally{
@@ -349,7 +349,7 @@ namespace LongoMatch.DB
private void SetDeleteCascadeOptions() {
Db4oFactory.Configure().ObjectClass(typeof(Project)).CascadeOnDelete(true);
- Db4oFactory.Configure().ObjectClass(typeof(Sections)).CascadeOnDelete(true);
+ Db4oFactory.Configure().ObjectClass(typeof(Categories)).CascadeOnDelete(true);
Db4oFactory.Configure().ObjectClass(typeof(TimeNode)).CascadeOnDelete(true);
Db4oFactory.Configure().ObjectClass(typeof(Time)).CascadeOnDelete(true);
Db4oFactory.Configure().ObjectClass(typeof(Team)).CascadeOnDelete(true);
@@ -361,7 +361,7 @@ namespace LongoMatch.DB
private void SetUpdateCascadeOptions() {
Db4oFactory.Configure().ObjectClass(typeof(Project)).CascadeOnUpdate(true);
- Db4oFactory.Configure().ObjectClass(typeof(Sections)).CascadeOnUpdate(true);
+ Db4oFactory.Configure().ObjectClass(typeof(Categories)).CascadeOnUpdate(true);
Db4oFactory.Configure().ObjectClass(typeof(TimeNode)).CascadeOnUpdate(true);
Db4oFactory.Configure().ObjectClass(typeof(Time)).CascadeOnUpdate(true);
Db4oFactory.Configure().ObjectClass(typeof(Team)).CascadeOnUpdate(true);
diff --git a/LongoMatch/DB/Project.cs b/LongoMatch/DB/Project.cs
index c65601e..2a66762 100644
--- a/LongoMatch/DB/Project.cs
+++ b/LongoMatch/DB/Project.cs
@@ -19,6 +19,7 @@
//
using System;
+using System.Linq;
using System.IO;
using System.Collections;
using System.Collections.Generic;
@@ -27,6 +28,7 @@ using System.Runtime.Serialization.Formatters.Binary;
using Gtk;
using Gdk;
using Mono.Unix;
+using LongoMatch.Common;
using LongoMatch.TimeNodes;
using LongoMatch.Video.Utils;
@@ -48,261 +50,50 @@ namespace LongoMatch.DB
public class Project : IComparable
{
- private PreviewMediaFile file;
- private string title;
+ private List<Play> playsList;
- private string localName;
- private string visitorName;
-
- private int localGoals;
-
- private int visitorGoals;
-
- private DateTime matchDate;
-
- private string season;
-
- private string competition;
-
- private Sections sections;
-
- private List<List<MediaTimeNode>> sectionPlaysList;
-
- private TeamTemplate visitorTeamTemplate;
-
- private TeamTemplate localTeamTemplate;
-
- private TagsTemplate tagsTemplate;
- //Keep this fiel for DB retrocompatibility
-#pragma warning disable 0169
- private List<MediaTimeNode>[] dataSectionArray;
-#pragma warning restore 0169
-
- /// <summary>
- /// Creates a new project
- /// </summary>
- /// <param name="file">
- /// A <see cref="PreviewMediaFile"/>: video file information
- /// </param>
- /// <param name="localName">
- /// A <see cref="System.String"/>: local team's name
- /// </param>
- /// <param name="visitorName">
- /// A <see cref="System.String"/>: visitor team's name
- /// </param>
- /// <param name="season">
- /// A <see cref="System.String"/>: season information
- /// </param>
- /// <param name="competition">
- /// A <see cref="System.String"/>: competition information
- /// </param>
- /// <param name="localGoals">
- /// A <see cref="System.Int32"/>: local team's goals
- /// </param>
- /// <param name="visitorGoals">
- /// A <see cref="System.Int32"/>: visitor team's goals
- /// </param>
- /// <param name="matchDate">
- /// A <see cref="DateTime"/>: game date
- /// </param>
- /// <param name="sections">
- /// A <see cref="Sections"/>: categories template
- /// </param>
- /// <param name="localTeamTemplate">
- /// A <see cref="TeamTemplate"/>: local team template
- /// </param>
- /// <param name="visitorTeamTemplate">
- /// A <see cref="TeamTemplate"/>: visitor team template
- /// </param>
#region Constructors
- public Project(PreviewMediaFile file, String localName, String visitorName,
- String season, String competition, int localGoals,
- int visitorGoals, DateTime matchDate, Sections sections,
- TeamTemplate localTeamTemplate, TeamTemplate visitorTeamTemplate) {
-
- this.file = file;
- this.localName = localName;
- this.visitorName = visitorName;
- this.localGoals = localGoals;
- this.visitorGoals = visitorGoals;
- this.matchDate = matchDate;
- this.season = season;
- this.competition = competition;
- this.localTeamTemplate = localTeamTemplate;
- this.visitorTeamTemplate = visitorTeamTemplate;
- this.sections = sections;
- this.sectionPlaysList = new List<List<MediaTimeNode>>();
-
- for (int i=0;i<sections.Count;i++) {
- sectionPlaysList.Add(new List<MediaTimeNode>());
- }
-
- this.tagsTemplate = new TagsTemplate();
- this.Title = file == null ? "" : System.IO.Path.GetFileNameWithoutExtension(this.file.FilePath);
+ public Project(){
+ playsList = new List<Play>();
+ Categories = new Categories();
+ LocalTeamTemplate = new TeamTemplate();
+ VisitorTeamTemplate = new TeamTemplate();
}
#endregion
#region Properties
- /// <value>
- /// Video File
- /// </value>
- public PreviewMediaFile File {
- get {
- return file;
- }
- set {
- file=value;
- }
- }
-
- /// <value>
- /// Project title
- /// </value>
- public String Title {
- get {
- return title;
- }
- set {
- title=value;
- }
- }
-
- /// <value>
- /// Season description
- /// </value>
- public String Season {
- get {
- return season;
- }
- set {
- season = value;
- }
- }
-
- /// <value>
- /// Competition description
- /// </value>
- public String Competition {
- get {
- return competition;
- }
- set {
- competition= value;
- }
- }
-
- /// <value>
- /// Local team name
- /// </value>
- public String LocalName {
- get {
- return localName;
- }
- set {
- localName=value;
- }
- }
-
- /// <value>
- /// Visitor team name
- /// </value>
- public String VisitorName {
- get {
- return visitorName;
- }
- set {
- visitorName=value;
- }
- }
-
- /// <value>
- /// Local team goals
- /// </value>
- public int LocalGoals {
- get {
- return localGoals;
- }
- set {
- localGoals=value;
- }
- }
-
- /// <value>
- /// Visitor team goals
- /// </value>
- public int VisitorGoals {
- get {
- return visitorGoals;
- }
- set {
- visitorGoals=value;
- }
- }
-
- /// <value>
- /// Game date
- /// </value>
- public DateTime MatchDate {
- get {
- return matchDate;
- }
- set {
- matchDate=value;
- }
+
+ public ProjectDescription Description {
+ get;
+ set;
}
/// <value>
/// Categories template
/// </value>
- public Sections Sections {
- get {
- return this.sections;
- }
- set {
- this.sections = value;
- }
+ public Categories Categories {
+ get;
+ set;
}
/// <value>
/// Local team template
/// </value>
public TeamTemplate LocalTeamTemplate {
- get {
- return localTeamTemplate;
- }
- set {
- localTeamTemplate=value;
- }
+ get;
+ set;
}
/// <value>
/// Visitor team template
/// </value>
public TeamTemplate VisitorTeamTemplate {
- get {
- return visitorTeamTemplate;
- }
- set {
- visitorTeamTemplate=value;
- }
+ get;
+ set;
}
- /// <value>
- /// Template with the project tags
- /// </value>
- public TagsTemplate Tags{
- //Since 0.15.5
- get{
- if (tagsTemplate == null)
- tagsTemplate = new TagsTemplate();
- return tagsTemplate;
- }
- set{
- tagsTemplate = value;
- }
- }
#endregion
#region Public Methods
@@ -310,42 +101,12 @@ namespace LongoMatch.DB
/// Frees all the project's resources helping the GC
/// </summary>
public void Clear() {
- //Help the GC freeing objects
- foreach (List<MediaTimeNode> list in sectionPlaysList)
- list.Clear();
- sectionPlaysList.Clear();
- Sections.Clear();
- visitorTeamTemplate.Clear();
- localTeamTemplate.Clear();
- sectionPlaysList=null;
- Sections=null;
- visitorTeamTemplate=null;
- localTeamTemplate=null;
+ playsList.Clear();
+ Categories.Clear();
+ VisitorTeamTemplate.Clear();
+ LocalTeamTemplate.Clear();
}
- /// <summary>
- /// Adds a new analysis category to the project
- /// </summary>
- /// <param name="tn">
- /// A <see cref="SectionsTimeNode"/>
- /// </param>
- public void AddSection(SectionsTimeNode tn) {
- AddSectionAtPos(tn,sections.Count);
- }
-
- /// <summary>
- /// Add a new category to the project at a given position
- /// </summary>
- /// <param name="tn">
- /// A <see cref="SectionsTimeNode"/>: category default values
- /// </param>
- /// <param name="sectionIndex">
- /// A <see cref="System.Int32"/>: position index
- /// </param>
- public void AddSectionAtPos(SectionsTimeNode tn,int sectionIndex) {
- sectionPlaysList.Insert(sectionIndex,new List<MediaTimeNode>());
- sections.AddSectionAtPos(tn,sectionIndex);
- }
/// <summary>
/// Adds a new play to a given category
@@ -365,17 +126,24 @@ namespace LongoMatch.DB
/// <returns>
/// A <see cref="MediaTimeNode"/>: created play
/// </returns>
- public MediaTimeNode AddTimeNode(int dataSection, Time start, Time stop,Pixbuf thumbnail) {
- MediaTimeNode tn ;
- List<MediaTimeNode> playsList= sectionPlaysList[dataSection];
+ public Play AddPlay(Category category, Time start, Time stop,Pixbuf miniature) {
string count= String.Format("{0:000}",playsList.Count+1);
- string name = sections.GetName(dataSection) + " " + count;
+ string name = String.Format("{0} \" \" {1}",category.Name, count);
// HACK: Used for capture where fps is not specified, asuming PAL 25fps
- ushort fps = file != null ? file.Fps : (ushort)25;
-
- tn = new MediaTimeNode(name, start, stop,"",fps,thumbnail);
- playsList.Add(tn);
- return tn;
+ ushort fps = Description.File != null ? Description.File.Fps : (ushort)25;
+
+ var play = new Play {
+ Name = name,
+ Start = start,
+ Stop = stop,
+ Category = category,
+ Team = Team.NONE,
+ Notes = "",
+ Miniature = miniature,
+ Fps = fps,
+ };
+ playsList.Add(play);
+ return play;
}
/// <summary>
@@ -387,8 +155,8 @@ namespace LongoMatch.DB
/// <param name="section">
/// A <see cref="System.Int32"/>: category the play belongs to
/// </param>
- public void DeleteTimeNode(MediaTimeNode tNode,int section) {
- sectionPlaysList[section].Remove(tNode);
+ public void RemovePlay(Play play) {
+ playsList.Remove(play);
}
/// <summary>
@@ -397,43 +165,19 @@ namespace LongoMatch.DB
/// <param name="sectionIndex">
/// A <see cref="System.Int32"/>: category index
/// </param>
- public void DeleteSection(int sectionIndex) {
- if (sections.Count == 1)
+ public void RemoveCategory(Category category) {
+ if (Categories.Count == 1)
throw new Exception("You can't remove the last Section");
- sections.RemoveSection(sectionIndex);
- sectionPlaysList.RemoveAt(sectionIndex);
- }
-
- /// <summary>
- /// Return an array of strings with the categories names
- /// </summary>
- /// <returns>
- /// A <see cref="System.String"/>
- /// </returns>
- public string[] GetSectionsNames() {
- return sections.GetSectionsNames();
- }
-
- /// <summary>
- /// Return an array of <see cref="LongoMatch.TimeNodes.Time"/> with
- /// the categories default lead time
- /// </summary>
- /// <returns>
- /// A <see cref="Time"/>
- /// </returns>
- public Time[] GetSectionsStartTimes() {
- return sections.GetSectionsStartTimes();
- }
-
- /// <summary>
- /// Return an array of <see cref="LongoMatch.TimeNodes.Time"/> with
- /// the categories default lag time
- /// </summary>
- /// <returns>
- /// A <see cref="Time"/>
- /// </returns>
- public Time[] GetSectionsStopTimes() {
- return sections.GetSectionsStopTimes();
+ Categories.RemoveCategory(category);
+
+ /* query for all the plays with this Category */
+ var plays =
+ from play in playsList
+ where play.Category == category
+ select play;
+ /* Delete them */
+ foreach (var play in playsList)
+ playsList.Remove(play);
}
/// <summary>
@@ -444,11 +188,15 @@ namespace LongoMatch.DB
/// A <see cref="TreeStore"/>
/// </returns>
public TreeStore GetModel() {
- Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof(MediaTimeNode));
- for (int i=0;i<sections.Count;i++) {
- Gtk.TreeIter iter = dataFileListStore.AppendValues(sections.GetTimeNode(i));
- foreach (MediaTimeNode tNode in sectionPlaysList[i]) {
- dataFileListStore.AppendValues(iter,tNode);
+ Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof(Play));
+ IEnumerable<IGrouping<Category, Play>> queryPlaysByCategory =
+ from play in playsList
+ group play by play.Category;
+
+ foreach (var playsGroup in queryPlaysByCategory) {
+ Gtk.TreeIter iter = dataFileListStore.AppendValues(playsGroup.Key);
+ foreach (Play play in playsGroup) {
+ dataFileListStore.AppendValues(iter,play);
}
}
return dataFileListStore;
@@ -462,18 +210,7 @@ namespace LongoMatch.DB
/// A <see cref="TreeStore"/>
/// </returns>
public TreeStore GetLocalTeamModel() {
- List<TreeIter> itersList = new List<TreeIter>();
- Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof(object));
- for (int i=0;i<localTeamTemplate.PlayersCount;i++) {
- itersList.Add(dataFileListStore.AppendValues(localTeamTemplate.GetPlayer(i)));
- }
- for (int i=0;i<sections.Count;i++) {
- foreach (MediaTimeNode tNode in sectionPlaysList[i]) {
- foreach (int player in tNode.LocalPlayers)
- dataFileListStore.AppendValues(itersList[player],tNode);
- }
- }
- return dataFileListStore;
+ return GetTeamModel(LocalTeamTemplate);
}
/// <summary>
@@ -484,41 +221,20 @@ namespace LongoMatch.DB
/// A <see cref="TreeStore"/>
/// </returns>
public TreeStore GetVisitorTeamModel() {
- List<TreeIter> itersList = new List<TreeIter>();
- Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof(object));
- for (int i=0;i<visitorTeamTemplate.PlayersCount;i++) {
- itersList.Add(dataFileListStore.AppendValues(visitorTeamTemplate.GetPlayer(i)));
- }
- for (int i=0;i<sections.Count;i++) {
- foreach (MediaTimeNode tNode in sectionPlaysList[i]) {
- foreach (int player in tNode.VisitorPlayers)
- dataFileListStore.AppendValues(itersList[player],tNode);
- }
- }
- return dataFileListStore;
- }
-
- /// <summary>
- /// Returns a list of plays' lists. Actually used by the timeline
- /// </summary>
- /// <returns>
- /// A <see cref="List"/>
- /// </returns>
- public List<List<MediaTimeNode>> GetDataArray() {
- return sectionPlaysList;
+ return GetTeamModel(VisitorTeamTemplate);
}
public bool Equals(Project project) {
if (project == null)
return false;
else
- return this.File.FilePath.Equals(project.File.FilePath);
+ return Description.File.FilePath.Equals(project.Description.File.FilePath);
}
public int CompareTo(object obj) {
if (obj is Project) {
Project project = (Project) obj;
- return this.File.FilePath.CompareTo(project.File.FilePath);
+ return Description.File.FilePath.CompareTo(project.Description.File.FilePath);
}
else
throw new ArgumentException("object is not a Project and cannot be compared");
@@ -527,23 +243,47 @@ namespace LongoMatch.DB
public static void Export(Project project, string file) {
file = Path.ChangeExtension(file,"lpr");
IFormatter formatter = new BinaryFormatter();
- using(Stream stream = new FileStream(file, FileMode.Create, FileAccess.Write, FileShare.None)){
- formatter.Serialize(stream, project);
- }
+ using(Stream stream = new FileStream(file, FileMode.Create,
+ FileAccess.Write, FileShare.None))
+ formatter.Serialize(stream, project);
}
public static Project Import(string file) {
- using(Stream stream = new FileStream(file, FileMode.Open, FileAccess.Read, FileShare.None))
+ using(Stream stream = new FileStream(file, FileMode.Open,
+ FileAccess.Read, FileShare.None))
{
try {
IFormatter formatter = new BinaryFormatter();
return (Project)formatter.Deserialize(stream);
}
catch {
- throw new Exception(Catalog.GetString("The file you are trying to load is not a valid project"));
+ throw new Exception(Catalog.GetString("The file you are trying to load " +
+ "is not a valid project"));
}
}
}
#endregion
+
+ #region Private Methods
+
+ private TreeStore GetTeamModel(TeamTemplate team){
+ var dataFileListStore = new Gtk.TreeStore(typeof(object));
+
+ /* For all the players in the team */
+ foreach (var player in team.PlayersList){
+ /* Add a root in the tree with the player */
+ var iter = dataFileListStore.AppendValues(player);
+ /* Query the plays where this player is in the list of players*/
+ var queryByPlayers =
+ from play in playsList
+ where play.HasPlayer(player) == true
+ select play;
+ /* Then add as children of the Player in the tree */
+ foreach (var play in queryByPlayers)
+ dataFileListStore.AppendValues(iter, play);
+ }
+ return dataFileListStore;
+ }
+ #endregion
}
}
diff --git a/LongoMatch/DB/ProjectDescription.cs b/LongoMatch/DB/ProjectDescription.cs
index 19a5cdf..725287f 100644
--- a/LongoMatch/DB/ProjectDescription.cs
+++ b/LongoMatch/DB/ProjectDescription.cs
@@ -19,6 +19,7 @@
using System;
using Gdk;
using LongoMatch.TimeNodes;
+using LongoMatch.Video.Utils;
namespace LongoMatch.DB
{
@@ -36,7 +37,7 @@ namespace LongoMatch.DB
}
}
- public String File {
+ public PreviewMediaFile File {
get;
set;
}
@@ -98,8 +99,10 @@ namespace LongoMatch.DB
}
public String Format {
- get;
- set;
+ get{
+ String.Format("{0}x{1} {2}fps",
+ File.VideoWidth, File.VideoHeight, File.Fps);
+ }
}
public int CompareTo(object obj) {
diff --git a/LongoMatch/DB/Sections.cs b/LongoMatch/DB/Sections.cs
index 5a29b16..31d371d 100644
--- a/LongoMatch/DB/Sections.cs
+++ b/LongoMatch/DB/Sections.cs
@@ -19,6 +19,7 @@
//
using System;
using System.Collections.Generic;
+using System.Linq;
using Gdk;
using LongoMatch.TimeNodes;
@@ -34,52 +35,34 @@ namespace LongoMatch.DB
/// The <see cref="LongoMatch.DB.Project"/> must handle all the changes
/// </summary>
[Serializable]
- public class Sections
+ public class Categories
{
- private List<SectionsTimeNode> sectionsList;
+ private List<Category> categoriesList;
- //These fields are not used but must be kept for DataBase compatiblity
-#pragma warning disable 0169
- private Color[] colorsArray;
- private SectionsTimeNode[] timeNodesArray;
-#pragma warning restore 0169
/// <summary>
/// Creates a new template
/// </summary>
- public Sections()
+ public Categories()
{
- this.sectionsList = new List<SectionsTimeNode>();
+ categoriesList = new List<Category>();
}
/// <summary>
/// Clear the template
/// </summary>
public void Clear() {
- sectionsList.Clear();
+ categoriesList.Clear();
}
/// <summary>
/// Adds a new analysis category to the template
/// </summary>
/// <param name="tn">
- /// A <see cref="SectionsTimeNode"/>: category to add
+ /// A <see cref="Category"/>: category to add
/// </param>
- public void AddSection(SectionsTimeNode tn) {
- sectionsList.Add(tn);
- }
-
- /// <summary>
- /// Adds a new category to the template at a given position
- /// </summary>
- /// <param name="tn">
- /// A <see cref="SectionsTimeNode"/>: category to add
- /// </param>
- /// <param name="index">
- /// A <see cref="System.Int32"/>: position
- /// </param>
- public void AddSectionAtPos(SectionsTimeNode tn, int index) {
- sectionsList.Insert(index,tn);
+ public void AddCategory(Category category) {
+ categoriesList.Add(category);
}
/// <summary>
@@ -88,8 +71,8 @@ namespace LongoMatch.DB
/// <param name="index">
/// A <see cref="System.Int32"/>: position of the category to delete
/// </param>
- public void RemoveSection(int index) {
- sectionsList.RemoveAt(index);
+ public void RemoveCategory(Category category) {
+ categoriesList.Remove(category);
}
//// <value>
@@ -97,20 +80,20 @@ namespace LongoMatch.DB
/// </value>
public int Count {
get {
- return sectionsList.Count;
+ return categoriesList.Count;
}
}
//// <value>
/// Ordered list with all the categories
/// </value>
- public List<SectionsTimeNode> SectionsTimeNodes {
+ public List<Category> CategoriesList {
set {
- sectionsList.Clear();
- sectionsList = value;
+ categoriesList.Clear();
+ categoriesList = value;
}
get {
- return sectionsList;
+ return categoriesList;
}
}
@@ -123,8 +106,8 @@ namespace LongoMatch.DB
/// <returns>
/// A <see cref="SectionsTimeNode"/>: category retrieved
/// </returns>
- public SectionsTimeNode GetSection(int section) {
- return sectionsList[section];
+ public Category GetCategoryAtPos(int pos) {
+ return categoriesList[pos];
}
/// <summary>
@@ -133,15 +116,10 @@ namespace LongoMatch.DB
/// <returns>
/// A <see cref="System.String"/>
/// </returns>
- public string[] GetSectionsNames() {
- int count = sectionsList.Count;
- string[] names = new string[count];
- SectionsTimeNode tNode;
- for (int i=0; i<count; i++) {
- tNode = sectionsList[i];
- names[i]=tNode.Name;
- }
- return names;
+ public List<string> GetSectionsNames() {
+ return (from c in categoriesList
+ orderby c.Position
+ select c.Name).ToList();
}
/// <summary>
@@ -150,15 +128,10 @@ namespace LongoMatch.DB
/// <returns>
/// A <see cref="Color"/>
/// </returns>
- public Color[] GetColors() {
- int count = sectionsList.Count;
- Color[] colors = new Color[count];
- SectionsTimeNode tNode;
- for (int i=0; i<count; i++) {
- tNode = sectionsList[i];
- colors[i]=tNode.Color;
- }
- return colors;
+ public List<Color> GetColors() {
+ return (from c in categoriesList
+ orderby c.Position
+ select c.Color).ToList();
}
/// <summary>
@@ -167,15 +140,10 @@ namespace LongoMatch.DB
/// <returns>
/// A <see cref="HotKey"/>
/// </returns>
- public HotKey[] GetHotKeys() {
- int count = sectionsList.Count;
- HotKey[] hotkeys = new HotKey[count];
- SectionsTimeNode tNode;
- for (int i=0; i<count; i++) {
- tNode = sectionsList[i];
- hotkeys[i]=tNode.HotKey;
- }
- return hotkeys;
+ public List<HotKey> GetHotKeys() {
+ return (from c in categoriesList
+ orderby c.Position
+ select c.HotKey).ToList();
}
/// <summary>
@@ -184,15 +152,10 @@ namespace LongoMatch.DB
/// <returns>
/// A <see cref="Time"/>
/// </returns>
- public Time[] GetSectionsStartTimes() {
- int count = sectionsList.Count;
- Time[] startTimes = new Time[count];
- SectionsTimeNode tNode;
- for (int i=0; i<count; i++) {
- tNode = sectionsList[i];
- startTimes[i]=tNode.Start;
- }
- return startTimes;
+ public List<Time> GetSectionsStartTimes() {
+ return (from c in categoriesList
+ orderby c.Position
+ select c.Start).ToList();
}
/// <summary>
@@ -201,93 +164,10 @@ namespace LongoMatch.DB
/// <returns>
/// A <see cref="Time"/>
/// </returns>
- public Time[] GetSectionsStopTimes() {
- int count = sectionsList.Count;
- Time[] stopTimes = new Time[count];
- SectionsTimeNode tNode;
- for (int i=0; i<count; i++) {
- tNode = sectionsList[i];
- stopTimes[i]=tNode.Start;
- }
- return stopTimes;
- }
-
- /// <summary>
- /// Returns a category at a given position
- /// </summary>
- /// <param name="section">
- /// A <see cref="System.Int32"/>: position in the list
- /// </param>
- /// <returns>
- /// A <see cref="SectionsTimeNode"/>
- /// </returns>
- public SectionsTimeNode GetTimeNode(int section) {
- return sectionsList [section];
- }
-
- /// <summary>
- /// Returns the name for a category at a given position
- /// </summary>
- /// <param name="section">
- /// A <see cref="System.Int32"/>: position in the list
- /// </param>
- /// <returns>
- /// A <see cref="System.String"/>: name of the category
- /// </returns>
- public string GetName(int section) {
- return sectionsList[section].Name;
- }
-
- /// <summary>
- /// Returns the start time for a category at a given position
- /// </summary>
- /// <param name="section">
- /// A <see cref="System.Int32"/>: position in the list
- /// </param>
- /// <returns>
- /// A <see cref="Time"/>: start time
- /// </returns>
- public Time GetStartTime(int section) {
- return sectionsList[section].Start;
- }
-
- /// <summary>
- /// Returns the stop time for a category at a given position
- /// </summary>
- /// <param name="section">
- /// A <see cref="System.Int32"/>: position in the list
- /// </param>
- /// <returns>
- /// A <see cref="Time"/>: stop time
- /// </returns>
- public Time GetStopTime(int section) {
- return sectionsList[section].Stop;
- }
-
- /// <summary>
- /// Return the color for a category at a given position
- /// </summary>
- /// <param name="section">
- /// A <see cref="System.Int32"/>: position in the list
- /// </param>
- /// <returns>
- /// A <see cref="Color"/>: color
- /// </returns>
- public Color GetColor(int section) {
- return sectionsList[section].Color;
- }
-
- /// <summary>
- /// Returns the hotckey for a category at a given position
- /// </summary>
- /// <param name="section">
- /// A <see cref="System.Int32"/>: position in the list
- /// </param>
- /// <returns>
- /// A <see cref="HotKey"/>: hotkey for this category
- /// </returns>
- public HotKey GetHotKey(int section) {
- return sectionsList[section].HotKey;
+ public List<Time> GetSectionsStopTimes() {
+ return (from c in categoriesList
+ orderby c.Position
+ select c.Stop).ToList();
}
}
}
diff --git a/LongoMatch/DB/TeamTemplate.cs b/LongoMatch/DB/TeamTemplate.cs
index aac6397..67c4842 100644
--- a/LongoMatch/DB/TeamTemplate.cs
+++ b/LongoMatch/DB/TeamTemplate.cs
@@ -22,6 +22,7 @@ using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using LongoMatch.TimeNodes;
+using LongoMatch.Common;
namespace LongoMatch.DB
{
@@ -34,6 +35,16 @@ namespace LongoMatch.DB
public TeamTemplate() {
playersList = new List<Player>();
}
+
+ public Team TeamName{
+ get;
+ set;
+ }
+
+ public List<Player> PlayersList{
+ set;
+ get;
+ }
public void Clear() {
playersList.Clear();
@@ -45,31 +56,10 @@ namespace LongoMatch.DB
}
}
- public void CreateDefaultTemplate(int playersCount) {
- for (int i=0; i<playersCount;i++) {
- playersList.Add(new Player("Player "+i, new DateTime(),0,0,"",i,null));
- }
- }
-
public void AddPlayer(Player player) {
playersList.Add(player);
}
- public void SetPlayersList(List<Player> playersList) {
- this.playersList = playersList;
- }
-
- public Player GetPlayer(int index) {
- if (index >= PlayersCount)
- throw new Exception(String.Format("The actual team template doesn't have so many players. Requesting player {0} but players count is {1}",
- index, PlayersCount));
- return playersList[index];
- }
-
- public List<Player> GetPlayersList() {
- return playersList;
- }
-
public void Save(string filepath) {
IFormatter formatter = new BinaryFormatter();
Stream stream = new FileStream(filepath, FileMode.Create, FileAccess.Write, FileShare.None);
@@ -90,5 +80,20 @@ namespace LongoMatch.DB
defaultTemplate.CreateDefaultTemplate(playersCount);
return defaultTemplate;
}
+
+ private void CreateDefaultTemplate(int playersCount) {
+ for (int i=0; i<playersCount;i++) {
+ playersList.Add(new Player{
+ Name = "Player " + i,
+ Birthday = new DateTime(),
+ Height = 1.80,
+ Weight = 80,
+ Number = 0,
+ Position = "",
+ Photo = null,
+ Playing = true,
+ });
+ }
+ }
}
}
diff --git a/LongoMatch/Gui/Component/ButtonsWidget.cs b/LongoMatch/Gui/Component/ButtonsWidget.cs
index 57682e3..df9bab6 100644
--- a/LongoMatch/Gui/Component/ButtonsWidget.cs
+++ b/LongoMatch/Gui/Component/ButtonsWidget.cs
@@ -33,7 +33,7 @@ namespace LongoMatch.Gui.Component
public partial class ButtonsWidget : Gtk.Bin
{
- private Sections sections;
+ private Categories categories;
private TagMode tagMode;
public event NewMarkEventHandler NewMarkEvent;
@@ -57,13 +57,13 @@ namespace LongoMatch.Gui.Component
}
}
- public Sections Sections {
+ public Categories Categories {
set {
foreach (Widget w in table1.AllChildren) {
table1.Remove(w);
w.Destroy();
}
- sections = value;
+ Categories = value;
if (value == null)
return;
@@ -100,7 +100,7 @@ namespace LongoMatch.Gui.Component
protected virtual void OnButtonClicked(object sender, System.EventArgs e)
{
- if (sections == null)
+ if (categories == null)
return;
Widget w = (Button)sender;
if (tagMode == TagMode.Predifined){
@@ -117,7 +117,7 @@ namespace LongoMatch.Gui.Component
protected virtual void OnStartTagClicked (object sender, System.EventArgs e)
{
- if (sections == null)
+ if (categories == null)
return;
starttagbutton.Visible = false;
diff --git a/LongoMatch/Gui/Component/CategoryProperties.cs b/LongoMatch/Gui/Component/CategoryProperties.cs
index 41354e3..33d3c1b 100644
--- a/LongoMatch/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch/Gui/Component/CategoryProperties.cs
@@ -28,7 +28,7 @@ using LongoMatch.Gui.Dialog;
namespace LongoMatch.Gui.Component
{
- public delegate void HotKeyChangeHandler(HotKey prevHotKey, SectionsTimeNode newSection);
+ public delegate void HotKeyChangeHandler(HotKey prevHotKey, Category newSection);
[System.ComponentModel.Category("LongoMatch")]
[System.ComponentModel.ToolboxItem(true)]
@@ -37,14 +37,14 @@ namespace LongoMatch.Gui.Component
public event HotKeyChangeHandler HotKeyChanged;
- private SectionsTimeNode stn;
+ private Category stn;
public CategoryProperties()
{
this.Build();
}
- public SectionsTimeNode Section
+ public Category Section
{
set {
stn = value;
diff --git a/LongoMatch/Gui/Component/NotesWidget.cs b/LongoMatch/Gui/Component/NotesWidget.cs
index 459d336..e4fdbca 100644
--- a/LongoMatch/Gui/Component/NotesWidget.cs
+++ b/LongoMatch/Gui/Component/NotesWidget.cs
@@ -32,7 +32,7 @@ namespace LongoMatch.Gui.Component
{
public event TimeNodeChangedHandler TimeNodeChanged;
TextBuffer buf;
- MediaTimeNode play;
+ Play play;
public NotesWidget()
{
@@ -42,7 +42,7 @@ namespace LongoMatch.Gui.Component
}
- public MediaTimeNode Play {
+ public Play Play {
set {
play = value;
Notes = play.Notes;
diff --git a/LongoMatch/Gui/Component/PlayListWidget.cs b/LongoMatch/Gui/Component/PlayListWidget.cs
index 43d41ad..1198633 100644
--- a/LongoMatch/Gui/Component/PlayListWidget.cs
+++ b/LongoMatch/Gui/Component/PlayListWidget.cs
@@ -47,7 +47,7 @@ namespace LongoMatch.Gui.Component
public event ProgressHandler Progress;
private PlayerBin player;
- private PlayListTimeNode plNode;
+ private PlayListPlay plNode;
private PlayList playList;
private uint timeout;
private object lock_node;
@@ -96,14 +96,14 @@ namespace LongoMatch.Gui.Component
}
}
- public void Add(PlayListTimeNode plNode) {
+ public void Add(PlayListPlay plNode) {
if (playList!=null) {
Model.AppendValues(plNode);
playList.Add(plNode);
}
}
- public PlayListTimeNode Next() {
+ public PlayListPlay Next() {
if (playList.HasNext()) {
plNode = playList.Next();
playlisttreeview1.Selection.SelectPath(new TreePath(playList.GetCurrentIndex().ToString()));
@@ -174,7 +174,7 @@ namespace LongoMatch.Gui.Component
return true;
}
}
- private PlayListTimeNode SelectPlayListNode(TreePath path) {
+ private PlayListPlay SelectPlayListNode(TreePath path) {
plNode = playList.Select(Int32.Parse(path.ToString()));
if (PlayListNodeSelected != null && plNode.Valid) {
@@ -269,7 +269,7 @@ namespace LongoMatch.Gui.Component
//FIXME:Create a new instance of the video editor until we fix the audio swith enable/disabled
LoadEditor();
//videoEditor.ClearList();
- foreach (PlayListTimeNode segment in playList) {
+ foreach (PlayListPlay segment in playList) {
if (segment.Valid)
videoEditor.AddSegment(segment.MediaFile.FilePath,
segment.Start.MSeconds,
@@ -316,7 +316,7 @@ namespace LongoMatch.Gui.Component
}
}
- protected virtual void OnApplyRate(PlayListTimeNode plNode) {
+ protected virtual void OnApplyRate(PlayListPlay plNode) {
if (ApplyCurrentRate != null)
ApplyCurrentRate(plNode);
}
diff --git a/LongoMatch/Gui/Component/PlayersListTreeWidget.cs b/LongoMatch/Gui/Component/PlayersListTreeWidget.cs
index d535e82..11040e0 100644
--- a/LongoMatch/Gui/Component/PlayersListTreeWidget.cs
+++ b/LongoMatch/Gui/Component/PlayersListTreeWidget.cs
@@ -61,8 +61,9 @@ namespace LongoMatch.Gui.Component
}
}
- public void DeleteTimeNode(MediaTimeNode tNode, int player) {
- if (template != null) {
+ public void RemovePlay(Play tNode, Player player) {
+ /*if (template != null) {
+
TreeIter iter;
TreeStore model = (TreeStore)playerstreeview.Model;
model.GetIterFromString(out iter, player.ToString());
@@ -70,7 +71,7 @@ namespace LongoMatch.Gui.Component
model.IterChildren(out child, iter);
// Searching the TimeNode to remove it
while (model.IterIsValid(child)) {
- MediaTimeNode mtn = (MediaTimeNode) model.GetValue(child,0);
+ Play mtn = (Play) model.GetValue(child,0);
if (mtn == tNode) {
model.Remove(ref child);
break;
@@ -80,19 +81,19 @@ namespace LongoMatch.Gui.Component
if (prev.Equals(child))
break;
}
- }
+ }*/
}
- public void AddTimeNode(MediaTimeNode tNode,int playerindex) {
- if (template != null) {
+ public void AddPlay(Play play, Player player) {
+ /*if (template != null) {
TreeIter iter;
TreeStore model = (TreeStore)playerstreeview.Model;
model.GetIterFromString(out iter, playerindex.ToString());
Player player = (Player)model.GetValue(iter,0);
if (template.GetPlayer(playerindex) == player)
model.AppendValues(iter,tNode);
- }
+ }*/
}
public void SetTeam(TeamTemplate template, TreeStore model) {
@@ -115,24 +116,24 @@ namespace LongoMatch.Gui.Component
template = null;
}
- protected virtual void OnTimeNodeSelected(MediaTimeNode tNode) {
+ protected virtual void OnTimeNodeSelected(Play tNode) {
if (TimeNodeSelected != null)
TimeNodeSelected(tNode);
}
- protected virtual void OnSnapshotSeriesEvent(LongoMatch.TimeNodes.MediaTimeNode tNode)
+ protected virtual void OnSnapshotSeriesEvent(Play tNode)
{
if (SnapshotSeriesEvent != null)
SnapshotSeriesEvent(tNode);
}
- protected virtual void OnTimeNodeChanged(LongoMatch.TimeNodes.TimeNode tNode, object val)
+ protected virtual void OnTimeNodeChanged(TimeNode tNode, object val)
{
if (TimeNodeChanged != null)
TimeNodeChanged(tNode, val);
}
- protected virtual void OnPlayListNodeAdded(LongoMatch.TimeNodes.MediaTimeNode tNode)
+ protected virtual void OnPlayListNodeAdded(Play tNode)
{
if (PlayListNodeAdded != null)
PlayListNodeAdded(tNode);
diff --git a/LongoMatch/Gui/Component/PlaysListTreeWidget.cs b/LongoMatch/Gui/Component/PlaysListTreeWidget.cs
index 0912017..29999d6 100644
--- a/LongoMatch/Gui/Component/PlaysListTreeWidget.cs
+++ b/LongoMatch/Gui/Component/PlaysListTreeWidget.cs
@@ -57,16 +57,17 @@ namespace LongoMatch.Gui.Component
treeview.TagPlay += OnTagPlay;
}
- public void DeletePlay(MediaTimeNode play, int section) {
+ public void RemovePlay(Play play, Category category) {
if (project != null) {
TreeIter iter;
- TreeStore model = (TreeStore)treeview.Model;
- model.GetIterFromString(out iter, section.ToString());
TreeIter child;
+
+ var model = (TreeStore)treeview.Model;
+ model.GetIterFromString(out iter, category.Position.ToString());
model.IterChildren(out child, iter);
// Searching the TimeNode to remove it
while (model.IterIsValid(child)) {
- MediaTimeNode mtn = (MediaTimeNode) model.GetValue(child,0);
+ Play mtn = (Play) model.GetValue(child,0);
if (mtn == play) {
model.Remove(ref child);
break;
@@ -79,25 +80,20 @@ namespace LongoMatch.Gui.Component
}
}
- public void AddPlay(MediaTimeNode play,int section) {
- TreeIter sectionIter, playIter;
- TreePath playPath;
- TreeStore model;
- TimeNode stNode;
+ public void AddPlay(Play play) {
+ TreeIter categoryIter;
if (project == null)
return;
-
- model = (TreeStore)treeview.Model;
- model.GetIterFromString(out sectionIter, section.ToString());
- stNode = (TimeNode)model.GetValue(sectionIter,0);
- if (project.Sections.GetTimeNode(section) == stNode){
- playIter = model.AppendValues(sectionIter,play);
- playPath = model.GetPath(playIter);
- treeview.Selection.UnselectAll();
- treeview.ExpandToPath(playPath);
- treeview.Selection.SelectIter(playIter);
- }
+
+ var cat = play.Category;
+ var model = (TreeStore)treeview.Model;
+ model.GetIterFromString(out categoryIter, cat.Position.ToString());
+ var playIter = model.AppendValues(categoryIter,play);
+ var playPath = model.GetPath(playIter);
+ treeview.Selection.UnselectAll();
+ treeview.ExpandToPath(playPath);
+ treeview.Selection.SelectIter(playIter);
}
public bool ProjectIsLive{
@@ -133,35 +129,35 @@ namespace LongoMatch.Gui.Component
TimeNodeChanged(tNode,val);
}
- protected virtual void OnTimeNodeSelected(MediaTimeNode tNode) {
+ protected virtual void OnTimeNodeSelected(Play tNode) {
if (TimeNodeSelected != null)
TimeNodeSelected(tNode);
}
- protected virtual void OnTimeNodeDeleted(MediaTimeNode tNode, int section) {
+ protected virtual void OnTimeNodeDeleted(Play tNode, Category category){
if (TimeNodeDeleted != null)
- TimeNodeDeleted(tNode,section);
+ TimeNodeDeleted(tNode, category);
}
- protected virtual void OnPlayListNodeAdded(MediaTimeNode tNode)
+ protected virtual void OnPlayListNodeAdded(Play tNode)
{
if (PlayListNodeAdded != null)
PlayListNodeAdded(tNode);
}
- protected virtual void OnSnapshotSeriesEvent(LongoMatch.TimeNodes.MediaTimeNode tNode)
+ protected virtual void OnSnapshotSeriesEvent(LongoMatch.TimeNodes.Play tNode)
{
if (SnapshotSeriesEvent != null)
SnapshotSeriesEvent(tNode);
}
- protected virtual void OnPlayersTagged(LongoMatch.TimeNodes.MediaTimeNode tNode, Team team)
+ protected virtual void OnPlayersTagged(LongoMatch.TimeNodes.Play tNode, Team team)
{
if (PlayersTagged != null)
PlayersTagged(tNode,team);
}
- protected virtual void OnTagPlay (LongoMatch.TimeNodes.MediaTimeNode tNode)
+ protected virtual void OnTagPlay (LongoMatch.TimeNodes.Play tNode)
{
if (TagPlay != null)
TagPlay(tNode);
diff --git a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
index 0e64d4b..85e3b57 100644
--- a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
@@ -49,7 +49,7 @@ namespace LongoMatch.Gui.Component
private DateTime date;
private CalendarPopup cp;
private Win32CalendarDialog win32CP;
- private Sections actualSection;
+ private Categories actualCategory;
private TeamTemplate actualVisitorTeam;
private TeamTemplate actualLocalTeam;
private ProjectType useType;
@@ -187,7 +187,7 @@ namespace LongoMatch.Gui.Component
}
}
- public Sections Sections {
+ public Category Category {
get {
return actualSection;
}
diff --git a/LongoMatch/Gui/Component/ProjectTemplateWidget.cs b/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
index c40e652..93e240f 100644
--- a/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
@@ -1,4 +1,4 @@
-// SectionsPropertiesWidget.cs
+// CategoriesPropertiesWidget.cs
// Copyright (C) 2007-2009 Andoni Morales Alastruey
//
// This program is free software; you can redistribute it and/or modify
@@ -38,8 +38,8 @@ namespace LongoMatch.Gui.Component
{
private List<HotKey> hkList;
private Project project;
- private Sections sections;
- private List<SectionsTimeNode> selectedSections;
+ private Categories sections;
+ private List<Categories> selectedCategories;
private bool edited = false;
public ProjectTemplateWidget()
@@ -51,17 +51,17 @@ namespace LongoMatch.Gui.Component
public void SetProject(Project project) {
this.project = project;
if (project != null)
- Sections=project.Sections;
+ Categories=project.Categories;
}
- public Sections Sections {
+ public Categories Categories {
get {
return sections;
}
set {
this.sections = value;
edited = false;
- Gtk.TreeStore sectionsListStore = new Gtk.TreeStore(typeof(SectionsTimeNode));
+ Gtk.TreeStore sectionsListStore = new Gtk.TreeStore(typeof(Category));
hkList.Clear();
for (int i=0;i<sections.Count;i++) {
sectionsListStore.AppendValues(sections.GetSection(i));
@@ -90,17 +90,17 @@ namespace LongoMatch.Gui.Component
}
private void UpdateModel() {
- Sections = Sections;
+ Categories = Categories;
}
private void AddSection(int index) {
- SectionsTimeNode tn;
+ Category tn;
HotKey hkey = new HotKey();
Time start = new Time(10*Time.SECONDS_TO_TIME);
Time stop = new Time(10*Time.SECONDS_TO_TIME);
- tn = new SectionsTimeNode("New Section",start,stop,hkey,new Color(Byte.MaxValue,Byte.MinValue,Byte.MinValue));
+ tn = new Category("New Section",start,stop,hkey,new Color(Byte.MaxValue,Byte.MinValue,Byte.MinValue));
if (project != null) {
project.AddSectionAtPos(tn,index);
@@ -112,34 +112,34 @@ namespace LongoMatch.Gui.Component
edited = true;
}
- private void RemoveSelectedSections() {
+ private void RemoveSelectedCategories() {
if (project!= null) {
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 (SectionsTimeNode tNode in selectedSections)
- project.DeleteSection(sections.SectionsTimeNodes.IndexOf(tNode));
+ foreach (Category tNode in selectedCategories)
+ project.DeleteSection(sections.Categorys.IndexOf(tNode));
} catch {
MessagePopup.PopupMessage(this,MessageType.Warning,
Catalog.GetString("A template needs at least one category"));
}
}
dialog.Destroy();
- sections=project.Sections;
+ sections=project.Categories;
} else {
- foreach (SectionsTimeNode tNode in selectedSections){
+ foreach (Category tNode in selectedCategories){
if (sections.Count == 1){
MessagePopup.PopupMessage(this,MessageType.Warning,
Catalog.GetString("A template needs at least one category"));
} else
- sections.RemoveSection(sections.SectionsTimeNodes.IndexOf(tNode));
+ sections.RemoveSection(sections.Categorys.IndexOf(tNode));
}
}
UpdateModel();
edited = true;
- selectedSections = null;
+ selectedCategories = null;
ButtonsSensitive=false;
}
@@ -154,7 +154,7 @@ namespace LongoMatch.Gui.Component
private void EditSelectedSection() {
EditCategoryDialog dialog = new EditCategoryDialog();
- dialog.Section = selectedSections[0];
+ dialog.Section = selectedCategories[0];
dialog.HotKeysList = hkList;
dialog.TransientFor = (Gtk.Window) Toplevel;
dialog.Run();
@@ -163,33 +163,33 @@ namespace LongoMatch.Gui.Component
}
private void SaveTemplate(string templateName){
- SectionsWriter.UpdateTemplate(templateName+".sct", Sections);
+ CategoriesWriter.UpdateTemplate(templateName+".sct", Categories);
}
protected virtual void OnNewAfter(object sender, EventArgs args) {
- AddSection(sections.SectionsTimeNodes.IndexOf(selectedSections[0])+1);
+ AddSection(sections.Categorys.IndexOf(selectedCategories[0])+1);
}
protected virtual void OnNewBefore(object sender, EventArgs args) {
- AddSection(sections.SectionsTimeNodes.IndexOf(selectedSections[0]));
+ AddSection(sections.Categorys.IndexOf(selectedCategories[0]));
}
protected virtual void OnRemove(object sender, EventArgs args) {
- RemoveSelectedSections();
+ RemoveSelectedCategories();
}
protected virtual void OnEdit(object sender, EventArgs args) {
EditSelectedSection();
}
- protected virtual void OnSectionstreeview1SectionClicked(LongoMatch.TimeNodes.SectionsTimeNode tNode)
+ protected virtual void OnCategoriestreeview1SectionClicked(LongoMatch.TimeNodes.Category tNode)
{
EditSelectedSection();
}
- protected virtual void OnSectionstreeview1SectionsSelected (List<SectionsTimeNode> tNodesList)
+ protected virtual void OnCategoriestreeview1CategoriesSelected (List<Category> tNodesList)
{
- selectedSections = tNodesList;
+ selectedCategories = tNodesList;
if (tNodesList.Count == 0)
ButtonsSensitive = false;
else if (tNodesList.Count == 1){
@@ -205,8 +205,8 @@ namespace LongoMatch.Gui.Component
protected virtual void OnKeyPressEvent(object o, Gtk.KeyPressEventArgs args)
{
- if (args.Event.Key == Gdk.Key.Delete && selectedSections != null)
- RemoveSelectedSections();
+ if (args.Event.Key == Gdk.Key.Delete && selectedCategories != null)
+ RemoveSelectedCategories();
}
protected virtual void OnExportbuttonClicked (object sender, System.EventArgs e)
diff --git a/LongoMatch/Gui/Component/TagsTreeWidget.cs b/LongoMatch/Gui/Component/TagsTreeWidget.cs
index b8d20f1..dc2d48a 100644
--- a/LongoMatch/Gui/Component/TagsTreeWidget.cs
+++ b/LongoMatch/Gui/Component/TagsTreeWidget.cs
@@ -57,7 +57,7 @@ namespace LongoMatch.Gui.Component
{
this.Build();
filterTags = new List<Tag>();
- model = new Gtk.ListStore(typeof(MediaTimeNode));
+ model = new Gtk.ListStore(typeof(Play));
filter = new Gtk.TreeModelFilter(model, null);
filter.VisibleFunc = new Gtk.TreeModelFilterVisibleFunc(FilterTree);
treeview.Model = filter;
@@ -78,12 +78,12 @@ namespace LongoMatch.Gui.Component
filter.Refilter();
}
- public void DeletePlay(MediaTimeNode play) {
+ public void DeletePlay(Play play) {
if (project != null) {
TreeIter iter;
model.GetIterFirst(out iter);
while (model.IterIsValid(iter)) {
- MediaTimeNode mtn = (MediaTimeNode) model.GetValue(iter,0);
+ Play mtn = (Play) model.GetValue(iter,0);
if (mtn == play) {
model.Remove(ref iter);
break;
@@ -96,7 +96,7 @@ namespace LongoMatch.Gui.Component
}
}
- public void AddPlay(MediaTimeNode play) {
+ public void AddPlay(Play play) {
model.AppendValues(play);
filter.Refilter();
}
@@ -112,8 +112,8 @@ namespace LongoMatch.Gui.Component
project = value;
if (project != null) {
model.Clear();
- foreach (List<MediaTimeNode> list in project.GetDataArray()){
- foreach (MediaTimeNode tNode in list)
+ foreach (List<Play> list in project.GetDataArray()){
+ foreach (Play tNode in list)
model.AppendValues(tNode);
}
UpdateTagsList();
@@ -187,12 +187,12 @@ namespace LongoMatch.Gui.Component
private bool FilterTree(Gtk.TreeModel model, Gtk.TreeIter iter)
{
- MediaTimeNode tNode;
+ Play tNode;
if (filterTags.Count == 0)
return true;
- tNode = model.GetValue(iter, 0) as MediaTimeNode;
+ tNode = model.GetValue(iter, 0) as Play;
if (tNode == null)
return true;
@@ -217,18 +217,18 @@ namespace LongoMatch.Gui.Component
TimeNodeChanged(tNode,val);
}
- protected virtual void OnTimeNodeSelected(MediaTimeNode tNode) {
+ protected virtual void OnTimeNodeSelected(Play tNode) {
if (TimeNodeSelected != null)
TimeNodeSelected(tNode);
}
- protected virtual void OnPlayListNodeAdded(MediaTimeNode tNode)
+ protected virtual void OnPlayListNodeAdded(Play tNode)
{
if (PlayListNodeAdded != null)
PlayListNodeAdded(tNode);
}
- protected virtual void OnSnapshotSeriesEvent(LongoMatch.TimeNodes.MediaTimeNode tNode)
+ protected virtual void OnSnapshotSeriesEvent(LongoMatch.TimeNodes.Play tNode)
{
if (SnapshotSeriesEvent != null)
SnapshotSeriesEvent(tNode);
diff --git a/LongoMatch/Gui/Component/TimeAdjustWidget.cs b/LongoMatch/Gui/Component/TimeAdjustWidget.cs
index 3884714..7c7075c 100644
--- a/LongoMatch/Gui/Component/TimeAdjustWidget.cs
+++ b/LongoMatch/Gui/Component/TimeAdjustWidget.cs
@@ -38,7 +38,7 @@ namespace LongoMatch.Gui.Component
this.Build();
}
- public void SetTimeNode(SectionsTimeNode tNode) {
+ public void SetTimeNode(Category tNode) {
spinbutton1.Value=tNode.Start.Seconds;
spinbutton2.Value=tNode.Stop.Seconds;
}
diff --git a/LongoMatch/Gui/Component/TimeLineWidget.cs b/LongoMatch/Gui/Component/TimeLineWidget.cs
index fe2aeaa..f6ab96a 100644
--- a/LongoMatch/Gui/Component/TimeLineWidget.cs
+++ b/LongoMatch/Gui/Component/TimeLineWidget.cs
@@ -39,12 +39,12 @@ namespace LongoMatch.Gui.Component {
//public event PlayListNodeAddedHandler PlayListNodeAdded;
private TimeScale[] tsArray;
- private List<List<MediaTimeNode>> tnArray;
- private Sections sections;
+ private List<List<Play>> tnArray;
+ private Categories sections;
private TimeReferenceWidget tr;
private uint frames;
private uint pixelRatio;
- private MediaTimeNode selected;
+ private Play selected;
private uint currentFrame;
@@ -55,7 +55,7 @@ namespace LongoMatch.Gui.Component {
vscale1.CanFocus = false;
}
- public MediaTimeNode SelectedTimeNode {
+ public Play SelectedTimeNode {
get {
return selected;
}
@@ -136,7 +136,7 @@ namespace LongoMatch.Gui.Component {
return;
}
- sections = value.Sections;
+ sections = value.Categories;
tnArray = value.GetDataArray();
tsArray = new TimeScale[sections.Count];
@@ -178,11 +178,11 @@ namespace LongoMatch.Gui.Component {
TimeNodeChanged(tn,val);
}
- protected virtual void OnTimeNodeSelected(MediaTimeNode tn) {
+ protected virtual void OnTimeNodeSelected(Play tn) {
if (TimeNodeSelected != null)
TimeNodeSelected(tn);
}
- protected virtual void OnTimeNodeDeleted(MediaTimeNode tn, int section) {
+ protected virtual void OnTimeNodeDeleted(Play tn, int section) {
if (TimeNodeDeleted != null)
TimeNodeDeleted(tn,section);
}
diff --git a/LongoMatch/Gui/Component/TimeScale.cs b/LongoMatch/Gui/Component/TimeScale.cs
index 7d72acc..c16b1f0 100644
--- a/LongoMatch/Gui/Component/TimeScale.cs
+++ b/LongoMatch/Gui/Component/TimeScale.cs
@@ -46,12 +46,12 @@ namespace LongoMatch.Gui.Component
private int section;
private Cairo.Color color;
- private List<MediaTimeNode> list;
+ private List<Play> list;
- private MediaTimeNode candidateTN;
+ private Play candidateTN;
private bool candidateStart;
private bool movingLimit;
- private MediaTimeNode selected=null;
+ private Play selected=null;
private uint lastTime=0;
private uint currentFrame;
@@ -60,7 +60,7 @@ namespace LongoMatch.Gui.Component
private Menu menu;
private MenuItem delete;
private int cursorFrame;
- private Dictionary<MenuItem,MediaTimeNode> dic;
+ private Dictionary<MenuItem,Play> dic;
private Pango.Layout layout;
@@ -70,7 +70,7 @@ namespace LongoMatch.Gui.Component
public event TimeNodeDeletedHandler TimeNodeDeleted;
- public TimeScale(int section,List<MediaTimeNode> list, uint frames,Gdk.Color color)
+ public TimeScale(int section,List<Play> list, uint frames,Gdk.Color color)
{
this.section = section;
this.frames = frames;
@@ -81,7 +81,7 @@ namespace LongoMatch.Gui.Component
this.color.A = ALPHA;
Events = EventMask.PointerMotionMask | EventMask.ButtonPressMask | EventMask.ButtonReleaseMask ;
- dic = new Dictionary<MenuItem,MediaTimeNode>();
+ dic = new Dictionary<MenuItem,Play>();
layout = new Pango.Layout(PangoContext);
layout.Wrap = Pango.WrapMode.Char;
@@ -112,7 +112,7 @@ namespace LongoMatch.Gui.Component
}
}
- public MediaTimeNode SelectedTimeNode {
+ public Play SelectedTimeNode {
get {
return selected;
}
@@ -154,16 +154,16 @@ namespace LongoMatch.Gui.Component
}
private void SetMenu() {
- MenuItem newMediaTimeNode;
+ MenuItem newPlay;
menu = new Menu();
delete = new MenuItem(Catalog.GetString("Delete Play"));
- newMediaTimeNode = new MenuItem(Catalog.GetString("Add New Play"));
+ newPlay = new MenuItem(Catalog.GetString("Add New Play"));
- menu.Append(newMediaTimeNode);
+ menu.Append(newPlay);
menu.Append(delete);
- newMediaTimeNode.Activated += new EventHandler(OnNewMediaTimeNode);
+ newPlay.Activated += new EventHandler(OnNewPlay);
menu.ShowAll();
}
@@ -181,7 +181,7 @@ namespace LongoMatch.Gui.Component
g.Operator = Operator.Over;
- foreach (MediaTimeNode tn in list) {
+ foreach (Play tn in list) {
if (tn != selected) {
DrawRoundedRectangle(g,tn.StartFrame/pixelRatio,3,tn.TotalFrames/pixelRatio,height-6,SECTION_HEIGHT/7);
g.LineWidth = 2;
@@ -246,7 +246,7 @@ namespace LongoMatch.Gui.Component
private void DrawTimeNodesName() {
lock (locker) {
- foreach (MediaTimeNode tn in list) {
+ foreach (Play tn in list) {
layout.Width = Pango.Units.FromPixels((int)(tn.TotalFrames/pixelRatio));
layout.SetMarkup(tn.Name);
GdkWindow.DrawLayout(Style.TextGC(StateType.Normal),
@@ -261,7 +261,7 @@ namespace LongoMatch.Gui.Component
deleteMenu = new Menu();
delete.Submenu=deleteMenu;
dic.Clear();
- foreach (MediaTimeNode tn in list) {
+ foreach (Play tn in list) {
//We scan all the time Nodes looking for one matching the cursor selectcio
//And we add them to the delete menu
if (tn.HasFrame(cursorFrame)) {
@@ -278,7 +278,7 @@ namespace LongoMatch.Gui.Component
private void ProcessButton1(EventButton evnt) {
if (lastTime != evnt.Time) {
candidateTN = null;
- foreach (MediaTimeNode tn in list) {
+ foreach (Play tn in list) {
int pos = (int)(evnt.X*pixelRatio);
//Moving from the right side
if (Math.Abs(pos-tn.StopFrame) < 3*pixelRatio) {
@@ -304,7 +304,7 @@ namespace LongoMatch.Gui.Component
}
//On Double Click
else {
- foreach (MediaTimeNode tn in list) {
+ foreach (Play tn in list) {
int pos = (int)(evnt.X*pixelRatio);
if (TimeNodeSelected!= null && tn.HasFrame(pos)) {
TimeNodeSelected(tn);
@@ -314,13 +314,13 @@ namespace LongoMatch.Gui.Component
}
}
- protected void OnNewMediaTimeNode(object obj, EventArgs args) {
+ protected void OnNewPlay(object obj, EventArgs args) {
if (NewMarkAtFrameEvent != null)
NewMarkAtFrameEvent(section,cursorFrame);
}
protected void OnDelete(object obj, EventArgs args) {
- MediaTimeNode tNode;
+ Play tNode;
dic.TryGetValue((MenuItem)obj, out tNode);
if (TimeNodeDeleted != null && tNode != null) {
TimeNodeDeleted(tNode, section);
diff --git a/LongoMatch/Gui/Dialog/DrawingTool.cs b/LongoMatch/Gui/Dialog/DrawingTool.cs
index 51c1a76..2cfd7fa 100644
--- a/LongoMatch/Gui/Dialog/DrawingTool.cs
+++ b/LongoMatch/Gui/Dialog/DrawingTool.cs
@@ -29,7 +29,7 @@ namespace LongoMatch.Gui.Dialog
public partial class DrawingTool : Gtk.Dialog
{
- private MediaTimeNode play;
+ private Play play;
private int stopTime;
public DrawingTool()
@@ -51,7 +51,7 @@ namespace LongoMatch.Gui.Dialog
}
}
- public void SetPlay(MediaTimeNode play,int stopTime) {
+ public void SetPlay(Play play,int stopTime) {
this.play = play;
this.stopTime = stopTime;
savetoprojectbutton.Visible = true;
diff --git a/LongoMatch/Gui/Dialog/EditCategoryDialog.cs b/LongoMatch/Gui/Dialog/EditCategoryDialog.cs
index 7d8766a..3e10dc4 100644
--- a/LongoMatch/Gui/Dialog/EditCategoryDialog.cs
+++ b/LongoMatch/Gui/Dialog/EditCategoryDialog.cs
@@ -39,9 +39,9 @@ namespace LongoMatch.Gui.Dialog
timenodeproperties2.HotKeyChanged += OnHotKeyChanged;
}
- public SectionsTimeNode Section {
+ public Category Category {
set {
- timenodeproperties2.Section = value;
+ timenodeproperties2.Category = value;
}
}
@@ -51,16 +51,16 @@ namespace LongoMatch.Gui.Dialog
}
}
- protected virtual void OnHotKeyChanged(HotKey prevHotKey,SectionsTimeNode section) {
+ protected virtual void OnHotKeyChanged(HotKey prevHotKey, Category category) {
if (hkList.Contains(section.HotKey)) {
MessagePopup.PopupMessage(this,MessageType.Warning,
Catalog.GetString("This hotkey is already in use."));
- section.HotKey=prevHotKey;
- timenodeproperties2.Section=section; //Update Gui
+ category.HotKey=prevHotKey;
+ timenodeproperties2.Category = category; //Update Gui
}
- else if (section.HotKey.Defined){
+ else if (category.HotKey.Defined){
hkList.Remove(prevHotKey);
- hkList.Add(section.HotKey);
+ hkList.Add(category.HotKey);
}
}
}
diff --git a/LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs b/LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs
index 86ee9d9..7f0ff72 100644
--- a/LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs
+++ b/LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs
@@ -29,31 +29,28 @@ namespace LongoMatch.Gui.Dialog
public partial class PlayersSelectionDialog : Gtk.Dialog
{
TeamTemplate template;
- List<CheckButton> checkButtonsList;
+ Dictionary<CheckButton, Player> checkButtonsDict;
public PlayersSelectionDialog()
{
this.Build();
- checkButtonsList = new List<CheckButton>();
+ checkButtonsDict = new Dictionary<CheckButton, Player>();
}
public void SetPlayersInfo(TeamTemplate template) {
- int playersCount;
- CheckButton button;
- Player player;
-
- if (this.template != null)
+ if (template != null)
return;
- this.template = template;
- playersCount = template.PlayersCount;
+ template = template;
+ var playersCount = template.PlayersCount;
+ checkButtonsDict.Clear();
table1.NColumns =(uint)(playersCount/10);
table1.NRows =(uint) 10;
for (int i=0;i<playersCount;i++) {
- player = template.GetPlayer(i);
- button = new CheckButton();
+ var player = template.PlayersList[i];
+ var button = new CheckButton();
button.Label = player.Number + "-" + player.Name;
button.Name = i.ToString();
button.Show();
@@ -64,21 +61,20 @@ namespace LongoMatch.Gui.Dialog
uint col_right = (uint) col_left+1 ;
table1.Attach(button,col_left,col_right,row_top,row_bottom);
- checkButtonsList.Add(button);
+ checkButtonsDict.Add(button, player);
}
}
- public List<int> PlayersChecked {
+ public List<Player> PlayersChecked {
set {
- for (int i=0; i<checkButtonsList.Count; i++)
- checkButtonsList[i].Active = value.Contains(i);
+ foreach (var pair in checkButtonsDict)
+ pair.Key.Active = value.Contains(pair.Value);
}
get {
- List<int> playersList = new List<int>();
- for (int i=0; i<checkButtonsList.Count; i++) {
- if (checkButtonsList[i].Active) {
- playersList.Add(i);
- }
+ var playersList = new List<Players>();
+ foreach (var pair in checkButtonsDict){
+ if (pair.Key.Active)
+ playersList.Add(pair.Value);
}
return playersList;
}
diff --git a/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs b/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs
index 5e41084..efc54ce 100644
--- a/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs
+++ b/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs
@@ -40,12 +40,12 @@ namespace LongoMatch.Gui.Dialog
}
}
- public Sections Sections {
+ public Categories Categories {
set {
- projecttemplatewidget.Sections=value;
+ projecttemplatewidget.Categories =value;
}
get {
- return projecttemplatewidget.Sections;
+ return projecttemplatewidget.Categories;
}
}
diff --git a/LongoMatch/Gui/Dialog/TemplatesEditor.cs b/LongoMatch/Gui/Dialog/TemplatesEditor.cs
index 3cbd481..48954ba 100644
--- a/LongoMatch/Gui/Dialog/TemplatesEditor.cs
+++ b/LongoMatch/Gui/Dialog/TemplatesEditor.cs
@@ -37,12 +37,12 @@ namespace LongoMatch.Gui.Dialog
public enum UseType {
TeamTemplate,
- SectionsTemplate,
+ CategoriesTemplate,
}
private Gtk.ListStore dataFileListStore;
- private Sections selectedSectionsTemplate;
+ private Categories selectedCategoriesTemplate;
private TeamTemplate selectedTeamTemplate;
private UseType useType;
private string templateName;
@@ -95,10 +95,10 @@ namespace LongoMatch.Gui.Dialog
(cell as Gtk.CellRendererText).Text = System.IO.Path.GetFileNameWithoutExtension(_templateFilePath.ToString());
}
- public void SetSectionsTemplate(Sections sections) {
- if (useType != UseType.SectionsTemplate)
+ public void SetCategoriesTemplate(Categories sections) {
+ if (useType != UseType.CategoriesTemplate)
return;
- sectionspropertieswidget1.Sections=sections;
+ sectionspropertieswidget1.Categories=sections;
}
public void SetTeamTemplate(TeamTemplate template) {
@@ -107,10 +107,10 @@ namespace LongoMatch.Gui.Dialog
teamtemplatewidget1.TeamTemplate=template;
}
- private void UpdateSections() {
- SectionsReader sr = new SectionsReader(templateName);
- selectedSectionsTemplate = sr.GetSections();
- SetSectionsTemplate(sr.GetSections());
+ private void UpdateCategories() {
+ CategoriesReader sr = new CategoriesReader(templateName);
+ selectedCategoriesTemplate = sr.GetCategories();
+ SetCategoriesTemplate(sr.GetCategories());
SetSensitive(true);
}
@@ -120,7 +120,7 @@ namespace LongoMatch.Gui.Dialog
}
private void SetSensitive(bool sensitive) {
- if (useType == UseType.SectionsTemplate)
+ if (useType == UseType.CategoriesTemplate)
sectionspropertieswidget1.Sensitive = true;
else
teamtemplatewidget1.Sensitive = true;
@@ -147,9 +147,9 @@ namespace LongoMatch.Gui.Dialog
}
private void SaveTemplate() {
- if (useType == UseType.SectionsTemplate) {
- selectedSectionsTemplate = sectionspropertieswidget1.Sections;
- SectionsWriter.UpdateTemplate(templateName,selectedSectionsTemplate);
+ if (useType == UseType.CategoriesTemplate) {
+ selectedCategoriesTemplate = sectionspropertieswidget1.Categories;
+ CategoriesWriter.UpdateTemplate(templateName,selectedCategoriesTemplate);
}
else {
selectedTeamTemplate = teamtemplatewidget1.TeamTemplate;
@@ -215,8 +215,8 @@ namespace LongoMatch.Gui.Dialog
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.SectionsTemplate){
- SectionsWriter.CreateNewTemplate(name+fileExtension);
+ else if (useType == UseType.CategoriesTemplate){
+ CategoriesWriter.CreateNewTemplate(name+fileExtension);
}
else {
TeamTemplate tt = new TeamTemplate();
@@ -266,8 +266,8 @@ namespace LongoMatch.Gui.Dialog
treeview.Selection.GetSelected(out iter);
templateName = (string) this.dataFileListStore.GetValue(iter, 0);
- if (useType == UseType.SectionsTemplate)
- UpdateSections();
+ if (useType == UseType.CategoriesTemplate)
+ UpdateCategories();
else
UpdateTeamTemplate();
@@ -282,8 +282,8 @@ namespace LongoMatch.Gui.Dialog
protected virtual void OnTreeviewRowActivated(object o, Gtk.RowActivatedArgs args)
{
- if (useType == UseType.SectionsTemplate)
- UpdateSections();
+ if (useType == UseType.CategoriesTemplate)
+ UpdateCategories();
else
UpdateTeamTemplate();
}
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index 1889cf4..7eb158a 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -124,28 +124,29 @@ namespace LongoMatch.Gui
/* Update tabs labels */
/* FIXME 1.0: Teams should have default names */
- if (project.VisitorName == "")
+ var desc = project.Description;
+ if (desc.VisitorName == "")
visitorteamlabel.Text = Catalog.GetString("Visitor Team");
else
- visitorteamlabel.Text = project.VisitorName;
- if (project.LocalName == "")
+ visitorteamlabel.Text = desc.VisitorName;
+ if (desc.LocalName == "")
localteamlabel.Text = Catalog.GetString("Local Team");
else
- localteamlabel.Text = project.LocalName;
+ localteamlabel.Text = desc.LocalName;
if (projectType == ProjectType.FileProject) {
// Check if the file associated to the project exists
- if (!File.Exists (project.File.FilePath)) {
+ if (!File.Exists (desc.File.FilePath)) {
MessagePopup.PopupMessage (this, MessageType.Warning,
Catalog.GetString ("The file associated to this project doesn't exist.") + "\n"
+ Catalog.GetString ("If the location of the file has changed try to edit it with the database manager."));
CloseOpenedProject (true);
return;
}
- Title = System.IO.Path.GetFileNameWithoutExtension (project.File.FilePath) +
+ Title = System.IO.Path.GetFileNameWithoutExtension (desc.File.FilePath) +
" - " + Constants.SOFTWARE_NAME;
try {
- playerbin1.Open (project.File.FilePath);
+ playerbin1.Open (desc.File.FilePath);
}
catch (GLib.GException ex) {
MessagePopup.PopupMessage (this, MessageType.Error,
@@ -185,8 +186,8 @@ namespace LongoMatch.Gui
localplayerslisttreewidget.SetTeam(project.LocalTeamTemplate,project.GetLocalTeamModel());
visitorplayerslisttreewidget.SetTeam(project.VisitorTeamTemplate,project.GetVisitorTeamModel());
tagstreewidget1.Project = project;
- buttonswidget1.Sections = project.Sections;
- hkManager.Sections=project.Sections;
+ buttonswidget1.Categories = project.Categories;
+ hkManager.Categories=project.Categories;
KeyPressEvent += hotkeysListener;
MakeActionsSensitive(true,projectType);
ShowWidgets();
@@ -195,7 +196,7 @@ namespace LongoMatch.Gui
private void SaveCaptureProject(){
PreviewMediaFile file;
Project newProject = openedProject;
- string filePath = openedProject.File.FilePath;
+ string filePath = openedProject.Description.File.FilePath;
MessageDialog md = new MessageDialog((Gtk.Window)this.Toplevel, DialogFlags.Modal, MessageType.Info, ButtonsType.None,
Catalog.GetString("Loading newly created project..."));
@@ -204,7 +205,7 @@ namespace LongoMatch.Gui
/* scan the new file to build a new PreviewMediaFile with all the metadata */
try{
file = PreviewMediaFile.GetMediaFile(filePath);
- openedProject.File = file;
+ openedProject.Description.File = file;
MainClass.DB.AddProject(openedProject);
} catch (Exception ex){
string projectFile = filePath + "-" + DateTime.Now;
@@ -265,7 +266,7 @@ namespace LongoMatch.Gui
noteswidget1.Visible = false;
selectedTimeNode = null;
MakeActionsSensitive(false, projectType);
- hkManager.Sections = null;
+ hkManager.Categories = null;
KeyPressEvent -= hotkeysListener;
}
@@ -296,7 +297,7 @@ namespace LongoMatch.Gui
}
private void ClearWidgets() {
- buttonswidget1.Sections = null;
+ buttonswidget1.Categories = null;
treewidget1.Project = null;
tagstreewidget1.Clear();
timelinewidget1.Project = null;
@@ -392,7 +393,7 @@ namespace LongoMatch.Gui
project = opd.SelectedProject;
opd.Destroy();
if (project != null)
- SetProject(MainClass.DB.GetProject(project.File), ProjectType.FileProject, new CapturePropertiesStruct());
+ SetProject(MainClass.DB.GetProject(project.File.FilePath), ProjectType.FileProject, new CapturePropertiesStruct());
}
protected virtual void OnSaveProjectActionActivated(object sender, System.EventArgs e)
@@ -425,7 +426,7 @@ namespace LongoMatch.Gui
protected virtual void OnSectionsTemplatesManagerActivated(object sender, System.EventArgs e)
{
- TemplatesManager tManager = new TemplatesManager(TemplatesManager.UseType.SectionsTemplate);
+ TemplatesManager tManager = new TemplatesManager(TemplatesManager.UseType.CategoriesTemplate);
tManager.TransientFor = this;
tManager.Show();
}
@@ -581,7 +582,7 @@ namespace LongoMatch.Gui
return ret;
}
- protected virtual void OnTimeNodeSelected(LongoMatch.TimeNodes.MediaTimeNode tNode)
+ protected virtual void OnTimeNodeSelected(Play play)
{
rightvbox.Visible=true;
}
diff --git a/LongoMatch/Gui/TreeView/PlayListTreeView.cs b/LongoMatch/Gui/TreeView/PlayListTreeView.cs
index a9c2b55..1d5e62b 100644
--- a/LongoMatch/Gui/TreeView/PlayListTreeView.cs
+++ b/LongoMatch/Gui/TreeView/PlayListTreeView.cs
@@ -38,8 +38,8 @@ namespace LongoMatch.Gui.Component
private MenuItem setRate;
private ListStore ls;
private PlayList playlist;
- private PlayListTimeNode loadedTimeNode = null; //The play currently loaded in the player
- private PlayListTimeNode selectedTimeNode = null; //The play selected in the tree
+ private PlayListPlay loadedTimeNode = null; //The play currently loaded in the player
+ private PlayListPlay selectedTimeNode = null; //The play selected in the tree
private TreeIter selectedIter;
public event ApplyCurrentRateHandler ApplyCurrentRate;
@@ -49,7 +49,7 @@ namespace LongoMatch.Gui.Component
this.HeadersVisible = false;
- ls = new ListStore(typeof(PlayListTimeNode));
+ ls = new ListStore(typeof(PlayListPlay));
this.Model = ls;
menu = new Menu();
@@ -81,7 +81,7 @@ namespace LongoMatch.Gui.Component
}
}
- public PlayListTimeNode LoadedPlay {
+ public PlayListPlay LoadedPlay {
set {
loadedTimeNode = value;
this.QueueDraw();
diff --git a/LongoMatch/Handlers/EventsManager.cs b/LongoMatch/Handlers/EventsManager.cs
index 334f18b..1765c25 100644
--- a/LongoMatch/Handlers/EventsManager.cs
+++ b/LongoMatch/Handlers/EventsManager.cs
@@ -156,15 +156,15 @@ namespace LongoMatch
player.DrawFrame += OnDrawFrame;
}
- private void ProcessNewMarkEvent(int section,Time pos) {
+ private void ProcessNewMarkEvent(Category category,Time pos) {
Time length, startTime, stopTime, start, stop, fStart, fStop;
if (player == null || openedProject == null)
return;
//Get the default lead and lag time for the section
- startTime = openedProject.Sections.GetStartTime(section);
- stopTime = openedProject.Sections.GetStopTime(section);
+ startTime = category.Start;
+ stopTime = category.Stop;
// Calculating borders of the segment depnding
start = pos - startTime;
stop = pos + stopTime;
@@ -178,12 +178,11 @@ namespace LongoMatch
length = new Time((int)player.StreamLength);
fStop = (stop > length) ? length: stop;
}
- AddNewPlay(fStart, fStop, section);
+ AddNewPlay(fStart, fStop, category);
}
- private void AddNewPlay(Time start, Time stop, int section){
+ private void AddNewPlay(Time start, Time stop, Category category){
Pixbuf miniature;
- MediaTimeNode tn;
if (projectType == ProjectType.CaptureProject){
if (!capturer.Capturing){
@@ -198,9 +197,9 @@ namespace LongoMatch
miniature = player.CurrentMiniatureFrame;
else
miniature = null;
- tn = openedProject.AddTimeNode(section, start, stop,miniature);
- treewidget.AddPlay(tn,section);
- tagsTreeWidget.AddPlay(tn);
+ var play = openedProject.AddPlay(category, start, stop,miniature);
+ treewidget.AddPlay(play);
+ tagsTreeWidget.AddPlay(play);
timeline.QueueDraw();
}
@@ -233,14 +232,13 @@ namespace LongoMatch
}
}
- protected virtual void OnNewMarkAtFrame(int section, int frame) {
-
- Time pos = new Time(frame*1000/openedProject.File.Fps);
+ protected virtual void OnNewMarkAtFrame(Category category, int frame) {
+ Time pos = new Time(frame*1000/openedProject.Description.File.Fps);
player.SeekTo ((long)pos.MSeconds, true);
- ProcessNewMarkEvent(section,pos);
+ ProcessNewMarkEvent(category,pos);
}
- public virtual void OnNewMark(int i) {
+ public virtual void OnNewMark(Category category) {
Time pos;
if (projectType == ProjectType.FakeCaptureProject ||
@@ -248,14 +246,14 @@ namespace LongoMatch
pos = new Time((int)capturer.CurrentTime);
else
pos = new Time((int)player.CurrentTime);
- ProcessNewMarkEvent(i,pos);
+ ProcessNewMarkEvent(category,pos);
}
public virtual void OnNewMarkStart(){
startTime = new Time((int)player.CurrentTime);
}
- public virtual void OnNewMarkStop(int section){
+ public virtual void OnNewMarkStop(Category category){
int diff;
Time stopTime = new Time((int)player.CurrentTime);
@@ -274,10 +272,10 @@ namespace LongoMatch
else
stopTime = stopTime + correction;
}
- AddNewPlay(startTime, stopTime, section);
+ AddNewPlay(startTime, stopTime, category);
}
- protected virtual void OnTimeNodeSelected(MediaTimeNode tNode)
+ protected virtual void OnTimeNodeSelected(Play tNode)
{
selectedTimeNode = tNode;
timeline.SelectedTimeNode = tNode;
@@ -292,9 +290,9 @@ namespace LongoMatch
//Si hemos modificado el valor de un nodo de tiempo a través del
//widget de ajuste de tiempo posicionamos el reproductor en el punto
//
- if (tNode is MediaTimeNode && val is Time) {
+ if (tNode is Play && val is Time) {
if (tNode != selectedTimeNode)
- OnTimeNodeSelected((MediaTimeNode)tNode);
+ OnTimeNodeSelected((Play)tNode);
Time pos = (Time)val;
if (pos == tNode.Start) {
player.UpdateSegmentStartTime(pos.MSeconds);
@@ -303,19 +301,23 @@ namespace LongoMatch
player.UpdateSegmentStopTime(pos.MSeconds);
}
}
- else if (tNode is SectionsTimeNode) {
- buttonswidget.Sections = openedProject.Sections;
+ else if (tNode is Categories) {
+ buttonswidget.Categories = openedProject.Categories;
}
}
- protected virtual void OnTimeNodeDeleted(MediaTimeNode tNode,int section)
+ protected virtual void OnTimeNodeDeleted(Play play, Category category)
{
- treewidget.DeletePlay(tNode,section);
- foreach (int player in tNode.LocalPlayers)
- localPlayersList.DeleteTimeNode(tNode,player);
- foreach (int player in tNode.VisitorPlayers)
- visitorPlayersList.DeleteTimeNode(tNode,player);
- openedProject.DeleteTimeNode(tNode,section);
+ /* FIXME: WIP*/
+ treewidget.RemovePlay(play);
+
+ foreach (var player in play.LocalPlayers)
+ localPlayersList.RemovePlay(play ,player);
+
+ foreach (var player in play.VisitorPlayers)
+ visitorPlayersList.RemovePlay(play ,player);
+
+ openedProject.RemovePlay(play);
if (projectType == ProjectType.FileProject){
this.player.CloseActualSegment();
MainClass.DB.UpdateProject(openedProject);
@@ -323,12 +325,19 @@ namespace LongoMatch
timeline.QueueDraw();
}
- protected virtual void OnPlayListNodeAdded(MediaTimeNode tNode)
+ protected virtual void OnPlayListNodeAdded(Play play)
{
- playlist.Add(new PlayListTimeNode(openedProject.File,tNode));
+ playlist.Add(new PlayListPlay{
+ MediaFile = openedProject.Description.File,
+ Start = play.Start,
+ Stop = play.Stop,
+ Name = play.Name,
+ Duration = play.Stop - play.Start,
+ Rate = 1.0f,
+ });
}
- protected virtual void OnPlayListNodeSelected(PlayListTimeNode plNode, bool hasNext)
+ protected virtual void OnPlayListNodeSelected(PlayListPlay plNode, bool hasNext)
{
if (openedProject == null) {
if (plNode.Valid) {
@@ -355,7 +364,7 @@ namespace LongoMatch
notes.Visible = false;
}
- protected virtual void OnSnapshotSeries(MediaTimeNode tNode) {
+ protected virtual void OnSnapshotSeries(Play tNode) {
SnapshotsDialog sd;
uint interval;
string seriesName;
@@ -372,7 +381,9 @@ namespace LongoMatch
interval = sd.Interval;
seriesName = sd.SeriesName;
outDir = System.IO.Path.Combine(MainClass.SnapshotsDir(),seriesName);
- fsc = new FramesSeriesCapturer(openedProject.File.FilePath,tNode.Start.MSeconds,tNode.Stop.MSeconds,interval,outDir);
+ fsc = new FramesSeriesCapturer(openedProject.Description.File.FilePath,
+ tNode.Start.MSeconds,tNode.Stop.MSeconds,
+ interval,outDir);
fcpd = new FramesCaptureProgressDialog(fsc);
fcpd.TransientFor=(Gtk.Window) treewidget.Toplevel;
fcpd.Run();
@@ -389,9 +400,9 @@ namespace LongoMatch
protected virtual void OnPrev()
{
- if (selectedTimeNode is MediaTimeNode)
+ if (selectedTimeNode is Play)
player.SeekInSegment(selectedTimeNode.Start.MSeconds);
- else if (selectedTimeNode is PlayListTimeNode)
+ else if (selectedTimeNode is PlayListPlay)
playlist.Prev();
else if (selectedTimeNode == null)
player.SeekTo(0,false);
@@ -400,7 +411,8 @@ namespace LongoMatch
protected virtual void OnTick(object o, TickArgs args)
{
if (args.CurrentTime != 0 && timeline != null && openedProject != null)
- timeline.CurrentFrame=(uint)(args.CurrentTime * openedProject.File.Fps / 1000);
+ timeline.CurrentFrame=(uint)(args.CurrentTime *
+ openedProject.Description.File.Fps / 1000);
}
protected virtual void OnTimeline2PositionChanged(Time pos)
@@ -408,7 +420,7 @@ namespace LongoMatch
player.SeekInSegment(pos.MSeconds);
}
- protected virtual void OnApplyRate(PlayListTimeNode plNode) {
+ protected virtual void OnApplyRate(PlayListPlay plNode) {
plNode.Rate = player.Rate;
}
@@ -423,7 +435,7 @@ namespace LongoMatch
dialog.Image = pixbuf;
dialog.TransientFor = (Gtk.Window)player.Toplevel;
if (selectedTimeNode != null)
- dialog.SetPlay((selectedTimeNode as MediaTimeNode),
+ dialog.SetPlay((selectedTimeNode as Play),
time);
player.Pause();
pixbuf.Dispose();
@@ -431,7 +443,7 @@ namespace LongoMatch
dialog.Destroy();
}
- protected virtual void OnTagPlay(MediaTimeNode tNode){
+ protected virtual void OnTagPlay(Play tNode){
TaggerDialog tagger = new TaggerDialog();
tagger.ProjectTags = openedProject.Tags;
tagger.Tags = tNode.Tags;
@@ -445,7 +457,7 @@ namespace LongoMatch
tagger.Destroy();
}
- protected virtual void OnPlayersTagged(MediaTimeNode tNode, Team team) {
+ protected virtual void OnPlayersTagged(Play tNode, Team team) {
PlayersSelectionDialog dialog = new PlayersSelectionDialog();
if (team == Team.LOCAL) {
dialog.SetPlayersInfo(openedProject.LocalTeamTemplate);
diff --git a/LongoMatch/Handlers/Handlers.cs b/LongoMatch/Handlers/Handlers.cs
index 0f94697..6f179e4 100644
--- a/LongoMatch/Handlers/Handlers.cs
+++ b/LongoMatch/Handlers/Handlers.cs
@@ -30,33 +30,33 @@ namespace LongoMatch.Handlers
/*Tagging Events*/
//A Play was selected
- public delegate void TimeNodeSelectedHandler(MediaTimeNode tNode);
+ public delegate void TimeNodeSelectedHandler(Play play);
//A new play needs to be create for a specific category at the current play time
- public delegate void NewMarkEventHandler(int i);
+ public delegate void NewMarkEventHandler(Category category);
//The start time of a new play has been signaled
public delegate void NewMarkStartHandler();
//The stop of a nes play has been signaled
- public delegate void NewMarkStopHandler(int i);
+ public delegate void NewMarkStopHandler(Category category);
//Several plays needs to be created for a several categories
public delegate void NewMarksEventHandler(List<int> sections);
//A need play needs to be created at precise frame
- public delegate void NewMarkAtFrameEventHandler(int i,int frame);
+ public delegate void NewMarkAtFrameEventHandler(Category category,int frame);
//A play was edited
public delegate void TimeNodeChangedHandler(TimeNode tNode, object val);
//A play was deleted
- public delegate void TimeNodeDeletedHandler(MediaTimeNode tNode,int section);
+ public delegate void TimeNodeDeletedHandler(Play play, Category category);
//Players needs to be tagged
- public delegate void PlayersTaggedHandler(MediaTimeNode tNode, Team team);
+ public delegate void PlayersTaggedHandler(Play play, Team team);
//Tag a play
- public delegate void TagPlayHandler(MediaTimeNode tNode);
+ public delegate void TagPlayHandler(Play play);
/*Playlist Events*/
//Add the a play to the opened playlist
- public delegate void PlayListNodeAddedHandler(MediaTimeNode tNode);
+ public delegate void PlayListNodeAddedHandler(Play play);
//A play list element is selected
- public delegate void PlayListNodeSelectedHandler(PlayListTimeNode plNode, bool hasNext);
+ public delegate void PlayListNodeSelectedHandler(PlayListPlay play, bool hasNext);
//Save current playrate to a play list element
- public delegate void ApplyCurrentRateHandler(PlayListTimeNode plNode);
+ public delegate void ApplyCurrentRateHandler(PlayListPlay play);
//Drawing events
//Draw tool changed
@@ -78,13 +78,13 @@ namespace LongoMatch.Handlers
//A date was selected
public delegate void DateSelectedHandler(DateTime selectedDate);
//Create snapshots for a play
- public delegate void SnapshotSeriesHandler(MediaTimeNode tNode);
+ public delegate void SnapshotSeriesHandler(Play tNode);
//A new version of the software exists
public delegate void NewVersionHandler(Version version, string URL);
- public delegate void SectionHandler(SectionsTimeNode tNode);
- public delegate void SectionsHandler(List<SectionsTimeNode> tNodesList);
+ public delegate void SectionHandler(Category category);
+ public delegate void SectionsHandler(List<Category> categoriesList);
public delegate void ProjectsSelectedHandler(List<ProjectDescription> projects);
}
diff --git a/LongoMatch/Handlers/HotKeysManager.cs b/LongoMatch/Handlers/HotKeysManager.cs
index e584c03..a9912f6 100644
--- a/LongoMatch/Handlers/HotKeysManager.cs
+++ b/LongoMatch/Handlers/HotKeysManager.cs
@@ -31,24 +31,24 @@ namespace LongoMatch.Handlers
public class HotKeysManager
{
- private Dictionary<HotKey,int> dic;
+ private Dictionary<HotKey, Category> dic;
public event NewMarkEventHandler newMarkEvent;
public HotKeysManager()
{
- dic = new Dictionary<HotKey,int>();
+ dic = new Dictionary<HotKey,Category>();
}
// Set the active Hotkeys for the current project
- public Sections Sections {
+ public Categories Categories {
set {
dic.Clear();
if (value == null)
return;
- for (int i=0;i<value.Count;i++) {
- if (value.GetHotKey(i).Defined &&
- !dic.ContainsKey(value.GetHotKey(i)))
- dic.Add(value.GetHotKey(i),i);
+ foreach (Category cat in value) {
+ if (cat.HotKey.Defined &&
+ !dic.ContainsKey(cat.HotKey))
+ dic.Add(cat.HotKey, cat);
}
}
}
@@ -56,13 +56,14 @@ namespace LongoMatch.Handlers
// Listen to key press events and fire a newMarkEvent event if the key combination
// is associated to a Category
public void KeyListener(object sender, KeyPressEventArgs args) {
- int section=-1;
+ Category cat = null;
HotKey hotkey = new HotKey();
+
hotkey.Key=args.Event.Key;
hotkey.Modifier=args.Event.State & (ModifierType.Mod1Mask | ModifierType.Mod5Mask | ModifierType.ShiftMask);
- if (dic.TryGetValue(hotkey,out section)) {
+ if (dic.TryGetValue(hotkey, cat)) {
if (newMarkEvent != null) {
- newMarkEvent(section);
+ newMarkEvent(cat);
}
}
}
diff --git a/LongoMatch/Handlers/VideoDrawingsManager.cs b/LongoMatch/Handlers/VideoDrawingsManager.cs
index c354899..20b9873 100644
--- a/LongoMatch/Handlers/VideoDrawingsManager.cs
+++ b/LongoMatch/Handlers/VideoDrawingsManager.cs
@@ -36,7 +36,7 @@ namespace LongoMatch.Handlers
private uint timeout;
private bool inKeyFrame;
private bool canStop;
- private MediaTimeNode loadedPlay;
+ private Play loadedPlay;
public VideoDrawingsManager(PlayerBin player)
{
@@ -48,7 +48,7 @@ namespace LongoMatch.Handlers
StopClock();
}
- public MediaTimeNode Play {
+ public Play Play {
set {
loadedPlay = value;
inKeyFrame = false;
diff --git a/LongoMatch/IO/CSVExport.cs b/LongoMatch/IO/CSVExport.cs
index a07123d..6b2e2c2 100644
--- a/LongoMatch/IO/CSVExport.cs
+++ b/LongoMatch/IO/CSVExport.cs
@@ -46,8 +46,8 @@ namespace LongoMatch.IO
#region Public methods
public void WriteToFile() {
- List<List<MediaTimeNode>> list;
- Dictionary<Tag, List<MediaTimeNode>> tagsDic;
+ /*List<List<Play>> list;
+ Dictionary<Tag, List<Play>> tagsDic;
List<Player> localPlayersList;
List<Player> visitorPlayersList;
Dictionary<Player, List<object[]>> localPlayersDic;
@@ -60,9 +60,9 @@ namespace LongoMatch.IO
list = project.GetDataArray();
sectionNames = project.GetSectionsNames();
- tagsDic = new Dictionary<Tag, List<MediaTimeNode>>();
+ tagsDic = new Dictionary<Tag, List<Play>>();
foreach (Tag tag in project.Tags)
- tagsDic.Add(tag, new List<MediaTimeNode>());
+ tagsDic.Add(tag, new List<Play>());
localPlayersList = project.LocalTeamTemplate.GetPlayersList();
localPlayersDic = new Dictionary<Player, List<object[]>>();
@@ -85,7 +85,7 @@ namespace LongoMatch.IO
Catalog.GetString("Duration")));
for (int i=0; i<list.Count; i++) {
string sectionName = sectionNames[i];
- foreach (MediaTimeNode tn in list[i]) {
+ foreach (Play tn in list[i]) {
// Parse Play's tags
foreach (Tag t in tn.Tags)
tagsDic[t].Add(tn);
@@ -123,13 +123,13 @@ namespace LongoMatch.IO
tx.Close();
- MessagePopup.PopupMessage(null, MessageType.Info, Catalog.GetString("CSV exported successfully."));
+ MessagePopup.PopupMessage(null, MessageType.Info, Catalog.GetString("CSV exported successfully.")); */
}
#endregion
#region Private Methods
- private void WriteCatagoriesData(TextWriter tx, Dictionary<Tag, List<MediaTimeNode>> tagsDic){
+ private void WriteCatagoriesData(TextWriter tx, Dictionary<Tag, List<Play>> tagsDic){
// Write Tags table
tx.WriteLine(String.Format("{0};{1};{2};{3};{4};{5}",
Catalog.GetString("Tag"),
@@ -138,11 +138,11 @@ namespace LongoMatch.IO
Catalog.GetString("StartTime"),
Catalog.GetString("StopTime"),
Catalog.GetString("Duration")));
- foreach (KeyValuePair<Tag,List<MediaTimeNode>> pair in tagsDic){
+ foreach (KeyValuePair<Tag,List<Play>> pair in tagsDic){
if (pair.Value.Count == 0)
continue;
- foreach (MediaTimeNode tn in pair.Value) {
- tx.WriteLine("\""+pair.Key.Text+"\";\""+
+ foreach (Play tn in pair.Value) {
+ tx.WriteLine("\""+pair.Key.Value+"\";\""+
tn.Name+"\";\""+
tn.Team+"\";\""+
tn.Start.ToMSecondsString()+"\";\""+
@@ -169,7 +169,7 @@ namespace LongoMatch.IO
continue;
foreach (object[] o in pair.Value) {
string sectionName = (string)o[0];
- MediaTimeNode tn = (MediaTimeNode)o[1];
+ Play tn = (Play)o[1];
tx.WriteLine("\""+pair.Key.Name+"\";\""+
sectionName+"\";\""+
tn.Name+"\";\""+
diff --git a/LongoMatch/IO/SectionsReader.cs b/LongoMatch/IO/SectionsReader.cs
index bb647e1..9ab11ed 100644
--- a/LongoMatch/IO/SectionsReader.cs
+++ b/LongoMatch/IO/SectionsReader.cs
@@ -30,12 +30,12 @@ namespace LongoMatch.IO
{
- public class SectionsReader : XMLReader
+ public class CategoriesReader : XMLReader
{
#region Constructors
- public SectionsReader(string filePath) : base(filePath)
+ public CategoriesReader(string filePath) : base(filePath)
{
}
#endregion
@@ -79,15 +79,20 @@ namespace LongoMatch.IO
#endregion
#region Public methods
- public Sections GetSections() {
+ public Categories GetSections() {
Sections sections = new Sections();
bool tryNext = true;
string name;
- SectionsTimeNode tn;
+ Category tn;
for (int i=1;tryNext;i++) {
name = GetName(i);
if (name != null) {
- tn = new SectionsTimeNode(name, GetStartTime(i), GetStopTime(i), GetHotKey(i), GetColor(i));
+ tn = new Category{
+ Name = name,
+ Start = GetStartTime(i),
+ Stop = GetStopTime(i),
+ HotKey = GetHotKey(i),
+ Color = ColorGetColor(i)};
tn.SortMethodString = GetSortMethod(i);
sections.AddSection(tn);
}
diff --git a/LongoMatch/IO/SectionsWriter.cs b/LongoMatch/IO/SectionsWriter.cs
index bc546f3..df2dc9f 100644
--- a/LongoMatch/IO/SectionsWriter.cs
+++ b/LongoMatch/IO/SectionsWriter.cs
@@ -73,7 +73,7 @@ namespace LongoMatch.IO
- public static void UpdateTemplate(string templateName,Sections sections) {
+ public static void UpdateTemplate(string templateName,Categories categories) {
string fConfig = Path.Combine(MainClass.TemplatesDir(), templateName);
XmlDocument configXml = new XmlDocument();
@@ -83,26 +83,21 @@ namespace LongoMatch.IO
sb.Append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
sb.Append("<configuration>");
- foreach (SectionsTimeNode tn in sections.SectionsTimeNodes) {
- sb.Append(String.Format("<add key=\"Name{0}\" value=\"{1}\" />",i,tn.Name));
- sb.Append(String.Format("<add key=\"Start{0}\" value=\"{1}\" />",i,tn.Start.Seconds));
- sb.Append(String.Format("<add key=\"Stop{0}\" value=\"{1}\" />",i,tn.Stop.Seconds));
- sb.Append(String.Format("<add key=\"Red{0}\" value=\"{1}\" />",i,tn.Color.Red));
- sb.Append(String.Format("<add key=\"Green{0}\" value=\"{1}\" />",i,tn.Color.Green));
- sb.Append(String.Format("<add key=\"Blue{0}\" value=\"{1}\" />",i,tn.Color.Blue));
- sb.Append(String.Format("<add key=\"Modifier{0}\" value=\"{1}\" />",i,(int)(tn.HotKey.Modifier)));
- sb.Append(String.Format("<add key=\"Key{0}\" value=\"{1}\" />",i,(int)(tn.HotKey.Key)));
- sb.Append(String.Format("<add key=\"SortMethod{0}\" value=\"{1}\" />",i,tn.SortMethodString));
+ foreach (var cat in categories.CategoriesList) {
+ sb.Append(String.Format("<add key=\"Name{0}\" value=\"{1}\" />",i,cat.Name));
+ sb.Append(String.Format("<add key=\"Start{0}\" value=\"{1}\" />",i,cat.Start.Seconds));
+ sb.Append(String.Format("<add key=\"Stop{0}\" value=\"{1}\" />",i,cat.Stop.Seconds));
+ sb.Append(String.Format("<add key=\"Red{0}\" value=\"{1}\" />",i,cat.Color.Red));
+ sb.Append(String.Format("<add key=\"Green{0}\" value=\"{1}\" />",i,cat.Color.Green));
+ sb.Append(String.Format("<add key=\"Blue{0}\" value=\"{1}\" />",i,cat.Color.Blue));
+ sb.Append(String.Format("<add key=\"Modifier{0}\" value=\"{1}\" />",i,(int)(cat.HotKey.Modifier)));
+ sb.Append(String.Format("<add key=\"Key{0}\" value=\"{1}\" />",i,(int)(cat.HotKey.Key)));
+ sb.Append(String.Format("<add key=\"SortMethod{0}\" value=\"{1}\" />",i,cat.SortMethodString));
i++;
}
sb.Append("</configuration>");
configXml.LoadXml(sb.ToString());
configXml.Save(fConfig);
}
-
-
-
-
-
}
}
diff --git a/LongoMatch/LongoMatch.mdp b/LongoMatch/LongoMatch.mdp
index 4d7af62..bd8346e 100644
--- a/LongoMatch/LongoMatch.mdp
+++ b/LongoMatch/LongoMatch.mdp
@@ -26,16 +26,13 @@
<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="Code" buildaction="Compile" name="IO/SectionsWriter.cs" />
- <File subtype="Code" buildaction="Compile" name="IO/SectionsReader.cs" />
- <File subtype="Code" buildaction="Compile" name="IO/XMLReader.cs" />
<File subtype="Directory" buildaction="Compile" name="Time" />
- <File subtype="Code" buildaction="Compile" name="Time/MediaTimeNode.cs" />
+ <File subtype="Code" buildaction="Compile" name="Time/Play.cs" />
<File subtype="Code" buildaction="Compile" name="Time/PixbufTimeNode.cs" />
- <File subtype="Code" buildaction="Compile" name="Time/SectionsTimeNode.cs" />
+ <File subtype="Code" buildaction="Compile" name="Time/Category.cs" />
<File subtype="Code" buildaction="Compile" name="Time/TimeNode.cs" />
<File subtype="Code" buildaction="Compile" name="Time/Time.cs" />
- <File subtype="Code" buildaction="Compile" name="Time/PlayListTimeNode.cs" />
+ <File subtype="Code" buildaction="Compile" name="Time/PlayListPlay.cs" />
<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" />
@@ -53,22 +50,6 @@
<File subtype="Code" buildaction="Compile" name="Time/Player.cs" />
<File subtype="Code" buildaction="Nothing" name="images/logo_48x48.png" DeployService.RelativeDeployPath="icons/hicolor/48x48/longomatch.png" DeployService.TargetDirectoryId="CommonApplicationDataRoot" />
<File subtype="Code" buildaction="Compile" name="DB/TagsTemplate.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/DatabaseMigrator.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/PlayListMigrator.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/DB/DataBase.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/DB/MediaFile.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/DB/Project.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/DB/Sections.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/Playlist/IPlayList.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/Playlist/PlayList.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/Time/MediaTimeNode.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/Time/PixbufTimeNode.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/Time/PlayListTimeNode.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/Time/SectionsTimeNode.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/Time/Time.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/Time/TimeNode.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/TemplatesMigrator.cs" />
- <File subtype="Code" buildaction="Compile" name="Compat/0.0/IO/SectionsReader.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/TransparentDrawingArea.cs" />
<File subtype="Code" buildaction="Compile" name="Handlers/DrawingManager.cs" />
<File subtype="Directory" buildaction="Compile" name="Gui/Dialog" />
@@ -105,7 +86,6 @@
<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/TreeView/CategoriesTreeView.cs" />
- <File subtype="Code" buildaction="Compile" name="Gui/Dialog/Migrator.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" />
@@ -169,7 +149,6 @@
<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" />
- <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.Migrator.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.Win32CalendarDialog.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Popup.TransparentDrawingArea.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs" />
@@ -185,6 +164,10 @@
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.EndCaptureDialog.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.BusyDialog.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/TreeView/ListTreeViewBase.cs" />
+ <File subtype="Directory" buildaction="Compile" name="Compat" />
+ <File subtype="Code" buildaction="Compile" name="IO/XMLReader.cs" />
+ <File subtype="Code" buildaction="Compile" name="IO/SectionsReader.cs" />
+ <File subtype="Code" buildaction="Compile" name="IO/SectionsWriter.cs" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
@@ -198,6 +181,7 @@
<ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<ProjectReference type="Assembly" localcopy="True" specificVersion="False" refto="../../../../../usr/lib/mono/gac/Db4objects.Db4o/7.4.121.14026__6199cd4f203aa8eb/Db4objects.Db4o.dll" />
+ <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</References>
<LanguageParameters StartupObject="LongoMatch.MainClass" ApplicationIcon="." CodePage="65001" ctype="CSharpProjectParameters" />
<Deployment.LinuxDeployData />
diff --git a/LongoMatch/Main.cs b/LongoMatch/Main.cs
index 3ecf7b9..cffc908 100644
--- a/LongoMatch/Main.cs
+++ b/LongoMatch/Main.cs
@@ -146,8 +146,7 @@ namespace LongoMatch
fConfig = System.IO.Path.Combine(TemplatesDir(),"default.tem");
if (!System.IO.File.Exists(fConfig)) {
- TeamTemplate tt = new TeamTemplate();
- tt.CreateDefaultTemplate(20);
+ TeamTemplate tt = TeamTemplate.DefautlTemplate(20);
tt.Save(fConfig);
}
}
@@ -166,9 +165,9 @@ namespace LongoMatch
md.Icon=Stetic.IconLoader.LoadIcon(md, "longomatch", Gtk.IconSize.Dialog, 48);
if (md.Run()==(int)ResponseType.Yes) {
md.Destroy();
- Migrator migrator = new Migrator(homeDirectory);
- migrator.Run();
- migrator.Destroy();
+ //Migrator migrator = new Migrator(homeDirectory);
+ //migrator.Run();
+ //migrator.Destroy();
}
else
md.Destroy();
diff --git a/LongoMatch/Playlist/IPlayList.cs b/LongoMatch/Playlist/IPlayList.cs
index 8996983..095c695 100644
--- a/LongoMatch/Playlist/IPlayList.cs
+++ b/LongoMatch/Playlist/IPlayList.cs
@@ -31,16 +31,27 @@ namespace LongoMatch.Playlist {
get;
}
void Load(string path);
+
void Save(string path);
- void Add(PlayListTimeNode plNode);
- void Remove(PlayListTimeNode plNode);
- PlayListTimeNode Next();
- PlayListTimeNode Prev();
- PlayListTimeNode Select(int index);
+
+ void Add(PlayListPlay play);
+
+ void Remove(PlayListPlay play);
+
+ PlayListPlay Next();
+
+ PlayListPlay Prev();
+
+ PlayListPlay Select(int index);
+
int GetCurrentIndex();
+
bool HasNext();
+
bool HasPrev();
+
ListStore GetModel();
+
IPlayList Copy();
}
}
diff --git a/LongoMatch/Playlist/PlayList.cs b/LongoMatch/Playlist/PlayList.cs
index 517dc2f..b3415bd 100644
--- a/LongoMatch/Playlist/PlayList.cs
+++ b/LongoMatch/Playlist/PlayList.cs
@@ -34,7 +34,7 @@ namespace LongoMatch.Playlist
public class PlayList: IPlayList
{
- private List<PlayListTimeNode> list;
+ private List<PlayListPlay> list;
private static XmlSerializer ser;
private string filename = null;
private int indexSelection = 0;
@@ -42,18 +42,18 @@ namespace LongoMatch.Playlist
#region Constructors
public PlayList() {
- ser = new XmlSerializer(typeof(List<PlayListTimeNode>),new Type[] {typeof(PlayListTimeNode)});
- list = new List<PlayListTimeNode>();
+ ser = new XmlSerializer(typeof(List<PlayListPlay>),new Type[] {typeof(PlayListPlay)});
+ list = new List<PlayListPlay>();
version = new Version(1,0);
}
public PlayList(string file)
{
- ser = new XmlSerializer(typeof(List<PlayListTimeNode>),new Type[] {typeof(PlayListTimeNode)});
+ ser = new XmlSerializer(typeof(List<PlayListPlay>),new Type[] {typeof(PlayListPlay)});
//For new Play List
if (!System.IO.File.Exists(file)) {
- list = new List<PlayListTimeNode>();
+ list = new List<PlayListPlay>();
filename = file;
}
else
@@ -90,13 +90,13 @@ namespace LongoMatch.Playlist
using(FileStream strm = new FileStream(file, FileMode.Open, FileAccess.Read))
{
try {
- list = ser.Deserialize(strm) as List<PlayListTimeNode>;
+ list = ser.Deserialize(strm) as List<PlayListPlay>;
}
catch {
throw new Exception(Catalog.GetString("The file you are trying to load is not a valid playlist"));
}
}
- foreach (PlayListTimeNode plNode in list) {
+ foreach (PlayListPlay plNode in list) {
plNode.Valid = System.IO.File.Exists(plNode.MediaFile.FilePath);
}
filename = file;
@@ -122,30 +122,30 @@ namespace LongoMatch.Playlist
return indexSelection;
}
- public PlayListTimeNode Next() {
+ public PlayListPlay Next() {
if (HasNext())
indexSelection++;
return list[indexSelection];
}
- public PlayListTimeNode Prev() {
+ public PlayListPlay Prev() {
if (HasPrev())
indexSelection--;
return list[indexSelection];
}
- public void Add(PlayListTimeNode plNode) {
+ public void Add(PlayListPlay plNode) {
list.Add(plNode);
}
- public void Remove(PlayListTimeNode plNode) {
+ public void Remove(PlayListPlay plNode) {
list.Remove(plNode);
if (GetCurrentIndex() >= list.Count)
indexSelection --;
}
- public PlayListTimeNode Select(int index) {
+ public PlayListPlay Select(int index) {
indexSelection = index;
return list[index];
}
@@ -159,8 +159,8 @@ namespace LongoMatch.Playlist
}
public ListStore GetModel() {
- Gtk.ListStore listStore = new ListStore(typeof(PlayListTimeNode));
- foreach (PlayListTimeNode plNode in list) {
+ Gtk.ListStore listStore = new ListStore(typeof(PlayListPlay));
+ foreach (PlayListPlay plNode in list) {
listStore.AppendValues(plNode);
}
return listStore;
@@ -172,7 +172,7 @@ namespace LongoMatch.Playlist
listStore.GetIterFirst(out iter);
list.Clear();
while (listStore.IterIsValid(iter)) {
- list.Add(listStore.GetValue(iter, 0) as PlayListTimeNode);
+ list.Add(listStore.GetValue(iter, 0) as PlayListPlay);
listStore.IterNext(ref iter);
}
}
diff --git a/LongoMatch/Time/Category.cs b/LongoMatch/Time/Category.cs
new file mode 100644
index 0000000..f768ee6
--- /dev/null
+++ b/LongoMatch/Time/Category.cs
@@ -0,0 +1,114 @@
+// SectionsTimeNode.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.Runtime.Serialization;
+using Gdk;
+using Mono.Unix;
+using LongoMatch.Common;
+
+namespace LongoMatch.TimeNodes
+{
+
+ /// <summary>
+ /// I am a tagging category for the analysis. I contain the default values to creates plays
+ /// tagged in my category
+ /// </summary>
+ [Serializable]
+ public class Category:TimeNode, ISerializable
+ {
+
+
+ #region Constructors
+ #endregion
+ public Category (){
+
+ }
+ #region Properties
+
+ /// <value>
+ /// A key combination to create plays in my category
+ /// </value>
+ public HotKey HotKey {
+ get;
+ set;
+ }
+
+ /// <value>
+ /// A color to draw plays from my category
+ /// </value>
+ public Color Color {
+ get;
+ set;
+ }
+
+ //// <value>
+ /// Sort method used to sort plays for this category
+ /// </value>
+ public SortMethodType SortMethod{
+ get;
+ set;
+ }
+
+ public int Position{
+ get;
+ set;
+ }
+
+ public string SortMethodString{
+ get{
+ switch (SortMethod){
+ case SortMethodType.SortByName:
+ return Catalog.GetString("Sort by name");
+ case SortMethodType.SortByStartTime:
+ return Catalog.GetString("Sort by start time");
+ case SortMethodType.SortByStopTime:
+ return Catalog.GetString("Sort by stop time");
+ case SortMethodType.SortByDuration:
+ return Catalog.GetString("Sort by duration");
+ default:
+ return Catalog.GetString("Sort by name");
+ }
+ }
+ set{
+ if (value == Catalog.GetString("Sort by start time"))
+ SortMethod = SortMethodType.SortByStartTime;
+ else if (value == Catalog.GetString("Sort by stop time"))
+ SortMethod = SortMethodType.SortByStopTime;
+ else if (value == Catalog.GetString("Sort by duration"))
+ SortMethod = SortMethodType.SortByDuration;
+ else
+ SortMethod = SortMethodType.SortByName;
+ }
+ }
+ // this method is automatically called during serialization
+ public void GetObjectData(SerializationInfo info, StreamingContext context) {
+ info.AddValue("name", Name);
+ info.AddValue("start", Start);
+ info.AddValue("stop", Stop);
+ info.AddValue("hotkey", HotKey);
+ info.AddValue("position", Position);
+ info.AddValue("red", Color.Red);
+ info.AddValue("green", Color.Green);
+ info.AddValue("blue", Color.Blue);
+ }
+ #endregion
+ }
+}
diff --git a/LongoMatch/Time/PixbufTimeNode.cs b/LongoMatch/Time/PixbufTimeNode.cs
index ab02b3d..d790d0b 100644
--- a/LongoMatch/Time/PixbufTimeNode.cs
+++ b/LongoMatch/Time/PixbufTimeNode.cs
@@ -37,30 +37,6 @@ namespace LongoMatch.TimeNodes
#region Contructors
public PixbufTimeNode() {
}
-
- /// <summary>
- /// Creates a new PixbufTimeNode object
- /// </summary>
- /// <param name="name">
- /// A <see cref="System.String"/> with my name
- /// </param>
- /// <param name="start">
- /// A <see cref="Time"/> with my start time
- /// </param>
- /// <param name="stop">
- /// A <see cref="Time"/> with my stop time
- /// </param>
- /// <param name="thumbnail">
- /// A <see cref="Pixbuf"/> with my preview
- /// </param>
- public PixbufTimeNode(string name, Time start, Time stop, Pixbuf thumbnail): base(name,start,stop)
- {
- if (thumbnail != null) {
- this.thumbnailBuf = thumbnail.SaveToBuffer("png");
- thumbnail.Dispose();
- }
- else thumbnailBuf = null;
- }
#endregion
#region Properties
diff --git a/LongoMatch/Time/Play.cs b/LongoMatch/Time/Play.cs
new file mode 100644
index 0000000..f209627
--- /dev/null
+++ b/LongoMatch/Time/Play.cs
@@ -0,0 +1,278 @@
+// MediaTimeNode.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.Linq;
+using Mono.Unix;
+using Gdk;
+using LongoMatch.Common;
+
+namespace LongoMatch.TimeNodes
+{
+
+ /// <summary>
+ /// I represent a Play in the game, that's why I'm probably the most
+ /// important object of the database.
+ /// I have a name to describe the play as well as a start and a stop { LongoMatch TimeNode Time},
+ /// which sets the play's position in the game's time line.
+ /// I also stores a list a { LongoMatch TimeNode Player} tagged to this play.
+ /// </summary>
+
+ [Serializable]
+ public class Play : PixbufTimeNode
+ {
+
+ #region Constructors
+ public Play(){
+ Players = new List<Player>();
+ Tags = new List<Tag>();
+ }
+ #endregion
+
+ #region Properties
+
+ public Category Category {
+ get;
+ set;
+ }
+
+ /// <value>
+ /// Play's notes
+ /// </value>
+ public string Notes {
+ get;
+ set;
+ }
+
+ /// <value>
+ /// The <see cref="LongoMatch.TimeNode.Team"/> associated to this play
+ /// </value>
+ public Team Team {
+ get;
+ set;
+ }
+
+ /// <value>
+ /// Video frameratein frames per second. This value is taken from the
+ /// video file properties and used to translate from seconds
+ /// to frames: second 100 is equivalent to frame 100*fps
+ /// </value>
+ public uint Fps {
+ get;
+ set;
+ }
+
+ /// <value>
+ /// Start frame number
+ /// </value>
+ public uint StartFrame {
+ get {
+ return (uint) (Start.MSeconds / (Fps * 1000));
+ }
+ set {
+ Start = new Time((int)(1000*value/Fps));
+ }
+ }
+
+ /// <value>
+ /// Stop frame number
+ /// </value>
+ public uint StopFrame {
+ get {
+ return (uint) (Stop.MSeconds / (Fps * (uint)1000));
+ }
+ set {
+ Stop = new Time((int)(1000*value/Fps));
+ }
+ }
+
+ /// <value>
+ /// Get the key frame number if this play as key frame drawing or 0
+ /// </value>
+ public uint KeyFrame {
+ get {
+ if (HasKeyFrame)
+ return (uint) KeyFrameDrawing.StopTime*Fps/1000;
+ else return 0;
+ }
+ }
+
+ /// <value>
+ /// Get/Set wheter this play is actually loaded. Used in { LongoMatch Gui Component TimeScale}
+ /// </value>
+ public bool Selected {
+ get;
+ set;
+ }
+
+ /// <value>
+ /// Get/Set a list of the players tagged to this play
+ /// </value>
+ public List<Player> Players {
+ get;
+ set;
+ }
+
+ public List<Player> LocalPlayers {
+ get{
+ return
+ (from player in Players
+ where player.Team == Team.LOCAL
+ select player
+ ).ToList();
+ }
+ }
+
+ public List<Player> VisitorPlayers {
+ get{
+ return
+ (from player in Players
+ where player.Team == Team.VISITOR
+ select player
+ ).ToList();
+ }
+ }
+
+ /// <value>
+ /// Get/Set the key frame's <see cref="LongoMatch.TimeNodes.Drawing"/>
+ /// </value>
+ public Drawing KeyFrameDrawing {
+ get;
+ set;
+ }
+
+ /// <value>
+ /// Get wether the play has as defined a key frame
+ /// </value>
+ public bool HasKeyFrame {
+ get {
+ return KeyFrameDrawing != null;
+ }
+ }
+
+ /// <value>
+ /// Central frame number using (stopFrame-startFrame)/2
+ /// </value>
+ public uint CentralFrame {
+ get {
+ return StopFrame-((TotalFrames)/2);
+ }
+ }
+
+ /// <value>
+ /// Number of frames inside the play's boundaries
+ /// </value>
+ public uint TotalFrames {
+ get {
+ return StopFrame-StartFrame;
+ }
+ }
+
+ //// <value>
+ /// Play's tags
+ /// </value>
+ public List<Tag> Tags{
+ get;
+ set;
+ }
+ #endregion
+
+ #region Public methods
+ /// <summary>
+ /// Check the frame number is inside the play boundaries
+ /// </summary>
+ /// <param name="frame">
+ /// A <see cref="System.Int32"/> with the frame number
+ /// </param>
+ /// <returns>
+ /// A <see cref="System.Boolean"/>
+ /// </returns>
+ public bool HasFrame(int frame) {
+ return (frame>=StartFrame && frame<StopFrame);
+ }
+
+ public bool HasPlayer(Player player){
+ return Players.Contains(player);
+ }
+
+ /// <summary>
+ /// Add a player to the player's list
+ /// </summary>
+ /// <param name="player">
+ /// The <see cref="LongoMatch.TimeNode.Player"/> to add
+ /// </param>
+ public void AddPlayer(Player player) {
+ Players.Add(player);
+ }
+
+ /// <summary>
+ /// Removes a player from the player's list
+ /// </summary>
+ /// <param name="player">
+ /// The <see cref="LongoMatch.TimeNode.Player"/> to remove
+ /// </param>
+ public void RemovePlayer(Player Player) {
+ Players.Remove(Player);
+ }
+
+ /// <summary>
+ /// Adds a new tag to the play
+ /// </summary>
+ /// <param name="tag">
+ /// A <see cref="Tag"/>: the tag to add
+ /// </param>
+ public void AddTag(Tag tag){
+ if (!Tags.Contains(tag))
+ Tags.Add(tag);
+ }
+
+ /// <summary>
+ /// Removes a tag to the play
+ /// </summary>
+ /// <param name="tag">
+ /// A <see cref="Tag"/>: the tag to remove
+ /// </param>
+ public void RemoveTag(Tag tag){
+ if (Tags.Contains(tag))
+ Tags.Remove(tag);
+ }
+
+ public string ToString (string team)
+ {
+ String[] tags = new String[Tags.Count];
+
+ for (int i=0; i<Tags.Count; i++)
+ tags[i] = Tags[i].Value;
+
+ return "<b>"+Catalog.GetString("Name")+": </b>"+Name+"\n"+
+ "<b>"+Catalog.GetString("Team")+": </b>"+team+"\n"+
+ "<b>"+Catalog.GetString("Start")+": </b>"+Start.ToMSecondsString()+"\n"+
+ "<b>"+Catalog.GetString("Stop")+": </b>"+Stop.ToMSecondsString()+"\n"+
+ "<b>"+Catalog.GetString("Tags")+": </b>"+ String.Join(" ; ", tags);
+ }
+
+ public override string ToString(){
+ return ToString(Team.ToString());
+ }
+
+ #endregion
+ }
+}
diff --git a/LongoMatch/Time/PlayListTimeNode.cs b/LongoMatch/Time/PlayListPlay.cs
similarity index 71%
rename from LongoMatch/Time/PlayListTimeNode.cs
rename to LongoMatch/Time/PlayListPlay.cs
index 5170baf..0d8865d 100644
--- a/LongoMatch/Time/PlayListTimeNode.cs
+++ b/LongoMatch/Time/PlayListPlay.cs
@@ -29,29 +29,12 @@ namespace LongoMatch.TimeNodes
/// I stores the information of the video file I belong to and that's why I am independent of any context.
/// </summary>
[Serializable]
- public class PlayListTimeNode : TimeNode
+ public class PlayListPlay : TimeNode
{
private MediaFile mediaFile;
- private float rate=1;
- private bool valid=true; //True if the file exists
#region Constructors
- public PlayListTimeNode() {
- }
-
- /// <summary>
- /// Creates a new playlist element
- /// </summary>
- /// <param name="mediaFile">
- /// A <see cref="MediaFile"/> with my video file's information
- /// </param>
- /// <param name="tNode">
- /// A <see cref="MediaTimeNode"/> with the play I come from
- /// </param>
- public PlayListTimeNode(MediaFile mediaFile, MediaTimeNode tNode) : base(tNode.Name,tNode.Start,tNode.Stop)
- {
- MediaFile = mediaFile;
-
+ public PlayListPlay() {
}
#endregion
@@ -81,24 +64,16 @@ namespace LongoMatch.TimeNodes
/// My play rate
/// </value>
public float Rate {
- set {
- this.rate = value;
- }
- get {
- return this.rate;
- }
+ get;
+ set;
}
//// <value>
/// I wont't be valid if my file doesn't exists
/// </value>
public bool Valid {
- get {
- return this.valid;
- }
- set {
- this.valid = value;
- }
+ get;
+ set;
}
#endregion
}
diff --git a/LongoMatch/Time/Player.cs b/LongoMatch/Time/Player.cs
index 26b2333..d2230a4 100644
--- a/LongoMatch/Time/Player.cs
+++ b/LongoMatch/Time/Player.cs
@@ -18,6 +18,7 @@
using System;
using Gdk;
+using LongoMatch.Common;
namespace LongoMatch.TimeNodes
{
@@ -27,50 +28,11 @@ namespace LongoMatch.TimeNodes
[Serializable]
public class Player
{
- private string name;
- private string position;
- private int number;
private byte[] photo;
- /* Added in 0.16.1 */
- private float height;
- private int weight;
- private DateTime birthday;
- /// <summary>
- /// Creates a new player
- /// </summary>
- /// <param name="name">
- /// A <see cref="System.String"/> with my name
- /// </param>
- /// <param name="birthday">
- /// A <see cref="DateTime"/> with my name
- /// </param>
- /// <param name="height">
- /// A <see cref="System.Float"/> with my height
- /// </param>
- /// <param name="weight">
- /// A <see cref="System.Int32"/> with my weight
- /// </param>
- /// <param name="position">
- /// A <see cref="System.String"/> with my position in the field
- /// </param>
- /// <param name="number">
- /// A <see cref="System.Int32"/> with my number
- /// </param>
- /// <param name="photo">
- /// A <see cref="Pixbuf"/> with my photo
- /// </param>
#region Constructors
- public Player(string name, DateTime birthday, float height, int weight,
- string position, int number, Pixbuf photo)
+ public Player()
{
- this.name = name;
- this.birthday = birthday;
- this.height = height;
- this.weight = weight;
- this.position = position;
- this.number = number;
- Photo = photo;
}
#endregion
@@ -79,36 +41,29 @@ namespace LongoMatch.TimeNodes
/// My name
/// </value>
public string Name {
- get {
- return name;
- }
- set {
- name=value;
- }
+ get;
+ set;
+ }
+
+ public Team Team{
+ get;
+ set;
}
/// <value>
/// My position in the field
/// </value>
public string Position {
- get {
- return position;
- }
- set {
- position=value;
- }
+ get;
+ set;
}
/// <value>
/// My shirt number
/// </value>
public int Number {
- get {
- return number;
- }
- set {
- number=value;
- }
+ get;
+ set;
}
/// <value>
@@ -133,36 +88,29 @@ namespace LongoMatch.TimeNodes
/// My birthdayt
/// </value>
public DateTime Birthday{
- get {
- return birthday;
- }
- set {
- birthday = value;
- }
+ get;
+ set;
}
/// <value>
/// My height
/// </value>
public float Height{
- get {
- return height;
- }
- set {
- height = value;
- }
+ get;
+ set;
}
/// <value>
/// My Weight
/// </value>
public int Weight{
- get {
- return weight;
- }
- set {
- weight = value;
- }
+ get;
+ set;
+ }
+
+ public bool Playing{
+ get;
+ set;
}
#endregion
}
diff --git a/LongoMatch/Time/Tag.cs b/LongoMatch/Time/Tag.cs
index 5214cf9..2ce2776 100644
--- a/LongoMatch/Time/Tag.cs
+++ b/LongoMatch/Time/Tag.cs
@@ -24,27 +24,23 @@ namespace LongoMatch.TimeNodes
[Serializable]
public class Tag
{
- string text;
- public Tag(string text)
+ public Tag()
{
- this.text=text;
}
- public string Text {
- get {
- return text;
- }
- set {
- if (value == null)
- text="";
- else
- text=value;
- }
+ public string TagCategory {
+ get;
+ set;
+ }
+
+ public string Value {
+ get;
+ set;
}
public bool Equals(Tag tagComp) {
- return (text == tagComp.Text);
+ return (TagCategory == tagComp.TagCategory && Value == tagComp.Value);
}
public override bool Equals(object obj)
@@ -58,7 +54,7 @@ namespace LongoMatch.TimeNodes
public override int GetHashCode()
{
- return text.GetHashCode();
+ return TagCategory.GetHashCode() && Text.GetHashCode();
}
}
}
diff --git a/LongoMatch/Time/TimeNode.cs b/LongoMatch/Time/TimeNode.cs
index 08b8197..88f3c02 100644
--- a/LongoMatch/Time/TimeNode.cs
+++ b/LongoMatch/Time/TimeNode.cs
@@ -32,34 +32,9 @@ namespace LongoMatch.TimeNodes
[Serializable]
public class TimeNode
{
- private string name;
-
- private Time start;
-
- private Time stop;
-
#region Constructors
public TimeNode() {
}
-
- /// <summary>
- /// Creates a TimeNode object
- /// </summary>
- /// <param name="name">
- /// A <see cref="System.String"/> with my name
- /// </param>
- /// <param name="start">
- /// A <see cref="Time"/> with my start time
- /// </param>
- /// <param name="stop">
- /// A <see cref="Time"/> with my stop time
- /// </param>
- public TimeNode(String name,Time start, Time stop)
- {
- this.name = name;
- this.start = start;
- this.stop = stop;
- }
#endregion
#region Properties
@@ -67,36 +42,24 @@ namespace LongoMatch.TimeNodes
/// A short description of myself
/// </value>
public string Name {
- get {
- return this.name;
- }
- set {
- this.name=value;
- }
+ get;
+ set;
}
//// <value>
/// My start time
/// </value>
public Time Start {
- get {
- return this.start;
- }
- set {
- this.start=value;
- }
+ get;
+ set;
}
/// <value>
/// My stop time
/// </value>
public Time Stop {
- get {
- return stop;
- }
- set {
- this.stop = value;
- }
+ get;
+ set;
}
/// <value>
@@ -110,7 +73,6 @@ namespace LongoMatch.TimeNodes
#endregion
#region Public methods
-
/// <summary>
/// Change my boundaries
/// </summary>
@@ -121,8 +83,8 @@ namespace LongoMatch.TimeNodes
/// My new stop <see cref="Time"/>
/// </param>
public void ChangeStartStop(Time start, Time stop) {
- this.start = start;
- this.stop = stop;
+ Start = start;
+ Stop = stop;
}
#endregion
}
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ButtonsWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ButtonsWidget.cs
index bca3596..28bd5b7 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ButtonsWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ButtonsWidget.cs
@@ -52,6 +52,7 @@ namespace LongoMatch.Gui.Component {
w2.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.table1 = new Gtk.Table(((uint)(5)), ((uint)(4)), false);
+ this.table1.Name = "table1";
this.table1.RowSpacing = ((uint)(1));
this.table1.ColumnSpacing = ((uint)(1));
this.vbox1.Add(this.table1);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
index 8583e2b..620681e 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
@@ -77,9 +77,7 @@ namespace LongoMatch.Gui.Component {
w3.Position = 0;
w3.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild
- this.timeadjustwidget1 = new LongoMatch.Gui.Component.TimeAdjustWidget();
- this.timeadjustwidget1.Events = ((Gdk.EventMask)(256));
- this.timeadjustwidget1.Name = "timeadjustwidget1";
+ this.timeadjustwidget1 = null;
this.vbox3.Add(this.timeadjustwidget1);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox3[this.timeadjustwidget1]));
w4.Position = 1;
@@ -178,8 +176,6 @@ namespace LongoMatch.Gui.Component {
}
this.Show();
this.nameentry.Changed += new System.EventHandler(this.OnNameentryChanged);
- this.timeadjustwidget1.LeadTimeChanged += new System.EventHandler(this.OnTimeadjustwidget1LeadTimeChanged);
- this.timeadjustwidget1.LagTimeChanged += new System.EventHandler(this.OnTimeadjustwidget1LagTimeChanged);
this.colorbutton1.ColorSet += new System.EventHandler(this.OnColorbutton1ColorSet);
this.changebuton.Clicked += new System.EventHandler(this.OnChangebutonClicked);
this.sortmethodcombobox.Changed += new System.EventHandler(this.OnSortmethodcomboboxChanged);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
index 1289afb..60a9a9e 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
@@ -88,6 +88,7 @@ namespace LongoMatch.Gui.Component {
this.circlebutton = new Gtk.RadioButton("");
this.circlebutton.CanFocus = true;
this.circlebutton.Name = "circlebutton";
+ this.circlebutton.Active = true;
this.circlebutton.DrawIndicator = false;
this.circlebutton.UseUnderline = true;
this.circlebutton.Group = new GLib.SList(System.IntPtr.Zero);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs
index df52cd1..4aeb5da 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs
@@ -67,10 +67,7 @@ namespace LongoMatch.Gui.Component {
w2.Expand = false;
w2.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
- this.playlisttreeview1 = new LongoMatch.Gui.Component.PlayListTreeView();
- this.playlisttreeview1.Sensitive = false;
- this.playlisttreeview1.CanFocus = true;
- this.playlisttreeview1.Name = "playlisttreeview1";
+ this.playlisttreeview1 = null;
this.vbox1.Add(this.playlisttreeview1);
Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.playlisttreeview1]));
w3.Position = 1;
@@ -210,7 +207,6 @@ namespace LongoMatch.Gui.Component {
}
this.closebutton.Hide();
this.Show();
- this.playlisttreeview1.DragEnd += new Gtk.DragEndHandler(this.OnPlaylisttreeview1DragEnd);
this.newbutton.Clicked += new System.EventHandler(this.OnNewbuttonClicked);
this.openbutton.Clicked += new System.EventHandler(this.OnOpenbuttonClicked);
this.savebutton.Clicked += new System.EventHandler(this.OnSavebuttonClicked);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayerProperties.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayerProperties.cs
index addcfab..ec92e00 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayerProperties.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayerProperties.cs
@@ -58,6 +58,7 @@ namespace LongoMatch.Gui.Component {
this.Name = "LongoMatch.Gui.Component.PlayerProperties";
// Container child LongoMatch.Gui.Component.PlayerProperties.Gtk.Container+ContainerChild
this.table1 = new Gtk.Table(((uint)(7)), ((uint)(2)), false);
+ this.table1.Name = "table1";
this.table1.RowSpacing = ((uint)(6));
this.table1.ColumnSpacing = ((uint)(6));
// Container child table1.Gtk.Table+TableChild
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs
index bf6fea1..d5eac8f 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs
@@ -28,9 +28,7 @@ namespace LongoMatch.Gui.Component {
this.scrolledwindow1.Name = "scrolledwindow1";
this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
// Container child scrolledwindow1.Gtk.Container+ContainerChild
- this.playerstreeview = new LongoMatch.Gui.Component.PlayersTreeView();
- this.playerstreeview.CanFocus = true;
- this.playerstreeview.Name = "playerstreeview";
+ this.playerstreeview = null;
this.scrolledwindow1.Add(this.playerstreeview);
this.Add(this.scrolledwindow1);
if ((this.Child != null)) {
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlaysListTreeWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlaysListTreeWidget.cs
index e154dac..e539aa8 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlaysListTreeWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlaysListTreeWidget.cs
@@ -30,9 +30,7 @@ namespace LongoMatch.Gui.Component {
Gtk.Viewport w1 = new Gtk.Viewport();
w1.ShadowType = ((Gtk.ShadowType)(0));
// Container child GtkViewport.Gtk.Container+ContainerChild
- this.treeview = new LongoMatch.Gui.Component.PlaysTreeView();
- this.treeview.CanFocus = true;
- this.treeview.Name = "treeview";
+ this.treeview = null;
w1.Add(this.treeview);
this.scrolledwindow1.Add(w1);
this.Add(this.scrolledwindow1);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs
index 444af7f..69e4624 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs
@@ -118,6 +118,7 @@ namespace LongoMatch.Gui.Component {
this.vbox2.Spacing = 6;
// Container child vbox2.Gtk.Box+BoxChild
this.table1 = new Gtk.Table(((uint)(11)), ((uint)(2)), false);
+ this.table1.Name = "table1";
this.table1.RowSpacing = ((uint)(6));
this.table1.ColumnSpacing = ((uint)(6));
// Container child table1.Gtk.Table+TableChild
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectTemplateWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectTemplateWidget.cs
index 3e0f0aa..54713a3 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectTemplateWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectTemplateWidget.cs
@@ -48,9 +48,7 @@ namespace LongoMatch.Gui.Component {
this.scrolledwindow2.Name = "scrolledwindow2";
this.scrolledwindow2.ShadowType = ((Gtk.ShadowType)(1));
// Container child scrolledwindow2.Gtk.Container+ContainerChild
- this.sectionstreeview1 = new LongoMatch.Gui.Component.CategoriesTreeView();
- this.sectionstreeview1.CanFocus = true;
- this.sectionstreeview1.Name = "sectionstreeview1";
+ this.sectionstreeview1 = null;
this.scrolledwindow2.Add(this.sectionstreeview1);
this.hbox1.Add(this.scrolledwindow2);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.scrolledwindow2]));
@@ -220,8 +218,6 @@ namespace LongoMatch.Gui.Component {
this.exportbutton.Hide();
this.Show();
this.KeyPressEvent += new Gtk.KeyPressEventHandler(this.OnKeyPressEvent);
- this.sectionstreeview1.SectionClicked += new LongoMatch.Handlers.SectionHandler(this.OnSectionstreeview1SectionClicked);
- this.sectionstreeview1.SectionsSelected += new LongoMatch.Handlers.SectionsHandler(this.OnSectionstreeview1SectionsSelected);
this.newprevbutton.Clicked += new System.EventHandler(this.OnNewBefore);
this.newafterbutton.Clicked += new System.EventHandler(this.OnNewAfter);
this.newafterbutton.Activated += new System.EventHandler(this.OnNewBefore);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs
index a6e3a86..cac18bc 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs
@@ -55,6 +55,7 @@ namespace LongoMatch.Gui.Component {
w2.ShadowType = ((Gtk.ShadowType)(0));
// Container child GtkViewport.Gtk.Container+ContainerChild
this.table1 = new Gtk.Table(((uint)(3)), ((uint)(3)), false);
+ this.table1.Name = "table1";
this.table1.RowSpacing = ((uint)(6));
this.table1.ColumnSpacing = ((uint)(6));
w2.Add(this.table1);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs
index 2dfe184..f72faa9 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs
@@ -45,9 +45,7 @@ namespace LongoMatch.Gui.Component {
this.GtkScrolledWindow.Name = "GtkScrolledWindow";
this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
- this.treeview = new LongoMatch.Gui.Component.TagsTreeView();
- this.treeview.CanFocus = true;
- this.treeview.Name = "treeview";
+ this.treeview = null;
this.GtkScrolledWindow.Add(this.treeview);
this.vbox1.Add(this.GtkScrolledWindow);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox1[this.GtkScrolledWindow]));
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TeamTemplateWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TeamTemplateWidget.cs
index b52f120..b71ae2f 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TeamTemplateWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TeamTemplateWidget.cs
@@ -34,9 +34,7 @@ namespace LongoMatch.Gui.Component {
this.scrolledwindow2.Name = "scrolledwindow2";
this.scrolledwindow2.ShadowType = ((Gtk.ShadowType)(1));
// Container child scrolledwindow2.Gtk.Container+ContainerChild
- this.playerpropertiestreeview1 = new LongoMatch.Gui.Component.PlayerPropertiesTreeView();
- this.playerpropertiestreeview1.CanFocus = true;
- this.playerpropertiestreeview1.Name = "playerpropertiestreeview1";
+ this.playerpropertiestreeview1 = null;
this.scrolledwindow2.Add(this.playerpropertiestreeview1);
this.hbox1.Add(this.scrolledwindow2);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.scrolledwindow2]));
@@ -46,8 +44,6 @@ namespace LongoMatch.Gui.Component {
this.Child.ShowAll();
}
this.Hide();
- this.playerpropertiestreeview1.PlayerClicked += new LongoMatch.Gui.Component.PlayerPropertiesHandler(this.OnPlayerpropertiestreeview1PlayerClicked);
- this.playerpropertiestreeview1.PlayerSelected += new LongoMatch.Gui.Component.PlayerPropertiesHandler(this.OnPlayerpropertiestreeview1PlayerSelected);
}
}
}
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TimeAdjustWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TimeAdjustWidget.cs
index 402673c..f3289da 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TimeAdjustWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TimeAdjustWidget.cs
@@ -32,6 +32,7 @@ namespace LongoMatch.Gui.Component {
this.Name = "LongoMatch.Gui.Component.TimeAdjustWidget";
// Container child LongoMatch.Gui.Component.TimeAdjustWidget.Gtk.Container+ContainerChild
this.table1 = new Gtk.Table(((uint)(1)), ((uint)(5)), false);
+ this.table1.Name = "table1";
this.table1.RowSpacing = ((uint)(6));
this.table1.ColumnSpacing = ((uint)(6));
// Container child table1.Gtk.Table+TableChild
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
index 0031aa7..590a96d 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
@@ -51,9 +51,7 @@ namespace LongoMatch.Gui.Dialog {
this.vbox2.Name = "vbox2";
this.vbox2.Spacing = 6;
// Container child vbox2.Gtk.Box+BoxChild
- this.drawingtoolbox1 = new LongoMatch.Gui.Component.DrawingToolBox();
- this.drawingtoolbox1.Events = ((Gdk.EventMask)(256));
- this.drawingtoolbox1.Name = "drawingtoolbox1";
+ this.drawingtoolbox1 = null;
this.vbox2.Add(this.drawingtoolbox1);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.drawingtoolbox1]));
w2.Position = 0;
@@ -119,9 +117,7 @@ namespace LongoMatch.Gui.Dialog {
w21.Expand = false;
w21.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
- this.drawingwidget1 = new LongoMatch.Gui.Component.DrawingWidget();
- this.drawingwidget1.Events = ((Gdk.EventMask)(256));
- this.drawingwidget1.Name = "drawingwidget1";
+ this.drawingwidget1 = null;
this.hbox1.Add(this.drawingwidget1);
Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.hbox1[this.drawingwidget1]));
w22.Position = 1;
@@ -152,10 +148,6 @@ namespace LongoMatch.Gui.Dialog {
this.savetoprojectbutton.Hide();
this.button271.Hide();
this.Show();
- this.drawingtoolbox1.LineWidthChanged += new LongoMatch.Handlers.LineWidthChangedHandler(this.OnDrawingtoolbox1LineWidthChanged);
- this.drawingtoolbox1.ColorChanged += new LongoMatch.Handlers.ColorChangedHandler(this.OnDrawingtoolbox1ColorChanged);
- this.drawingtoolbox1.VisibilityChanged += new LongoMatch.Handlers.VisibilityChangedHandler(this.OnDrawingtoolbox1VisibilityChanged);
- this.drawingtoolbox1.ClearDrawing += new LongoMatch.Handlers.ClearDrawingHandler(this.OnDrawingtoolbox1ClearDrawing);
this.savebutton.Clicked += new System.EventHandler(this.OnSavebuttonClicked);
this.savetoprojectbutton.Clicked += new System.EventHandler(this.OnSavetoprojectbuttonClicked);
}
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
index 27576c7..e7f6284 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
@@ -30,9 +30,7 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.timenodeproperties2 = new LongoMatch.Gui.Component.CategoryProperties();
- this.timenodeproperties2.Events = ((Gdk.EventMask)(256));
- this.timenodeproperties2.Name = "timenodeproperties2";
+ this.timenodeproperties2 = null;
w1.Add(this.timenodeproperties2);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.timenodeproperties2]));
w2.Position = 0;
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditPlayerDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditPlayerDialog.cs
index 6c556cc..056313c 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditPlayerDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditPlayerDialog.cs
@@ -32,9 +32,7 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.playerproperties1 = new LongoMatch.Gui.Component.PlayerProperties();
- this.playerproperties1.Events = ((Gdk.EventMask)(256));
- this.playerproperties1.Name = "playerproperties1";
+ this.playerproperties1 = null;
w1.Add(this.playerproperties1);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.playerproperties1]));
w2.Position = 0;
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs
index 3e484bf..cd41a81 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EntryDialog.cs
@@ -50,6 +50,7 @@ namespace LongoMatch.Gui.Dialog {
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
this.table1 = new Gtk.Table(((uint)(3)), ((uint)(2)), false);
+ this.table1.Name = "table1";
this.table1.RowSpacing = ((uint)(6));
this.table1.ColumnSpacing = ((uint)(6));
// Container child table1.Gtk.Table+TableChild
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs
index 89d289e..c5fc734 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs
@@ -36,12 +36,7 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.fdwidget = new LongoMatch.Gui.Component.ProjectDetailsWidget();
- this.fdwidget.Name = "fdwidget";
- this.fdwidget.Edited = false;
- this.fdwidget.LocalGoals = 0;
- this.fdwidget.VisitorGoals = 0;
- this.fdwidget.Date = new System.DateTime(0);
+ this.fdwidget = null;
w1.Add(this.fdwidget);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.fdwidget]));
w2.Position = 0;
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.OpenProjectDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.OpenProjectDialog.cs
index eef9a74..6fb6dda 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.OpenProjectDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.OpenProjectDialog.cs
@@ -35,9 +35,7 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.projectlistwidget = new LongoMatch.Gui.Component.ProjectListWidget();
- this.projectlistwidget.Events = ((Gdk.EventMask)(256));
- this.projectlistwidget.Name = "projectlistwidget";
+ this.projectlistwidget = null;
w1.Add(this.projectlistwidget);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.projectlistwidget]));
w2.Position = 0;
@@ -79,7 +77,6 @@ namespace LongoMatch.Gui.Dialog {
this.DefaultWidth = 615;
this.DefaultHeight = 359;
this.Show();
- this.projectlistwidget.ProjectsSelected += new LongoMatch.Handlers.ProjectsSelectedHandler(this.OnProjectlistwidgetProjectsSelected);
}
}
}
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.PlayersSelectionDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.PlayersSelectionDialog.cs
index 92783ed..fc29bec 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.PlayersSelectionDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.PlayersSelectionDialog.cs
@@ -35,6 +35,7 @@ namespace LongoMatch.Gui.Dialog {
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
this.table1 = new Gtk.Table(((uint)(3)), ((uint)(3)), false);
+ this.table1.Name = "table1";
this.table1.RowSpacing = ((uint)(6));
this.table1.ColumnSpacing = ((uint)(6));
w1.Add(this.table1);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.cs
index f971f5b..9a48ddb 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.cs
@@ -33,10 +33,7 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.projecttemplatewidget = new LongoMatch.Gui.Component.ProjectTemplateWidget();
- this.projecttemplatewidget.Events = ((Gdk.EventMask)(256));
- this.projecttemplatewidget.Name = "projecttemplatewidget";
- this.projecttemplatewidget.Edited = false;
+ this.projecttemplatewidget = null;
w1.Add(this.projecttemplatewidget);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.projecttemplatewidget]));
w2.Position = 0;
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs
index 8b5890f..d8cca3a 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs
@@ -70,9 +70,7 @@ namespace LongoMatch.Gui.Dialog {
this.hpaned1.Name = "hpaned1";
this.hpaned1.Position = 349;
// Container child hpaned1.Gtk.Paned+PanedChild
- this.projectlistwidget1 = new LongoMatch.Gui.Component.ProjectListWidget();
- this.projectlistwidget1.Events = ((Gdk.EventMask)(256));
- this.projectlistwidget1.Name = "projectlistwidget1";
+ this.projectlistwidget1 = null;
this.hpaned1.Add(this.projectlistwidget1);
Gtk.Paned.PanedChild w2 = ((Gtk.Paned.PanedChild)(this.hpaned1[this.projectlistwidget1]));
w2.Resize = false;
@@ -89,14 +87,7 @@ namespace LongoMatch.Gui.Dialog {
this.GtkAlignment2.Name = "GtkAlignment2";
this.GtkAlignment2.LeftPadding = ((uint)(12));
// Container child GtkAlignment2.Gtk.Container+ContainerChild
- this.projectdetails = new LongoMatch.Gui.Component.ProjectDetailsWidget();
- this.projectdetails.Sensitive = false;
- this.projectdetails.Events = ((Gdk.EventMask)(256));
- this.projectdetails.Name = "projectdetails";
- this.projectdetails.Edited = false;
- this.projectdetails.LocalGoals = 0;
- this.projectdetails.VisitorGoals = 0;
- this.projectdetails.Date = new System.DateTime(0);
+ this.projectdetails = null;
this.GtkAlignment2.Add(this.projectdetails);
this.frame1.Add(this.GtkAlignment2);
this.GtkLabel6 = new Gtk.Label();
@@ -206,8 +197,6 @@ namespace LongoMatch.Gui.Dialog {
this.DefaultWidth = 804;
this.DefaultHeight = 597;
this.Show();
- this.projectlistwidget1.ProjectsSelected += new LongoMatch.Handlers.ProjectsSelectedHandler(this.OnProjectlistwidget1ProjectsSelected);
- this.projectdetails.EditedEvent += new System.EventHandler(this.OnProjectdetailsEditedEvent);
this.saveButton.Pressed += new System.EventHandler(this.OnSaveButtonPressed);
this.deleteButton.Pressed += new System.EventHandler(this.OnDeleteButtonPressed);
this.exportbutton.Clicked += new System.EventHandler(this.OnExportbuttonClicked);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.SnapshotsDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.SnapshotsDialog.cs
index 96fbf7e..ba72f01 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.SnapshotsDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.SnapshotsDialog.cs
@@ -44,6 +44,7 @@ namespace LongoMatch.Gui.Dialog {
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
this.table1 = new Gtk.Table(((uint)(3)), ((uint)(2)), false);
+ this.table1.Name = "table1";
this.table1.RowSpacing = ((uint)(6));
this.table1.ColumnSpacing = ((uint)(6));
// Container child table1.Gtk.Table+TableChild
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs
index 969036a..abcf366 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs
@@ -29,9 +29,7 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.taggerwidget1 = new LongoMatch.Gui.Component.TaggerWidget();
- this.taggerwidget1.Events = ((Gdk.EventMask)(256));
- this.taggerwidget1.Name = "taggerwidget1";
+ this.taggerwidget1 = null;
w1.Add(this.taggerwidget1);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.taggerwidget1]));
w2.Position = 0;
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TeamTemplateEditor.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TeamTemplateEditor.cs
index c090d0c..9850640 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TeamTemplateEditor.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TeamTemplateEditor.cs
@@ -32,10 +32,7 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.teamtemplatewidget1 = new LongoMatch.Gui.Component.TeamTemplateWidget();
- this.teamtemplatewidget1.Events = ((Gdk.EventMask)(256));
- this.teamtemplatewidget1.Name = "teamtemplatewidget1";
- this.teamtemplatewidget1.Edited = false;
+ this.teamtemplatewidget1 = null;
w1.Add(this.teamtemplatewidget1);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.teamtemplatewidget1]));
w2.Position = 0;
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs
index 71f4cba..4d6dc3a 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs
@@ -160,20 +160,12 @@ namespace LongoMatch.Gui.Dialog {
this.hbox1.Name = "hbox1";
this.hbox1.Spacing = 6;
// Container child hbox1.Gtk.Box+BoxChild
- this.sectionspropertieswidget1 = new LongoMatch.Gui.Component.ProjectTemplateWidget();
- this.sectionspropertieswidget1.Sensitive = false;
- this.sectionspropertieswidget1.Events = ((Gdk.EventMask)(256));
- this.sectionspropertieswidget1.Name = "sectionspropertieswidget1";
- this.sectionspropertieswidget1.Edited = false;
+ this.sectionspropertieswidget1 = null;
this.hbox1.Add(this.sectionspropertieswidget1);
Gtk.Box.BoxChild w32 = ((Gtk.Box.BoxChild)(this.hbox1[this.sectionspropertieswidget1]));
w32.Position = 0;
// Container child hbox1.Gtk.Box+BoxChild
- this.teamtemplatewidget1 = new LongoMatch.Gui.Component.TeamTemplateWidget();
- this.teamtemplatewidget1.Sensitive = false;
- this.teamtemplatewidget1.Events = ((Gdk.EventMask)(256));
- this.teamtemplatewidget1.Name = "teamtemplatewidget1";
- this.teamtemplatewidget1.Edited = false;
+ this.teamtemplatewidget1 = null;
this.hbox1.Add(this.teamtemplatewidget1);
Gtk.Box.BoxChild w33 = ((Gtk.Box.BoxChild)(this.hbox1[this.teamtemplatewidget1]));
w33.Position = 1;
@@ -204,8 +196,6 @@ namespace LongoMatch.Gui.Dialog {
}
this.DefaultWidth = 483;
this.DefaultHeight = 336;
- this.sectionspropertieswidget1.Hide();
- this.teamtemplatewidget1.Hide();
this.Show();
this.treeview.RowActivated += new Gtk.RowActivatedHandler(this.OnTreeviewRowActivated);
this.treeview.CursorChanged += new System.EventHandler(this.OnTreeviewCursorChanged);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
index 947de0c..5aa89cd 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -195,7 +195,7 @@ namespace LongoMatch.Gui {
this.ImportProjectAction.ShortLabel = Mono.Unix.Catalog.GetString("_Import Project");
w1.Add(this.ImportProjectAction, "<Control>i");
this.FreeCaptureModeAction = new Gtk.RadioAction("FreeCaptureModeAction", Mono.Unix.Catalog.GetString("Free Capture Mode"), null, null, 0);
- this.FreeCaptureModeAction.Group = this.AnalyzeModeAction.Group;
+ this.FreeCaptureModeAction.Group = this.CaptureModeAction.Group;
this.FreeCaptureModeAction.Sensitive = false;
this.FreeCaptureModeAction.ShortLabel = Mono.Unix.Catalog.GetString("Free Capture Mode");
w1.Add(this.FreeCaptureModeAction, "<Control>f");
@@ -244,9 +244,7 @@ namespace LongoMatch.Gui {
this.notebook1.CurrentPage = 0;
this.notebook1.TabPos = ((Gtk.PositionType)(3));
// Container child notebook1.Gtk.Notebook+NotebookChild
- this.treewidget1 = new LongoMatch.Gui.Component.PlaysListTreeWidget();
- this.treewidget1.Events = ((Gdk.EventMask)(256));
- this.treewidget1.Name = "treewidget1";
+ this.treewidget1 = null;
this.notebook1.Add(this.treewidget1);
// Notebook tab
this.playslabel = new Gtk.Label();
@@ -255,9 +253,7 @@ namespace LongoMatch.Gui {
this.notebook1.SetTabLabel(this.treewidget1, this.playslabel);
this.playslabel.ShowAll();
// Container child notebook1.Gtk.Notebook+NotebookChild
- this.localplayerslisttreewidget = new LongoMatch.Gui.Component.PlayersListTreeWidget();
- this.localplayerslisttreewidget.Events = ((Gdk.EventMask)(256));
- this.localplayerslisttreewidget.Name = "localplayerslisttreewidget";
+ this.localplayerslisttreewidget = null;
this.notebook1.Add(this.localplayerslisttreewidget);
Gtk.Notebook.NotebookChild w5 = ((Gtk.Notebook.NotebookChild)(this.notebook1[this.localplayerslisttreewidget]));
w5.Position = 1;
@@ -268,9 +264,7 @@ namespace LongoMatch.Gui {
this.notebook1.SetTabLabel(this.localplayerslisttreewidget, this.localteamlabel);
this.localteamlabel.ShowAll();
// Container child notebook1.Gtk.Notebook+NotebookChild
- this.visitorplayerslisttreewidget = new LongoMatch.Gui.Component.PlayersListTreeWidget();
- this.visitorplayerslisttreewidget.Events = ((Gdk.EventMask)(256));
- this.visitorplayerslisttreewidget.Name = "visitorplayerslisttreewidget";
+ this.visitorplayerslisttreewidget = null;
this.notebook1.Add(this.visitorplayerslisttreewidget);
Gtk.Notebook.NotebookChild w6 = ((Gtk.Notebook.NotebookChild)(this.notebook1[this.visitorplayerslisttreewidget]));
w6.Position = 2;
@@ -281,9 +275,7 @@ namespace LongoMatch.Gui {
this.notebook1.SetTabLabel(this.visitorplayerslisttreewidget, this.visitorteamlabel);
this.visitorteamlabel.ShowAll();
// Container child notebook1.Gtk.Notebook+NotebookChild
- this.tagstreewidget1 = new LongoMatch.Gui.Component.TagsTreeWidget();
- this.tagstreewidget1.Events = ((Gdk.EventMask)(256));
- this.tagstreewidget1.Name = "tagstreewidget1";
+ this.tagstreewidget1 = null;
this.notebook1.Add(this.tagstreewidget1);
Gtk.Notebook.NotebookChild w7 = ((Gtk.Notebook.NotebookChild)(this.notebook1[this.tagstreewidget1]));
w7.Position = 3;
@@ -313,9 +305,7 @@ namespace LongoMatch.Gui {
this.videowidgetsbox.Name = "videowidgetsbox";
this.videowidgetsbox.Spacing = 6;
// Container child videowidgetsbox.Gtk.Box+BoxChild
- this.drawingtoolbox1 = new LongoMatch.Gui.Component.DrawingToolBox();
- this.drawingtoolbox1.Events = ((Gdk.EventMask)(256));
- this.drawingtoolbox1.Name = "drawingtoolbox1";
+ this.drawingtoolbox1 = null;
this.videowidgetsbox.Add(this.drawingtoolbox1);
Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.videowidgetsbox[this.drawingtoolbox1]));
w10.Position = 0;
@@ -341,19 +331,13 @@ namespace LongoMatch.Gui {
Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox5[this.videowidgetsbox]));
w13.Position = 0;
// Container child vbox5.Gtk.Box+BoxChild
- this.timelinewidget1 = new LongoMatch.Gui.Component.TimeLineWidget();
- this.timelinewidget1.HeightRequest = 200;
- this.timelinewidget1.Events = ((Gdk.EventMask)(256));
- this.timelinewidget1.Name = "timelinewidget1";
- this.timelinewidget1.CurrentFrame = ((uint)(0));
+ this.timelinewidget1 = null;
this.vbox5.Add(this.timelinewidget1);
Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox5[this.timelinewidget1]));
w14.Position = 1;
w14.Expand = false;
// Container child vbox5.Gtk.Box+BoxChild
- this.buttonswidget1 = new LongoMatch.Gui.Component.ButtonsWidget();
- this.buttonswidget1.Events = ((Gdk.EventMask)(256));
- this.buttonswidget1.Name = "buttonswidget1";
+ this.buttonswidget1 = null;
this.vbox5.Add(this.buttonswidget1);
Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.vbox5[this.buttonswidget1]));
w15.Position = 2;
@@ -368,17 +352,12 @@ namespace LongoMatch.Gui {
this.rightvbox.Name = "rightvbox";
this.rightvbox.Spacing = 6;
// Container child rightvbox.Gtk.Box+BoxChild
- this.noteswidget1 = new LongoMatch.Gui.Component.NotesWidget();
- this.noteswidget1.Events = ((Gdk.EventMask)(256));
- this.noteswidget1.Name = "noteswidget1";
+ this.noteswidget1 = null;
this.rightvbox.Add(this.noteswidget1);
Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(this.rightvbox[this.noteswidget1]));
w17.Position = 0;
// Container child rightvbox.Gtk.Box+BoxChild
- this.playlistwidget2 = new LongoMatch.Gui.Component.PlayListWidget();
- this.playlistwidget2.WidthRequest = 100;
- this.playlistwidget2.Events = ((Gdk.EventMask)(256));
- this.playlistwidget2.Name = "playlistwidget2";
+ this.playlistwidget2 = null;
this.rightvbox.Add(this.playlistwidget2);
Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.rightvbox[this.playlistwidget2]));
w18.Position = 1;
@@ -418,11 +397,6 @@ namespace LongoMatch.Gui {
this.DefaultWidth = 1259;
this.DefaultHeight = 853;
this.leftbox.Hide();
- this.drawingtoolbox1.Hide();
- this.timelinewidget1.Hide();
- this.buttonswidget1.Hide();
- this.noteswidget1.Hide();
- this.playlistwidget2.Hide();
this.rightvbox.Hide();
this.videoprogressbar.Hide();
this.Show();
@@ -444,11 +418,9 @@ namespace LongoMatch.Gui {
this.DrawingToolAction.Toggled += new System.EventHandler(this.OnDrawingToolActionToggled);
this.ImportProjectAction.Activated += new System.EventHandler(this.OnImportProjectActionActivated);
this.FreeCaptureModeAction.Toggled += new System.EventHandler(this.OnViewToggled);
- this.treewidget1.TimeNodeSelected += new LongoMatch.Handlers.TimeNodeSelectedHandler(this.OnTimeNodeSelected);
this.playerbin1.Error += new LongoMatch.Video.Common.ErrorHandler(this.OnPlayerbin1Error);
this.playerbin1.SegmentClosedEvent += new LongoMatch.Video.Common.SegmentClosedHandler(this.OnSegmentClosedEvent);
this.capturerBin.Error += new LongoMatch.Video.Common.ErrorHandler(this.OnCapturerBinError);
- this.timelinewidget1.TimeNodeSelected += new LongoMatch.Handlers.TimeNodeSelectedHandler(this.OnTimeNodeSelected);
}
}
}
diff --git a/LongoMatch/gtk-gui/gui.stetic b/LongoMatch/gtk-gui/gui.stetic
index 5ef489f..9ffe2d8 100644
--- a/LongoMatch/gtk-gui/gui.stetic
+++ b/LongoMatch/gtk-gui/gui.stetic
@@ -1587,8 +1587,6 @@
<widget class="LongoMatch.Gui.Component.CategoriesTreeView" id="sectionstreeview1">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <signal name="SectionClicked" handler="OnSectionstreeview1SectionClicked" />
- <signal name="SectionsSelected" handler="OnSectionstreeview1SectionsSelected" />
</widget>
</child>
</widget>
@@ -4380,201 +4378,6 @@ Hotkeys with a single key are also allowed with Ctrl+key.</property>
</widget>
</child>
</widget>
- <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.Migrator" design-size="821 300">
- <property name="MemberName" />
- <property name="Icon">stock:longomatch Menu</property>
- <property name="WindowPosition">CenterOnParent</property>
- <property name="Buttons">2</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="Gtk.HBox" id="hbox1">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.Frame" id="frame1">
- <property name="MemberName" />
- <property name="ShadowType">None</property>
- <child>
- <widget class="Gtk.Alignment" id="GtkAlignment2">
- <property name="MemberName" />
- <property name="Xalign">0</property>
- <property name="Yalign">0</property>
- <property name="LeftPadding">12</property>
- <child>
- <widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="ShadowType">In</property>
- <child>
- <widget class="Gtk.TextView" id="dbtextview">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="Text" translatable="yes" />
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="Gtk.Label" id="GtkLabel2">
- <property name="MemberName" />
- <property name="LabelProp" translatable="yes"><b>Data Base Migration</b></property>
- <property name="UseMarkup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Frame" id="frame2">
- <property name="MemberName" />
- <property name="ShadowType">None</property>
- <child>
- <widget class="Gtk.Alignment" id="GtkAlignment3">
- <property name="MemberName" />
- <property name="Xalign">0</property>
- <property name="Yalign">0</property>
- <property name="LeftPadding">12</property>
- <child>
- <widget class="Gtk.ScrolledWindow" id="scrolledwindow2">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="ShadowType">In</property>
- <child>
- <widget class="Gtk.TextView" id="pltextview">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="Text" translatable="yes" />
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="Gtk.Label" id="GtkLabel3">
- <property name="MemberName" />
- <property name="LabelProp" translatable="yes"><b>Playlists Migration</b></property>
- <property name="UseMarkup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="AutoSize">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Frame" id="frame3">
- <property name="MemberName" />
- <property name="ShadowType">None</property>
- <child>
- <widget class="Gtk.Alignment" id="GtkAlignment4">
- <property name="MemberName" />
- <property name="Xalign">0</property>
- <property name="Yalign">0</property>
- <property name="LeftPadding">12</property>
- <child>
- <widget class="Gtk.ScrolledWindow" id="scrolledwindow3">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="ShadowType">In</property>
- <child>
- <widget class="Gtk.TextView" id="tptextview">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="Text" translatable="yes" />
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="Gtk.Label" id="GtkLabel4">
- <property name="MemberName" />
- <property name="LabelProp" translatable="yes"><b>Templates Migration</b></property>
- <property name="UseMarkup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">2</property>
- <property name="AutoSize">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</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">2</property>
- <property name="LayoutStyle">End</property>
- <child>
- <widget class="Gtk.Button" id="buttonCancel">
- <property name="MemberName" />
- <property name="Visible">False</property>
- <property name="Sensitive">False</property>
- <property name="CanDefault">True</property>
- <property name="CanFocus">True</property>
- <property name="UseStock">True</property>
- <property name="Type">StockItem</property>
- <property name="StockId">gtk-cancel</property>
- <property name="ResponseId">-6</property>
- <signal name="Clicked" handler="OnButtonCancelClicked" />
- <property name="label">gtk-cancel</property>
- </widget>
- <packing>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Button" id="buttonOk">
- <property name="MemberName" />
- <property name="Visible">False</property>
- <property name="CanDefault">True</property>
- <property name="CanFocus">True</property>
- <property name="UseStock">True</property>
- <property name="Type">StockItem</property>
- <property name="StockId">gtk-ok</property>
- <property name="ResponseId">-5</property>
- <property name="label">gtk-ok</property>
- </widget>
- <packing>
- <property name="Position">1</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
<widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.Win32CalendarDialog" design-size="219 225">
<property name="MemberName" />
<property name="Title" translatable="yes">Calendar</property>
diff --git a/LongoMatch/gtk-gui/objects.xml b/LongoMatch/gtk-gui/objects.xml
index 7c7ffd9..960d155 100644
--- a/LongoMatch/gtk-gui/objects.xml
+++ b/LongoMatch/gtk-gui/objects.xml
@@ -69,21 +69,6 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.TimeLineWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
- <itemgroups>
- <itemgroup label="TimeLineWidget Properties">
- <property name="CurrentFrame" />
- </itemgroup>
- </itemgroups>
- <signals>
- <itemgroup label="TimeLineWidget Signals">
- <signal name="TimeNodeChanged" />
- <signal name="TimeNodeSelected" />
- <signal name="TimeNodeDeleted" />
- <signal name="NewMarkEvent" />
- </itemgroup>
- </signals>
- </object>
<object type="LongoMatch.Gui.Component.TimeScale" palette-category="LongoMatch" allow-children="false" base-type="Gtk.DrawingArea">
<itemgroups>
<itemgroup label="TimeScale Properties">
@@ -140,17 +125,44 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.ButtonsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+ <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="ButtonsWidget Signals">
- <signal name="NewMarkEvent" />
- <signal name="NewMarkStartEvent" />
- <signal name="NewMarkStopEvent" />
+ <itemgroup label="ProjectListWidget Signals">
+ <signal name="ProjectsSelected" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.PlayerProperties" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+ <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.Popup.TransparentDrawingArea" palette-category="General" allow-children="false" base-type="Gtk.Window">
+ <itemgroups />
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Component.DrawingToolBox" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals>
+ <itemgroup label="DrawingToolBox Signals">
+ <signal name="LineWidthChanged" />
+ <signal name="DrawToolChanged" />
+ <signal name="ColorChanged" />
+ <signal name="VisibilityChanged" />
+ <signal name="ClearDrawing" />
+ <signal name="TransparencyChanged" />
+ </itemgroup>
+ </signals>
+ </object>
+ <object type="LongoMatch.Gui.Component.TaggerWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals />
</object>
@@ -173,36 +185,28 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.ProjectListWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
- <signals>
- <itemgroup label="ProjectListWidget Signals">
- <signal name="ProjectsSelected" />
- </itemgroup>
- </signals>
- </object>
- <object type="LongoMatch.Gui.Component.CategoryProperties" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.TagsTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals>
- <itemgroup label="CategoryProperties Signals">
- <signal name="HotKeyChanged" />
+ <itemgroup label="TagsTreeWidget Signals">
+ <signal name="TimeNodeSelected" />
+ <signal name="TimeNodeChanged" />
+ <signal name="PlayListNodeAdded" />
+ <signal name="SnapshotSeriesEvent" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Popup.TransparentDrawingArea" palette-category="General" allow-children="false" base-type="Gtk.Window">
+ <object type="LongoMatch.Gui.Component.DrawingWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.DrawingToolBox" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.ButtonsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals>
- <itemgroup label="DrawingToolBox Signals">
- <signal name="LineWidthChanged" />
- <signal name="DrawToolChanged" />
- <signal name="ColorChanged" />
- <signal name="VisibilityChanged" />
- <signal name="ClearDrawing" />
- <signal name="TransparencyChanged" />
+ <itemgroup label="ButtonsWidget Signals">
+ <signal name="NewMarkEvent" />
+ <signal name="NewMarkStartEvent" />
+ <signal name="NewMarkStopEvent" />
</itemgroup>
</signals>
</object>
@@ -214,9 +218,20 @@
</itemgroups>
<signals />
</object>
- <object type="LongoMatch.Gui.Component.TaggerWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
- <signals />
+ <object type="LongoMatch.Gui.Component.TimeLineWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+ <itemgroups>
+ <itemgroup label="TimeLineWidget Properties">
+ <property name="CurrentFrame" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="TimeLineWidget Signals">
+ <signal name="TimeNodeChanged" />
+ <signal name="TimeNodeSelected" />
+ <signal name="TimeNodeDeleted" />
+ <signal name="NewMarkEvent" />
+ </itemgroup>
+ </signals>
</object>
<object type="LongoMatch.Gui.Component.PlayListWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
<itemgroups />
@@ -228,17 +243,6 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.PlayersListTreeWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
- <signals>
- <itemgroup label="PlayersListTreeWidget Signals">
- <signal name="TimeNodeSelected" />
- <signal name="TimeNodeChanged" />
- <signal name="PlayListNodeAdded" />
- <signal name="SnapshotSeriesEvent" />
- </itemgroup>
- </signals>
- </object>
<object type="LongoMatch.Gui.Component.PlaysListTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals>
@@ -253,10 +257,10 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.TagsTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.PlayersListTreeWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals>
- <itemgroup label="TagsTreeWidget Signals">
+ <itemgroup label="PlayersListTreeWidget Signals">
<signal name="TimeNodeSelected" />
<signal name="TimeNodeChanged" />
<signal name="PlayListNodeAdded" />
@@ -264,8 +268,4 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.DrawingWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
- <signals />
- </object>
</objects>
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]