[longomatch/redesign] WIP: Everything compiles
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/redesign] WIP: Everything compiles
- Date: Mon, 25 Oct 2010 21:47:12 +0000 (UTC)
commit f15643a31e6a987afcb3c50bb26eb1467e431ea5
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sun Oct 17 18:14:27 2010 +0200
WIP: Everything compiles
LongoMatch/DB/Project.cs | 18 ++++
LongoMatch/DB/ProjectDescription.cs | 6 +-
LongoMatch/DB/Sections.cs | 4 +
LongoMatch/DB/TeamTemplate.cs | 2 +-
LongoMatch/Gui/Component/ButtonsWidget.cs | 15 +++-
LongoMatch/Gui/Component/CategoryProperties.cs | 3 +-
LongoMatch/Gui/Component/PlaysListTreeWidget.cs | 14 ++--
LongoMatch/Gui/Component/ProjectDetailsWidget.cs | 82 +++++++++--------
LongoMatch/Gui/Component/ProjectTemplateWidget.cs | 87 ++++++++++--------
LongoMatch/Gui/Component/TaggerWidget.cs | 14 ++-
LongoMatch/Gui/Component/TagsTreeWidget.cs | 16 ++--
LongoMatch/Gui/Component/TeamTemplateWidget.cs | 4 +-
LongoMatch/Gui/Component/TimeLineWidget.cs | 46 +++++-----
LongoMatch/Gui/Component/TimeScale.cs | 12 ++--
LongoMatch/Gui/Dialog/EditCategoryDialog.cs | 2 +-
LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs | 2 +-
.../Gui/Dialog/ProjectTemplateEditorDialog.cs | 2 +-
LongoMatch/Gui/Dialog/ProjectsManager.cs | 15 ++--
LongoMatch/Gui/Dialog/TemplatesEditor.cs | 3 +-
LongoMatch/Gui/TreeView/CategoriesTreeView.cs | 20 ++--
LongoMatch/Gui/TreeView/ListTreeViewBase.cs | 56 ++++++------
LongoMatch/Gui/TreeView/PlayListTreeView.cs | 4 +-
LongoMatch/Gui/TreeView/PlayersTreeView.cs | 4 +-
LongoMatch/Gui/TreeView/PlaysTreeView.cs | 24 +++---
LongoMatch/Gui/TreeView/TagsTreeView.cs | 2 +-
LongoMatch/Handlers/EventsManager.cs | 11 +--
LongoMatch/Handlers/Handlers.cs | 2 +-
LongoMatch/Handlers/HotKeysManager.cs | 4 +-
LongoMatch/IO/SectionsReader.cs | 16 ++--
LongoMatch/IO/SectionsWriter.cs | 2 +-
LongoMatch/Main.cs | 2 +-
LongoMatch/Time/Tag.cs | 2 +-
LongoMatch/Utils/ProjectUtils.cs | 15 ++--
.../LongoMatch.Gui.Component.CategoryProperties.cs | 5 +-
.../LongoMatch.Gui.Component.DrawingToolBox.cs | 1 -
.../LongoMatch.Gui.Component.PlayListWidget.cs | 6 +-
...ngoMatch.Gui.Component.PlayersListTreeWidget.cs | 4 +-
...LongoMatch.Gui.Component.PlaysListTreeWidget.cs | 4 +-
...ngoMatch.Gui.Component.ProjectTemplateWidget.cs | 4 +-
.../LongoMatch.Gui.Component.TagsTreeWidget.cs | 4 +-
.../LongoMatch.Gui.Component.TeamTemplateWidget.cs | 6 +-
.../gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs | 12 ++-
.../LongoMatch.Gui.Dialog.EditCategoryDialog.cs | 6 +-
.../LongoMatch.Gui.Dialog.EditPlayerDialog.cs | 4 +-
.../LongoMatch.Gui.Dialog.NewProjectDialog.cs | 7 ++-
.../LongoMatch.Gui.Dialog.OpenProjectDialog.cs | 5 +-
...Match.Gui.Dialog.ProjectTemplateEditorDialog.cs | 7 +-
.../LongoMatch.Gui.Dialog.ProjectsManager.cs | 17 +++-
.../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 | 46 ++++++++--
LongoMatch/gtk-gui/gui.stetic | 14 ++--
LongoMatch/gtk-gui/objects.xml | 94 +++++++++++---------
54 files changed, 468 insertions(+), 312 deletions(-)
---
diff --git a/LongoMatch/DB/Project.cs b/LongoMatch/DB/Project.cs
index 2a66762..c6507b7 100644
--- a/LongoMatch/DB/Project.cs
+++ b/LongoMatch/DB/Project.cs
@@ -94,6 +94,11 @@ namespace LongoMatch.DB
set;
}
+ public TagsTemplate Tags {
+ get;
+ set;
+ }
+
#endregion
#region Public Methods
@@ -179,6 +184,19 @@ namespace LongoMatch.DB
foreach (var play in playsList)
playsList.Remove(play);
}
+
+ public List<List<Play>> PlaysGroupedByCategory {
+ get {
+ var list = new List<List<Play>> ();
+ var queryPlaysByCategory =
+ from play in playsList
+ group play by play.Category;
+
+ foreach (var playsGroup in queryPlaysByCategory)
+ list.Add(playsGroup.ToList());
+ return list;
+ }
+ }
/// <summary>
/// Returns a <see cref="Gtk.TreeStore"/> in which project categories are
diff --git a/LongoMatch/DB/ProjectDescription.cs b/LongoMatch/DB/ProjectDescription.cs
index 725287f..8dad4c7 100644
--- a/LongoMatch/DB/ProjectDescription.cs
+++ b/LongoMatch/DB/ProjectDescription.cs
@@ -33,7 +33,7 @@ namespace LongoMatch.DB
public String Title {
get {
- return System.IO.Path.GetFileNameWithoutExtension(File);
+ return System.IO.Path.GetFileNameWithoutExtension(File.FilePath);
}
}
@@ -100,7 +100,7 @@ namespace LongoMatch.DB
public String Format {
get{
- String.Format("{0}x{1} {2}fps",
+ return String.Format("{0}x{1} {2}fps",
File.VideoWidth, File.VideoHeight, File.Fps);
}
}
@@ -109,7 +109,7 @@ namespace LongoMatch.DB
if (obj is ProjectDescription) {
ProjectDescription project = (ProjectDescription) obj;
- return this.File.CompareTo(project.File);
+ return this.File.FilePath.CompareTo(project.File.FilePath);
}
else
throw new ArgumentException("object is not a ProjectDescription and cannot be compared");
diff --git a/LongoMatch/DB/Sections.cs b/LongoMatch/DB/Sections.cs
index 31d371d..9685b8c 100644
--- a/LongoMatch/DB/Sections.cs
+++ b/LongoMatch/DB/Sections.cs
@@ -64,6 +64,10 @@ namespace LongoMatch.DB
public void AddCategory(Category category) {
categoriesList.Add(category);
}
+
+ public void AddCategoryAtPos(int pos, Category category) {
+ categoriesList.Insert(pos, category);
+ }
/// <summary>
/// Delete a category from the templates using the it's index
diff --git a/LongoMatch/DB/TeamTemplate.cs b/LongoMatch/DB/TeamTemplate.cs
index 67c4842..84bbbfc 100644
--- a/LongoMatch/DB/TeamTemplate.cs
+++ b/LongoMatch/DB/TeamTemplate.cs
@@ -86,7 +86,7 @@ namespace LongoMatch.DB
playersList.Add(new Player{
Name = "Player " + i,
Birthday = new DateTime(),
- Height = 1.80,
+ Height = 1.80f,
Weight = 80,
Number = 0,
Position = "",
diff --git a/LongoMatch/Gui/Component/ButtonsWidget.cs b/LongoMatch/Gui/Component/ButtonsWidget.cs
index df9bab6..04b098a 100644
--- a/LongoMatch/Gui/Component/ButtonsWidget.cs
+++ b/LongoMatch/Gui/Component/ButtonsWidget.cs
@@ -35,6 +35,7 @@ namespace LongoMatch.Gui.Component
private Categories categories;
private TagMode tagMode;
+ private Dictionary<Widget, Category> buttonsDic;
public event NewMarkEventHandler NewMarkEvent;
public event NewMarkStartHandler NewMarkStartEvent;
@@ -45,6 +46,7 @@ namespace LongoMatch.Gui.Component
{
this.Build();
Mode = TagMode.Predifined;
+ buttonsDic = new Dictionary<Widget, Category>();
}
public TagMode Mode{
@@ -66,7 +68,8 @@ namespace LongoMatch.Gui.Component
Categories = value;
if (value == null)
return;
-
+
+ buttonsDic.Clear();
int sectionsCount = value.Count;
table1.NColumns =(uint) 10;
@@ -75,12 +78,14 @@ namespace LongoMatch.Gui.Component
for (int i=0;i<sectionsCount;i++) {
Button b = new Button();
Label l = new Label();
+ Category cat = value.CategoriesList[i];
+
uint row_top =(uint)(i/table1.NColumns);
uint row_bottom = (uint) row_top+1 ;
uint col_left = (uint) i%table1.NColumns;
uint col_right = (uint) col_left+1 ;
- l.Markup = sections.GetName(i);
+ l.Markup = cat.Name;
l.Justify = Justification.Center;
l.Ellipsize = Pango.EllipsizeMode.Middle;
l.CanFocus = false;
@@ -94,6 +99,8 @@ namespace LongoMatch.Gui.Component
b.Show();
table1.Attach(b,col_left,col_right,row_top,row_bottom);
+
+ buttonsDic.Add(b, cat);
}
}
}
@@ -105,13 +112,13 @@ namespace LongoMatch.Gui.Component
Widget w = (Button)sender;
if (tagMode == TagMode.Predifined){
if (NewMarkEvent != null)
- NewMarkEvent(int.Parse(w.Name));
+ NewMarkEvent(buttonsDic[w]);
} else {
starttagbutton.Visible = true;
table1.Visible = false;
cancelbutton.Visible = false;
if (NewMarkStopEvent != null)
- NewMarkStopEvent(int.Parse(w.Name));
+ NewMarkStopEvent(buttonsDic[w]);
}
}
diff --git a/LongoMatch/Gui/Component/CategoryProperties.cs b/LongoMatch/Gui/Component/CategoryProperties.cs
index 33d3c1b..ff3dba1 100644
--- a/LongoMatch/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch/Gui/Component/CategoryProperties.cs
@@ -44,8 +44,7 @@ namespace LongoMatch.Gui.Component
this.Build();
}
- public Category Section
- {
+ public Category Category{
set {
stn = value;
UpdateGui();
diff --git a/LongoMatch/Gui/Component/PlaysListTreeWidget.cs b/LongoMatch/Gui/Component/PlaysListTreeWidget.cs
index 29999d6..0a15d1f 100644
--- a/LongoMatch/Gui/Component/PlaysListTreeWidget.cs
+++ b/LongoMatch/Gui/Component/PlaysListTreeWidget.cs
@@ -57,11 +57,12 @@ namespace LongoMatch.Gui.Component
treeview.TagPlay += OnTagPlay;
}
- public void RemovePlay(Play play, Category category) {
+ public void RemovePlay(Play play) {
if (project != null) {
TreeIter iter;
TreeIter child;
+ var category = play.Category;
var model = (TreeStore)treeview.Model;
model.GetIterFromString(out iter, category.Position.ToString());
model.IterChildren(out child, iter);
@@ -107,13 +108,12 @@ namespace LongoMatch.Gui.Component
project = value;
if (project != null) {
treeview.Model = project.GetModel();
- treeview.Colors = project.Sections.GetColors();
- treeview.VisitorTeam = project.VisitorName;
- treeview.LocalTeam = project.LocalName;
+ treeview.Colors = true;
+ treeview.VisitorTeam = project.Description.VisitorName;
+ treeview.LocalTeam = project.Description.LocalName;
}
else {
treeview.Model = null;
- treeview.Colors = null;
}
}
}
@@ -134,9 +134,9 @@ namespace LongoMatch.Gui.Component
TimeNodeSelected(tNode);
}
- protected virtual void OnTimeNodeDeleted(Play tNode, Category category){
+ protected virtual void OnTimeNodeDeleted(Play tNode){
if (TimeNodeDeleted != null)
- TimeNodeDeleted(tNode, category);
+ TimeNodeDeleted(tNode);
}
protected virtual void OnPlayListNodeAdded(Play tNode)
diff --git a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
index 85e3b57..2018fe4 100644
--- a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
@@ -187,12 +187,12 @@ namespace LongoMatch.Gui.Component
}
}
- public Category Category {
+ public Categories Categories {
get {
- return actualSection;
+ return actualCategory;
}
set {
- actualSection = value;
+ actualCategory = value;
}
}
@@ -297,31 +297,33 @@ namespace LongoMatch.Gui.Component
public void SetProject(Project project) {
this.project = project;
- mFile = project.File;
+ var desc = project.Description;
+ mFile = desc.File;
Filename = mFile != null ? mFile.FilePath : "";
- LocalName = project.LocalName;
- VisitorName = project.VisitorName;
- LocalGoals = project.LocalGoals;
- VisitorGoals = project.VisitorGoals;
- Date = project.MatchDate;
- Season = project.Season;
- Competition = project.Competition;
- Sections = project.Sections;
+ LocalName = desc.LocalName;
+ VisitorName = desc.VisitorName;
+ LocalGoals = desc.LocalGoals;
+ VisitorGoals = desc.VisitorGoals;
+ Date = desc.MatchDate;
+ Season = desc.Season;
+ Competition = desc.Competition;
+ Categories = project.Categories;
LocalTeamTemplate = project.LocalTeamTemplate;
VisitorTeamTemplate = project.VisitorTeamTemplate;
Edited = false;
}
public void UpdateProject() {
- project.File= mFile;
- project.LocalName = localTeamEntry.Text;
- project.VisitorName = visitorTeamEntry.Text;
- project.LocalGoals = (int)localSpinButton.Value;
- project.VisitorGoals = (int)visitorSpinButton.Value;
- project.MatchDate = DateTime.Parse(dateEntry.Text);
- project.Competition = competitionentry.Text;
- project.Season = seasonentry.Text;
- project.Sections = Sections;
+ var desc = project.Description;
+ desc.File= mFile;
+ desc.LocalName = localTeamEntry.Text;
+ desc.VisitorName = visitorTeamEntry.Text;
+ desc.LocalGoals = (int)localSpinButton.Value;
+ desc.VisitorGoals = (int)visitorSpinButton.Value;
+ desc.MatchDate = DateTime.Parse(dateEntry.Text);
+ desc.Competition = competitionentry.Text;
+ desc.Season = seasonentry.Text;
+ project.Categories = Categories;
project.LocalTeamTemplate = LocalTeamTemplate;
project.VisitorTeamTemplate = VisitorTeamTemplate;
}
@@ -340,17 +342,21 @@ namespace LongoMatch.Gui.Component
mFile.FilePath = fileEntry.Text;
mFile.Fps = 25;
}
- return new Project(mFile,
- LocalName,
- VisitorName,
- Season,
- Competition,
- LocalGoals,
- VisitorGoals,
- Date,
- Sections,
- LocalTeamTemplate,
- VisitorTeamTemplate);
+ var desc = new ProjectDescription {
+ File = mFile,
+ LocalName = LocalName,
+ VisitorName = VisitorName,
+ Season = Season,
+ Competition = Competition,
+ LocalGoals = LocalGoals,
+ MatchDate = Date
+ };
+
+ return new Project{
+ Description = desc,
+ Categories = Categories,
+ LocalTeamTemplate = LocalTeamTemplate,
+ VisitorTeamTemplate = VisitorTeamTemplate};
}
}
else {
@@ -408,8 +414,8 @@ namespace LongoMatch.Gui.Component
i++;
}
tagscombobox.Active = index;
- SectionsReader reader = new SectionsReader(System.IO.Path.Combine(MainClass.TemplatesDir(),SectionsFile));
- Sections= reader.GetSections();
+ var reader = new CategoriesReader(System.IO.Path.Combine(MainClass.TemplatesDir(),SectionsFile));
+ Categories = reader.GetCategories();
}
private void FillTeamsTemplate() {
@@ -529,8 +535,8 @@ namespace LongoMatch.Gui.Component
protected virtual void OnCombobox1Changed(object sender, System.EventArgs e)
{
- SectionsReader reader = new SectionsReader(System.IO.Path.Combine(MainClass.TemplatesDir(),SectionsFile));
- Sections= reader.GetSections();
+ var reader = new CategoriesReader(System.IO.Path.Combine(MainClass.TemplatesDir(),SectionsFile));
+ Categories = reader.GetCategories();
}
protected virtual void OnVisitorcomboboxChanged(object sender, System.EventArgs e)
@@ -548,11 +554,11 @@ namespace LongoMatch.Gui.Component
{
ProjectTemplateEditorDialog ted = new ProjectTemplateEditorDialog();
ted.TransientFor = (Window)Toplevel;
- ted.Sections = Sections;
+ ted.Categories = Categories;
ted.Project = project;
ted.CanExport = Use == ProjectType.EditProject;
if (ted.Run() == (int)ResponseType.Apply) {
- Sections = ted.Sections;
+ Categories = ted.Categories;
}
ted.Destroy();
OnEdited(this,null);
diff --git a/LongoMatch/Gui/Component/ProjectTemplateWidget.cs b/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
index 93e240f..ccd7bbe 100644
--- a/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectTemplateWidget.cs
@@ -38,9 +38,8 @@ namespace LongoMatch.Gui.Component
{
private List<HotKey> hkList;
private Project project;
- private Categories sections;
- private List<Categories> selectedCategories;
- private bool edited = false;
+ private Categories categories;
+ private List<Category> selectedCategories;
public ProjectTemplateWidget()
{
@@ -48,28 +47,32 @@ namespace LongoMatch.Gui.Component
hkList = new List<HotKey>();
}
- public void SetProject(Project project) {
- this.project = project;
- if (project != null)
- Categories=project.Categories;
+ public Project Project {
+ set{
+ project = project;
+ if (project != null)
+ Categories = project.Categories;
+ }
}
public Categories Categories {
get {
- return sections;
+ return categories;
}
set {
- this.sections = value;
- edited = false;
- Gtk.TreeStore sectionsListStore = new Gtk.TreeStore(typeof(Category));
+ categories = value;
+ Edited = false;
+ Gtk.TreeStore categoriesListStore = new Gtk.TreeStore(typeof(Category));
hkList.Clear();
- for (int i=0;i<sections.Count;i++) {
- sectionsListStore.AppendValues(sections.GetSection(i));
+
+ foreach (var cat in categories.CategoriesList){
+ categoriesListStore.AppendValues(cat);
try {
- hkList.Add(sections.GetSection(i).HotKey);
+ hkList.Add(cat.HotKey);
} catch {}; //Do not add duplicated hotkeys
}
- sectionstreeview1.Model = sectionsListStore;
+ /* FIXME */
+ //categoriestreeview1.Model = categoriesListStore;
ButtonsSensitive = false;
}
}
@@ -81,35 +84,38 @@ namespace LongoMatch.Gui.Component
}
}
public bool Edited {
- get {
- return edited;
- }
- set {
- edited=value;
- }
+ get;
+ set;
}
private void UpdateModel() {
Categories = Categories;
}
- private void AddSection(int index) {
+ private void AddCategory(int index) {
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 Category("New Section",start,stop,hkey,new Color(Byte.MaxValue,Byte.MinValue,Byte.MinValue));
+ tn = new Category{
+ Name = "New Section",
+ Start = start,
+ Stop = stop,
+ HotKey = hkey,
+ Color = new Color(Byte.MaxValue,Byte.MinValue,Byte.MinValue)
+ };
if (project != null) {
- project.AddSectionAtPos(tn,index);
- }
- else {
- sections.AddSectionAtPos(tn,index);
+ /* Editing a project template */
+ project.Categories.AddCategoryAtPos(index,tn);
+ } else {
+ /* Editing a template in the templates editor */
+ categories.AddCategoryAtPos(index,tn);
}
UpdateModel();
- edited = true;
+ Edited = true;
}
private void RemoveSelectedCategories() {
@@ -119,26 +125,26 @@ namespace LongoMatch.Gui.Component
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 (Category tNode in selectedCategories)
- project.DeleteSection(sections.Categorys.IndexOf(tNode));
+ foreach (Category cat in selectedCategories)
+ project.Categories.RemoveCategory(cat);
} catch {
MessagePopup.PopupMessage(this,MessageType.Warning,
Catalog.GetString("A template needs at least one category"));
}
}
dialog.Destroy();
- sections=project.Categories;
+ categories = project.Categories;
} else {
- foreach (Category tNode in selectedCategories){
- if (sections.Count == 1){
+ foreach (Category cat in selectedCategories){
+ if (categories.Count == 1){
MessagePopup.PopupMessage(this,MessageType.Warning,
Catalog.GetString("A template needs at least one category"));
} else
- sections.RemoveSection(sections.Categorys.IndexOf(tNode));
+ categories.RemoveCategory(cat);
}
}
UpdateModel();
- edited = true;
+ Edited = true;
selectedCategories = null;
ButtonsSensitive=false;
}
@@ -154,12 +160,12 @@ namespace LongoMatch.Gui.Component
private void EditSelectedSection() {
EditCategoryDialog dialog = new EditCategoryDialog();
- dialog.Section = selectedCategories[0];
+ dialog.Category = selectedCategories[0];
dialog.HotKeysList = hkList;
dialog.TransientFor = (Gtk.Window) Toplevel;
dialog.Run();
dialog.Destroy();
- edited = true;
+ Edited = true;
}
private void SaveTemplate(string templateName){
@@ -167,11 +173,11 @@ namespace LongoMatch.Gui.Component
}
protected virtual void OnNewAfter(object sender, EventArgs args) {
- AddSection(sections.Categorys.IndexOf(selectedCategories[0])+1);
+ AddCategory(categories.CategoriesList.IndexOf(selectedCategories[0])+1);
}
protected virtual void OnNewBefore(object sender, EventArgs args) {
- AddSection(sections.Categorys.IndexOf(selectedCategories[0]));
+ AddCategory(categories.CategoriesList.IndexOf(selectedCategories[0]));
}
protected virtual void OnRemove(object sender, EventArgs args) {
@@ -224,7 +230,8 @@ namespace LongoMatch.Gui.Component
DialogFlags.Modal,
MessageType.Question,
Gtk.ButtonsType.YesNo,
- Catalog.GetString("The template already exists.Do you want to overwrite it ?")
+ Catalog.GetString("The template already exists." +
+ "Do you want to overwrite it ?")
);
if (md.Run() == (int)ResponseType.Yes)
SaveTemplate(dialog.Text);
diff --git a/LongoMatch/Gui/Component/TaggerWidget.cs b/LongoMatch/Gui/Component/TaggerWidget.cs
index e881d56..ae83837 100644
--- a/LongoMatch/Gui/Component/TaggerWidget.cs
+++ b/LongoMatch/Gui/Component/TaggerWidget.cs
@@ -77,16 +77,18 @@ namespace LongoMatch.Gui.Component
}
private void AddTag(string text, bool check){
- Tag tag = new Tag(text);
+ Tag tag = new Tag {
+ Value = text,
+ };
if (tagsDict.ContainsKey(tag))
return;
AddTagWidget(tag, check);
}
private void AddTagWidget(Tag tag, bool check){
- CheckButton button = new CheckButton(tag.Text);
- button.Name = tag.Text;
- AddElementToTable(button);
+ CheckButton button = new CheckButton(tag.Value);
+ button.Name = tag.Value;
+ AddElementToTable(button);
button.Active = check;
tagsDict.Add(tag, button);
}
@@ -118,7 +120,9 @@ namespace LongoMatch.Gui.Component
scrolledwindow1.Visible = true;
label1.Visible = false;
}
- tag = new Tag(entry1.Text);
+ tag = new Tag{
+ Value = entry1.Text,
+ };
if (tagsDict.TryGetValue(tag, out button))
button.Active = true;
else
diff --git a/LongoMatch/Gui/Component/TagsTreeWidget.cs b/LongoMatch/Gui/Component/TagsTreeWidget.cs
index dc2d48a..2d2f462 100644
--- a/LongoMatch/Gui/Component/TagsTreeWidget.cs
+++ b/LongoMatch/Gui/Component/TagsTreeWidget.cs
@@ -112,13 +112,13 @@ namespace LongoMatch.Gui.Component
project = value;
if (project != null) {
model.Clear();
- foreach (List<Play> list in project.GetDataArray()){
+ foreach (List<Play> list in project.PlaysGroupedByCategory){
foreach (Play tNode in list)
model.AppendValues(tNode);
}
UpdateTagsList();
- treeview.LocalTeam = value.LocalName;
- treeview.VisitorTeam = value.VisitorName;
+ treeview.LocalTeam = project.Description.LocalName;
+ treeview.VisitorTeam = project.Description.VisitorName;
}
}
}
@@ -132,7 +132,7 @@ namespace LongoMatch.Gui.Component
public void UpdateTagsList(){
(tagscombobox.Model as ListStore).Clear();
foreach (Tag tag in project.Tags)
- tagscombobox.AppendText(tag.Text);
+ tagscombobox.AppendText(tag.Value);
}
private void AddFilterWidget(Tag tag){
@@ -141,11 +141,11 @@ namespace LongoMatch.Gui.Component
Label l;
box = new HBox();
- box.Name = tag.Text;
+ box.Name = tag.Value;
b = new Button();
b.Image = new Image(Stetic.IconLoader.LoadIcon(this, "gtk-delete", Gtk.IconSize.Menu, 16));
b.Clicked += OnDeleteClicked;
- l = new Label(tag.Text);
+ l = new Label(tag.Value);
l.Justify = Justification.Left;
box.PackEnd(b,false, false, 0);
box.PackStart(l,true, true, 0);
@@ -156,7 +156,7 @@ namespace LongoMatch.Gui.Component
protected virtual void OnDeleteClicked (object o, System.EventArgs e){
Widget parent = (o as Widget).Parent;
tagscombobox.AppendText(parent.Name);
- filterTags.Remove(new Tag(parent.Name));
+ filterTags.Remove(new Tag{Value = parent.Name});
filter.Refilter();
tagsvbox.Remove(parent);
}
@@ -167,7 +167,7 @@ namespace LongoMatch.Gui.Component
if (text == null || text == "")
return;
- Tag tag = new Tag(text);
+ Tag tag = new Tag{ Value = text};
if (!filterTags.Contains(tag)){
filterTags.Add(tag);
tagscombobox.RemoveText(tagscombobox.Active);
diff --git a/LongoMatch/Gui/Component/TeamTemplateWidget.cs b/LongoMatch/Gui/Component/TeamTemplateWidget.cs
index d3af265..b48e566 100644
--- a/LongoMatch/Gui/Component/TeamTemplateWidget.cs
+++ b/LongoMatch/Gui/Component/TeamTemplateWidget.cs
@@ -47,8 +47,8 @@ namespace LongoMatch.Gui.Component
this.template= value;
edited = false;
Gtk.TreeStore playersListStore = new Gtk.TreeStore(typeof(Player));
- for (int i=0;i<template.PlayersCount;i++)
- playersListStore.AppendValues(template.GetPlayer(i));
+ foreach (Player player in template.PlayersList)
+ playersListStore.AppendValues(player);
playerpropertiestreeview1.Model=playersListStore;
}
}
diff --git a/LongoMatch/Gui/Component/TimeLineWidget.cs b/LongoMatch/Gui/Component/TimeLineWidget.cs
index f6ab96a..9bf81dd 100644
--- a/LongoMatch/Gui/Component/TimeLineWidget.cs
+++ b/LongoMatch/Gui/Component/TimeLineWidget.cs
@@ -38,8 +38,8 @@ namespace LongoMatch.Gui.Component {
public event NewMarkAtFrameEventHandler NewMarkEvent;
//public event PlayListNodeAddedHandler PlayListNodeAdded;
- private TimeScale[] tsArray;
- private List<List<Play>> tnArray;
+ private List<TimeScale> tsList;
+ private List<List<Play>> playsByCategory;
private Categories sections;
private TimeReferenceWidget tr;
private uint frames;
@@ -61,8 +61,8 @@ namespace LongoMatch.Gui.Component {
}
set {
selected = value;
- if (tsArray != null && tnArray != null) {
- foreach (TimeScale ts in tsArray) {
+ if (tsList != null && playsByCategory != null) {
+ foreach (TimeScale ts in tsList) {
ts.SelectedTimeNode = value;
}
}
@@ -83,8 +83,8 @@ namespace LongoMatch.Gui.Component {
set {
currentFrame = value;
- if (tsArray != null && tnArray != null) {
- foreach (TimeScale ts in tsArray) {
+ if (tsList != null && playsByCategory != null) {
+ foreach (TimeScale ts in tsList) {
ts.CurrentFrame = value;
}
tr.CurrentFrame = value;
@@ -114,10 +114,10 @@ namespace LongoMatch.Gui.Component {
private void SetPixelRatio(uint pixelRatio) {
- if (tsArray != null && tnArray != null) {
+ if (tsList != null && playsByCategory != null) {
this.pixelRatio = pixelRatio;
tr.PixelRatio = pixelRatio;
- foreach (TimeScale ts in tsArray) {
+ foreach (TimeScale ts in tsList) {
ts.PixelRatio = pixelRatio;
}
vscale1.Value=pixelRatio;
@@ -127,34 +127,38 @@ namespace LongoMatch.Gui.Component {
public Project Project {
set {
+ int i = 0;
+
ResetGui();
if (value == null) {
sections = null;
- tnArray = null;
- tsArray=null;
+ playsByCategory = null;
+ tsList=null;
return;
}
sections = value.Categories;
- tnArray = value.GetDataArray();
- tsArray = new TimeScale[sections.Count];
+ playsByCategory = value.PlaysGroupedByCategory;
+ tsList = new List<TimeScale>();
- frames = value.File.GetFrames();
- ushort fps = value.File.Fps;
+ frames = value.Description.File.GetFrames();
+ ushort fps = value.Description.File.Fps;
tr = new TimeReferenceWidget(frames,fps);
vbox1.PackStart(tr,false,false,0);
tr.Show();
- for (int i=0; i<sections.Count; i++) {
- TimeScale ts = new TimeScale(i,tnArray[i],frames,sections.GetColor(i));
- tsArray[i]=ts;
+
+ foreach (List<Play> playsList in playsByCategory) {
+ TimeScale ts = new TimeScale(i, playsList ,frames);
+ tsList[i]=ts;
ts.TimeNodeChanged += new TimeNodeChangedHandler(OnTimeNodeChanged);
ts.TimeNodeSelected += new TimeNodeSelectedHandler(OnTimeNodeSelected);
ts.TimeNodeDeleted += new TimeNodeDeletedHandler(OnTimeNodeDeleted);
ts.NewMarkAtFrameEvent += new NewMarkAtFrameEventHandler(OnNewMark);
vbox1.PackStart(ts,true,true,0);
ts.Show();
+ i++;
}
SetPixelRatio(3);
}
@@ -168,9 +172,9 @@ namespace LongoMatch.Gui.Component {
}
}
- protected virtual void OnNewMark(int section, int frame) {
+ protected virtual void OnNewMark(Category category, int frame) {
if (NewMarkEvent != null)
- NewMarkEvent(section,frame);
+ NewMarkEvent(category,frame);
}
protected virtual void OnTimeNodeChanged(TimeNode tn, object val) {
@@ -182,9 +186,9 @@ namespace LongoMatch.Gui.Component {
if (TimeNodeSelected != null)
TimeNodeSelected(tn);
}
- protected virtual void OnTimeNodeDeleted(Play tn, int section) {
+ protected virtual void OnTimeNodeDeleted(Play tn) {
if (TimeNodeDeleted != null)
- TimeNodeDeleted(tn,section);
+ TimeNodeDeleted(tn);
}
protected virtual void OnFitbuttonClicked(object sender, System.EventArgs e)
diff --git a/LongoMatch/Gui/Component/TimeScale.cs b/LongoMatch/Gui/Component/TimeScale.cs
index c16b1f0..7a95441 100644
--- a/LongoMatch/Gui/Component/TimeScale.cs
+++ b/LongoMatch/Gui/Component/TimeScale.cs
@@ -44,7 +44,7 @@ namespace LongoMatch.Gui.Component
private object locker;
- private int section;
+ private Category category;
private Cairo.Color color;
private List<Play> list;
@@ -70,14 +70,14 @@ namespace LongoMatch.Gui.Component
public event TimeNodeDeletedHandler TimeNodeDeleted;
- public TimeScale(int section,List<Play> list, uint frames,Gdk.Color color)
+ public TimeScale(int section,List<Play> list, uint frames)
{
- this.section = section;
+ this.category = list[0].Category;
this.frames = frames;
this.list = list;
HeightRequest= SECTION_HEIGHT;
Size((int)(frames/pixelRatio),SECTION_HEIGHT);
- this.color = RGBToCairoColor(color);
+ this.color = RGBToCairoColor(category.Color);
this.color.A = ALPHA;
Events = EventMask.PointerMotionMask | EventMask.ButtonPressMask | EventMask.ButtonReleaseMask ;
@@ -316,14 +316,14 @@ namespace LongoMatch.Gui.Component
protected void OnNewPlay(object obj, EventArgs args) {
if (NewMarkAtFrameEvent != null)
- NewMarkAtFrameEvent(section,cursorFrame);
+ NewMarkAtFrameEvent(category,cursorFrame);
}
protected void OnDelete(object obj, EventArgs args) {
Play tNode;
dic.TryGetValue((MenuItem)obj, out tNode);
if (TimeNodeDeleted != null && tNode != null) {
- TimeNodeDeleted(tNode, section);
+ TimeNodeDeleted(tNode);
}
}
diff --git a/LongoMatch/Gui/Dialog/EditCategoryDialog.cs b/LongoMatch/Gui/Dialog/EditCategoryDialog.cs
index 3e10dc4..631f3e8 100644
--- a/LongoMatch/Gui/Dialog/EditCategoryDialog.cs
+++ b/LongoMatch/Gui/Dialog/EditCategoryDialog.cs
@@ -52,7 +52,7 @@ namespace LongoMatch.Gui.Dialog
}
protected virtual void OnHotKeyChanged(HotKey prevHotKey, Category category) {
- if (hkList.Contains(section.HotKey)) {
+ if (hkList.Contains(category.HotKey)) {
MessagePopup.PopupMessage(this,MessageType.Warning,
Catalog.GetString("This hotkey is already in use."));
category.HotKey=prevHotKey;
diff --git a/LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs b/LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs
index 7f0ff72..d5c7a6a 100644
--- a/LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs
+++ b/LongoMatch/Gui/Dialog/PlayersSelectionDialog.cs
@@ -71,7 +71,7 @@ namespace LongoMatch.Gui.Dialog
pair.Key.Active = value.Contains(pair.Value);
}
get {
- var playersList = new List<Players>();
+ List<Player> playersList = new List<Player>();
foreach (var pair in checkButtonsDict){
if (pair.Key.Active)
playersList.Add(pair.Value);
diff --git a/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs b/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs
index efc54ce..f8c5d69 100644
--- a/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs
+++ b/LongoMatch/Gui/Dialog/ProjectTemplateEditorDialog.cs
@@ -36,7 +36,7 @@ namespace LongoMatch.Gui.Dialog
public Project Project {
set {
- projecttemplatewidget.SetProject(value);
+ projecttemplatewidget.Project = value;
}
}
diff --git a/LongoMatch/Gui/Dialog/ProjectsManager.cs b/LongoMatch/Gui/Dialog/ProjectsManager.cs
index 2c0ecbb..dd72244 100644
--- a/LongoMatch/Gui/Dialog/ProjectsManager.cs
+++ b/LongoMatch/Gui/Dialog/ProjectsManager.cs
@@ -25,6 +25,7 @@ using Mono.Unix;
using LongoMatch.Common;
using LongoMatch.DB;
using LongoMatch.Gui.Component;
+using LongoMatch.Video.Utils;
namespace LongoMatch.Gui.Dialog
{
@@ -81,7 +82,7 @@ namespace LongoMatch.Gui.Dialog
if (project == null)
return;
- if (project.File.FilePath == originalFilePath) {
+ if (project.Description.File.FilePath == originalFilePath) {
MainClass.DB.UpdateProject(project);
saveButton.Sensitive = false;
}
@@ -107,7 +108,8 @@ namespace LongoMatch.Gui.Dialog
return;
foreach (ProjectDescription selectedProject in selectedProjects) {
- if (openedProject != null && selectedProject.File == openedProject.File.FilePath) {
+ if (openedProject != null &&
+ selectedProject.File.FilePath == openedProject.Description.File.FilePath) {
MessagePopup.PopupMessage(this, MessageType.Warning,
Catalog.GetString("This Project is actually in use.")+"\n"+
Catalog.GetString("Close it first to allow its removal from the database"));
@@ -119,7 +121,7 @@ namespace LongoMatch.Gui.Dialog
Catalog.GetString("Do you really want to delete:")+
"\n"+selectedProject.Title);
if (md.Run()== (int)ResponseType.Yes) {
- MainClass.DB.RemoveProject(selectedProject.File);
+ MainClass.DB.RemoveProject(selectedProject.File.FilePath);
deletedProjects.Add (selectedProject);
}
md.Destroy();
@@ -171,15 +173,16 @@ namespace LongoMatch.Gui.Dialog
/* if only one project is selected try to load it in the editor */
project = projects[0];
- if (openedProject != null && project.File == openedProject.File.FilePath) {
+ if (openedProject != null &&
+ project.File.FilePath == openedProject.Description.File.FilePath) {
MessagePopup.PopupMessage(this, MessageType.Warning,
Catalog.GetString("The Project you are trying to load is actually in use.")+"\n" +Catalog.GetString("Close it first to edit it"));
Clear();
}
else {
projectdetails.Sensitive = true;
- projectdetails.SetProject(MainClass.DB.GetProject(project.File));
- originalFilePath = project.File;
+ projectdetails.SetProject(MainClass.DB.GetProject(project.File.FilePath));
+ originalFilePath = project.File.FilePath;
saveButton.Sensitive = false;
deleteButton.Sensitive = true;
exportbutton.Sensitive = true;
diff --git a/LongoMatch/Gui/Dialog/TemplatesEditor.cs b/LongoMatch/Gui/Dialog/TemplatesEditor.cs
index 48954ba..63b6d71 100644
--- a/LongoMatch/Gui/Dialog/TemplatesEditor.cs
+++ b/LongoMatch/Gui/Dialog/TemplatesEditor.cs
@@ -219,8 +219,7 @@ namespace LongoMatch.Gui.Dialog
CategoriesWriter.CreateNewTemplate(name+fileExtension);
}
else {
- TeamTemplate tt = new TeamTemplate();
- tt.CreateDefaultTemplate(count);
+ TeamTemplate tt = TeamTemplate.DefautlTemplate(count);
tt.Save(System.IO.Path.Combine(MainClass.TemplatesDir(), name+fileExtension));
}
diff --git a/LongoMatch/Gui/TreeView/CategoriesTreeView.cs b/LongoMatch/Gui/TreeView/CategoriesTreeView.cs
index 0f0f3aa..5c0cbdd 100644
--- a/LongoMatch/Gui/TreeView/CategoriesTreeView.cs
+++ b/LongoMatch/Gui/TreeView/CategoriesTreeView.cs
@@ -91,7 +91,7 @@ namespace LongoMatch.Gui.Component
private void RenderName(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
{
- SectionsTimeNode tNode = (SectionsTimeNode) model.GetValue(iter, 0);
+ Category tNode = (Category) model.GetValue(iter, 0);
(cell as Gtk.CellRendererText).Text = tNode.Name;
}
@@ -99,50 +99,50 @@ namespace LongoMatch.Gui.Component
private void RenderStartTime(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
{
- SectionsTimeNode tNode = (SectionsTimeNode) model.GetValue(iter, 0);
+ Category tNode = (Category) model.GetValue(iter, 0);
(cell as Gtk.CellRendererText).Text =tNode.Start.Seconds.ToString();
}
private void RenderStopTime(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
{
- SectionsTimeNode tNode = (SectionsTimeNode) model.GetValue(iter, 0);
+ Category tNode = (Category) model.GetValue(iter, 0);
(cell as Gtk.CellRendererText).Text = tNode.Stop.Seconds.ToString();
}
private void RenderColor(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
{
- SectionsTimeNode tNode = (SectionsTimeNode) model.GetValue(iter, 0);
+ Category tNode = (Category) model.GetValue(iter, 0);
(cell as Gtk.CellRendererText).CellBackgroundGdk = tNode.Color;
}
private void RenderHotKey(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
{
- SectionsTimeNode tNode = (SectionsTimeNode) Model.GetValue(iter, 0);
+ Category tNode = (Category) Model.GetValue(iter, 0);
(cell as Gtk.CellRendererText).Text = tNode.HotKey.ToString();
}
private void RenderSortMethod(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
{
- SectionsTimeNode tNode = (SectionsTimeNode) Model.GetValue(iter, 0);
+ Category tNode = (Category) Model.GetValue(iter, 0);
(cell as Gtk.CellRendererText).Text = tNode.SortMethodString;
}
protected virtual void OnSelectionChanged(object o, System.EventArgs e) {
TreeIter iter;
- List<SectionsTimeNode> list;
+ List<Category> list;
TreePath[] pathArray;
- list = new List<SectionsTimeNode>();
+ list = new List<Category>();
pathArray = Selection.GetSelectedRows();
for (int i=0; i< pathArray.Length; i++){
Model.GetIterFromString (out iter, pathArray[i].ToString());
- list.Add((SectionsTimeNode) Model.GetValue(iter, 0));
+ list.Add((Category) Model.GetValue(iter, 0));
}
if (SectionsSelected != null)
SectionsSelected(list);
@@ -152,7 +152,7 @@ namespace LongoMatch.Gui.Component
{
Gtk.TreeIter iter;
Model.GetIter(out iter, args.Path);
- SectionsTimeNode tNode = (SectionsTimeNode)Model.GetValue(iter, 0);
+ Category tNode = (Category)Model.GetValue(iter, 0);
if (SectionClicked != null)
SectionClicked(tNode);
diff --git a/LongoMatch/Gui/TreeView/ListTreeViewBase.cs b/LongoMatch/Gui/TreeView/ListTreeViewBase.cs
index b737503..096f2c1 100644
--- a/LongoMatch/Gui/TreeView/ListTreeViewBase.cs
+++ b/LongoMatch/Gui/TreeView/ListTreeViewBase.cs
@@ -49,7 +49,6 @@ namespace LongoMatch.Gui.Component
protected Gtk.CellRendererText nameCell;
protected Gtk.TreeViewColumn nameColumn;
- protected Color[] colors;
protected String[] teams_name;
protected bool editing;
protected bool projectIsLive;
@@ -75,7 +74,6 @@ namespace LongoMatch.Gui.Component
SetMenu();
ProjectIsLive = false;
PlayListLoaded = false;
- colors = null;
teams_name = new String[3];
teams_name[(int)Team.NONE] = Catalog.GetString(Catalog.GetString("None"));
@@ -98,11 +96,6 @@ namespace LongoMatch.Gui.Component
}
- public Color[] Colors {
- set {
- this.colors = value;
- }
- }
public bool ProjectIsLive{
set{
projectIsLive = value;
@@ -111,6 +104,11 @@ namespace LongoMatch.Gui.Component
}
}
+ public bool Colors{
+ get;
+ set;
+ }
+
public String LocalTeam {
set{
Label l1 = (local.Children[0] as Label);
@@ -225,10 +223,10 @@ namespace LongoMatch.Gui.Component
var item = model.GetValue(iter, 0);
var c = cell as CellRendererPixbuf;
- if (item is MediaTimeNode){
- c.Pixbuf = (item as MediaTimeNode).Miniature;
- if (colors !=null) {
- c.CellBackgroundGdk = colors[GetSectionFromIter(iter)];
+ if (item is Play){
+ c.Pixbuf = (item as Play).Miniature;
+ if (Colors) {
+ c.CellBackgroundGdk = (item as Play).Category.Color;
} else{
c.CellBackground = "white";
}
@@ -258,11 +256,10 @@ namespace LongoMatch.Gui.Component
return;
}
- if (o is MediaTimeNode){
- var mtn = o as MediaTimeNode;
- /* FIXME: the colors array is set externally and might not match the model!!! */
- if (colors !=null) {
- Color col = colors[GetSectionFromIter(iter)];
+ if (o is Play){
+ var mtn = o as Play;
+ if (Colors) {
+ Color col = mtn.Category.Color;
c.CellBackgroundGdk = col;
c.BackgroundGdk = col;
} else{
@@ -274,7 +271,7 @@ namespace LongoMatch.Gui.Component
c.Background = "white";
c.CellBackground = "white";
c.Markup = String.Format("{0} ({1})", (o as Player).Name, Model.IterNChildren(iter));
- }else if (o is SectionsTimeNode) {
+ }else if (o is Category) {
c.Background = "white";
c.CellBackground = "white";
c.Markup = String.Format("{0} ({1})", (o as TimeNode).Name, Model.IterNChildren(iter));
@@ -306,26 +303,27 @@ namespace LongoMatch.Gui.Component
this.Model.GetIter(out iter, args.Path);
object item = this.Model.GetValue(iter, 0);
- if (!(item is MediaTimeNode))
+ if (!(item is Play))
return;
if (TimeNodeSelected != null && !projectIsLive)
- this.TimeNodeSelected(item as MediaTimeNode);
+ this.TimeNodeSelected(item as Play);
}
protected void OnDeleted(object obj, EventArgs args) {
if (TimeNodeDeleted == null)
return;
- List<MediaTimeNode> list = new List<MediaTimeNode>();
+ List<Play> list = new List<Play>();
TreePath[] paths = Selection.GetSelectedRows();
for (int i=0; i<paths.Length; i++){
- list.Add((MediaTimeNode)GetValueFromPath(paths[i]));
+ list.Add((Play)GetValueFromPath(paths[i]));
}
// When a TimeNode is deleted from the tree the path changes.
// We need first to retrieve all the TimeNodes to delete using the
// current path of each one and then send the TimeNodeDeleted event
for (int i=0; i<paths.Length; i++){
- TimeNodeDeleted(list[i], int.Parse(paths[i].ToString().Split(':')[0]));
+ /*FIXME*/
+ //TimeNodeDeleted(list[i], int.Parse(paths[i].ToString().Split(':')[0]));
}
}
@@ -340,7 +338,7 @@ namespace LongoMatch.Gui.Component
if (md.Run() == (int)ResponseType.Yes){
TreePath[] paths = Selection.GetSelectedRows();
for (int i=0; i<paths.Length; i++){
- MediaTimeNode tNode = (MediaTimeNode)GetValueFromPath(paths[i]);
+ Play tNode = (Play)GetValueFromPath(paths[i]);
tNode.KeyFrameDrawing = null;
}
// Refresh the thumbnails
@@ -369,7 +367,7 @@ namespace LongoMatch.Gui.Component
TreePath[] paths = Selection.GetSelectedRows();
for (int i=0; i<paths.Length; i++){
- MediaTimeNode tNode = (MediaTimeNode)GetValueFromPath(paths[i]);
+ Play tNode = (Play)GetValueFromPath(paths[i]);
tNode.Team = team;
}
}
@@ -378,7 +376,7 @@ namespace LongoMatch.Gui.Component
if (PlayListNodeAdded != null){
TreePath[] paths = Selection.GetSelectedRows();
for (int i=0; i<paths.Length; i++){
- MediaTimeNode tNode = (MediaTimeNode)GetValueFromPath(paths[i]);
+ Play tNode = (Play)GetValueFromPath(paths[i]);
PlayListNodeAdded(tNode);
}
}
@@ -386,22 +384,22 @@ namespace LongoMatch.Gui.Component
protected void OnTag (object obj, EventArgs args){
if (TagPlay != null)
- TagPlay((MediaTimeNode)GetValueFromPath(Selection.GetSelectedRows()[0]));
+ TagPlay((Play)GetValueFromPath(Selection.GetSelectedRows()[0]));
}
protected void OnSnapshot(object obj, EventArgs args) {
if (SnapshotSeriesEvent != null)
- SnapshotSeriesEvent((MediaTimeNode)GetValueFromPath(Selection.GetSelectedRows()[0]));
+ SnapshotSeriesEvent((Play)GetValueFromPath(Selection.GetSelectedRows()[0]));
}
protected virtual void OnLocalPlayers(object o, EventArgs args) {
if (PlayersTagged != null)
- PlayersTagged((MediaTimeNode)GetValueFromPath(Selection.GetSelectedRows()[0]), Team.LOCAL);
+ PlayersTagged((Play)GetValueFromPath(Selection.GetSelectedRows()[0]), Team.LOCAL);
}
protected virtual void OnVisitorPlayers(object o, EventArgs args) {
if (PlayersTagged != null)
- PlayersTagged((MediaTimeNode)GetValueFromPath(Selection.GetSelectedRows()[0]), Team.VISITOR);
+ PlayersTagged((Play)GetValueFromPath(Selection.GetSelectedRows()[0]), Team.VISITOR);
}
protected abstract bool SelectFunction(TreeSelection selection, TreeModel model, TreePath path, bool selected);
diff --git a/LongoMatch/Gui/TreeView/PlayListTreeView.cs b/LongoMatch/Gui/TreeView/PlayListTreeView.cs
index 1d5e62b..b1b8689 100644
--- a/LongoMatch/Gui/TreeView/PlayListTreeView.cs
+++ b/LongoMatch/Gui/TreeView/PlayListTreeView.cs
@@ -102,7 +102,7 @@ namespace LongoMatch.Gui.Component
if (path!=null) {
ListStore list = ((ListStore)Model);
Model.GetIter(out selectedIter,path);
- selectedTimeNode = (PlayListTimeNode)(list.GetValue(selectedIter,0));
+ selectedTimeNode = (PlayListPlay)(list.GetValue(selectedIter,0));
setRate.Sensitive = selectedTimeNode == loadedTimeNode;
menu.Popup();
}
@@ -134,7 +134,7 @@ namespace LongoMatch.Gui.Component
private void RenderName(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
{
- PlayListTimeNode tNode = (PlayListTimeNode) model.GetValue(iter, 0);
+ PlayListPlay tNode = (PlayListPlay) model.GetValue(iter, 0);
(cell as Gtk.CellRendererText).Text = Catalog.GetString("Title")+": "+tNode.Name +"\n"+
Catalog.GetString("Start")+": "+tNode.Start.ToMSecondsString()+Catalog.GetString(" sec")+"\n"+
Catalog.GetString("Duration")+": "+tNode.Duration.ToMSecondsString()+Catalog.GetString(" sec")+"\n"+
diff --git a/LongoMatch/Gui/TreeView/PlayersTreeView.cs b/LongoMatch/Gui/TreeView/PlayersTreeView.cs
index 89f9ea7..40fb6a5 100644
--- a/LongoMatch/Gui/TreeView/PlayersTreeView.cs
+++ b/LongoMatch/Gui/TreeView/PlayersTreeView.cs
@@ -128,8 +128,8 @@ namespace LongoMatch.Gui.Component
if (paths.Length == 1) {
TimeNode selectedTimeNode = GetValueFromPath(paths[0]) as TimeNode;
- if (selectedTimeNode is MediaTimeNode) {
- deleteKeyFrame.Sensitive = (selectedTimeNode as MediaTimeNode).KeyFrameDrawing != null;
+ if (selectedTimeNode is Play) {
+ deleteKeyFrame.Sensitive = (selectedTimeNode as Play).KeyFrameDrawing != null;
MultiSelectMenu(false);
menu.Popup();
} else {
diff --git a/LongoMatch/Gui/TreeView/PlaysTreeView.cs b/LongoMatch/Gui/TreeView/PlaysTreeView.cs
index 587ca13..c54f909 100644
--- a/LongoMatch/Gui/TreeView/PlaysTreeView.cs
+++ b/LongoMatch/Gui/TreeView/PlaysTreeView.cs
@@ -56,15 +56,15 @@ namespace LongoMatch.Gui.Component
}
private void SetCategoriesMenu(){
- Action edit, sortMenu;
+ Gtk.Action edit, sortMenu;
UIManager manager;
ActionGroup g;
manager= new UIManager();
g = new ActionGroup("CategoriesMenuGroup");
- edit = new Action("EditAction", Mono.Unix.Catalog.GetString("Edit name"), null, "gtk-edit");
- sortMenu = new Action("SortMenuAction", Mono.Unix.Catalog.GetString("Sort Method"), null, null);
+ edit = new Gtk.Action("EditAction", Mono.Unix.Catalog.GetString("Edit name"), null, "gtk-edit");
+ sortMenu = new Gtk.Action("SortMenuAction", Mono.Unix.Catalog.GetString("Sort Method"), null, null);
sortByName = new Gtk.RadioAction("SortByNameAction", Mono.Unix.Catalog.GetString("Sort by name"), null, null, 1);
sortByStart = new Gtk.RadioAction("SortByStartAction", Mono.Unix.Catalog.GetString("Sort by start time"), null, null, 2);
sortByStop = new Gtk.RadioAction("SortByStopAction", Mono.Unix.Catalog.GetString("Sort by stop time"), null, null, 3);
@@ -128,7 +128,7 @@ namespace LongoMatch.Gui.Component
TimeNode tna, tnb;
TreeIter parent;
int depth;
- SectionsTimeNode category;
+ Category category;
if (model == null)
return 0;
@@ -152,7 +152,7 @@ namespace LongoMatch.Gui.Component
return int.Parse(model.GetPath(a).ToString())
- int.Parse(model.GetPath(b).ToString());
- category = model.GetValue(parent,0) as SectionsTimeNode;
+ category = model.GetValue(parent,0) as Category;
tna = model.GetValue (a, 0)as TimeNode;
tnb = model.GetValue (b, 0) as TimeNode;
@@ -171,11 +171,11 @@ namespace LongoMatch.Gui.Component
}
private void OnSortActivated (object o, EventArgs args){
- SectionsTimeNode category;
+ Category category;
RadioAction sender;
sender = o as RadioAction;
- category = GetValueFromPath(Selection.GetSelectedRows()[0]) as SectionsTimeNode;
+ category = GetValueFromPath(Selection.GetSelectedRows()[0]) as Category;
if (sender == sortByName)
category.SortMethod = SortMethodType.SortByName;
@@ -193,9 +193,9 @@ namespace LongoMatch.Gui.Component
// Don't allow multiselect for categories
if (!selected && selection.GetSelectedRows().Length > 0){
if (selection.GetSelectedRows().Length == 1 &&
- GetValueFromPath(selection.GetSelectedRows()[0]) is SectionsTimeNode)
+ GetValueFromPath(selection.GetSelectedRows()[0]) is Category)
return false;
- return !(GetValueFromPath(path) is SectionsTimeNode);
+ return !(GetValueFromPath(path) is Category);
}
// Always unselect
else
@@ -224,13 +224,13 @@ namespace LongoMatch.Gui.Component
if (paths.Length == 1) {
TimeNode selectedTimeNode = GetValueFromPath(paths[0]) as TimeNode;
- if (selectedTimeNode is MediaTimeNode) {
- deleteKeyFrame.Sensitive = (selectedTimeNode as MediaTimeNode).KeyFrameDrawing != null;
+ if (selectedTimeNode is Play) {
+ deleteKeyFrame.Sensitive = (selectedTimeNode as Play).KeyFrameDrawing != null;
MultiSelectMenu(false);
menu.Popup();
}
else{
- SetupSortMenu((selectedTimeNode as SectionsTimeNode).SortMethod);
+ SetupSortMenu((selectedTimeNode as Category).SortMethod);
categoriesMenu.Popup();
}
}
diff --git a/LongoMatch/Gui/TreeView/TagsTreeView.cs b/LongoMatch/Gui/TreeView/TagsTreeView.cs
index bbc67f7..8ae6195 100644
--- a/LongoMatch/Gui/TreeView/TagsTreeView.cs
+++ b/LongoMatch/Gui/TreeView/TagsTreeView.cs
@@ -52,7 +52,7 @@ namespace LongoMatch.Gui.Component
}
if (paths.Length == 1) {
- MediaTimeNode selectedTimeNode = GetValueFromPath(paths[0]) as MediaTimeNode;
+ Play selectedTimeNode = GetValueFromPath(paths[0]) as Play;
deleteKeyFrame.Sensitive = selectedTimeNode.KeyFrameDrawing != null;
MultiSelectMenu(false);
menu.Popup();
diff --git a/LongoMatch/Handlers/EventsManager.cs b/LongoMatch/Handlers/EventsManager.cs
index 1765c25..de8759b 100644
--- a/LongoMatch/Handlers/EventsManager.cs
+++ b/LongoMatch/Handlers/EventsManager.cs
@@ -306,7 +306,7 @@ namespace LongoMatch
}
}
- protected virtual void OnTimeNodeDeleted(Play play, Category category)
+ protected virtual void OnTimeNodeDeleted(Play play)
{
/* FIXME: WIP*/
treewidget.RemovePlay(play);
@@ -332,7 +332,6 @@ namespace LongoMatch
Start = play.Start,
Stop = play.Stop,
Name = play.Name,
- Duration = play.Stop - play.Start,
Rate = 1.0f,
});
}
@@ -444,7 +443,7 @@ namespace LongoMatch
}
protected virtual void OnTagPlay(Play tNode){
- TaggerDialog tagger = new TaggerDialog();
+ /*TaggerDialog tagger = new TaggerDialog();
tagger.ProjectTags = openedProject.Tags;
tagger.Tags = tNode.Tags;
tagger.TransientFor = (Gtk.Window)player.Toplevel;
@@ -454,7 +453,7 @@ namespace LongoMatch
openedProject.Tags.AddTag(tag);
}
tagsTreeWidget.UpdateTagsList();
- tagger.Destroy();
+ tagger.Destroy();*/
}
protected virtual void OnPlayersTagged(Play tNode, Team team) {
@@ -463,7 +462,7 @@ namespace LongoMatch
dialog.SetPlayersInfo(openedProject.LocalTeamTemplate);
dialog.PlayersChecked = tNode.LocalPlayers;
if (dialog.Run() == (int) ResponseType.Ok) {
- tNode.LocalPlayers = dialog.PlayersChecked;
+ //tNode.LocalPlayers = dialog.PlayersChecked;
localPlayersList.UpdatePlaysList(openedProject.GetLocalTeamModel());
}
}
@@ -472,7 +471,7 @@ namespace LongoMatch
dialog.SetPlayersInfo(openedProject.VisitorTeamTemplate);
dialog.PlayersChecked = tNode.VisitorPlayers;
if (dialog.Run() == (int) ResponseType.Ok) {
- tNode.VisitorPlayers = dialog.PlayersChecked;
+ //tNode.VisitorPlayers = dialog.PlayersChecked;
visitorPlayersList.UpdatePlaysList(openedProject.GetVisitorTeamModel());
}
}
diff --git a/LongoMatch/Handlers/Handlers.cs b/LongoMatch/Handlers/Handlers.cs
index 6f179e4..822eebe 100644
--- a/LongoMatch/Handlers/Handlers.cs
+++ b/LongoMatch/Handlers/Handlers.cs
@@ -44,7 +44,7 @@ namespace LongoMatch.Handlers
//A play was edited
public delegate void TimeNodeChangedHandler(TimeNode tNode, object val);
//A play was deleted
- public delegate void TimeNodeDeletedHandler(Play play, Category category);
+ public delegate void TimeNodeDeletedHandler(Play play);
//Players needs to be tagged
public delegate void PlayersTaggedHandler(Play play, Team team);
//Tag a play
diff --git a/LongoMatch/Handlers/HotKeysManager.cs b/LongoMatch/Handlers/HotKeysManager.cs
index a9912f6..0977532 100644
--- a/LongoMatch/Handlers/HotKeysManager.cs
+++ b/LongoMatch/Handlers/HotKeysManager.cs
@@ -45,7 +45,7 @@ namespace LongoMatch.Handlers
dic.Clear();
if (value == null)
return;
- foreach (Category cat in value) {
+ foreach (Category cat in value.CategoriesList) {
if (cat.HotKey.Defined &&
!dic.ContainsKey(cat.HotKey))
dic.Add(cat.HotKey, cat);
@@ -61,7 +61,7 @@ namespace LongoMatch.Handlers
hotkey.Key=args.Event.Key;
hotkey.Modifier=args.Event.State & (ModifierType.Mod1Mask | ModifierType.Mod5Mask | ModifierType.ShiftMask);
- if (dic.TryGetValue(hotkey, cat)) {
+ if (dic.TryGetValue(hotkey, out cat)) {
if (newMarkEvent != null) {
newMarkEvent(cat);
}
diff --git a/LongoMatch/IO/SectionsReader.cs b/LongoMatch/IO/SectionsReader.cs
index 9ab11ed..60e01a3 100644
--- a/LongoMatch/IO/SectionsReader.cs
+++ b/LongoMatch/IO/SectionsReader.cs
@@ -79,26 +79,26 @@ namespace LongoMatch.IO
#endregion
#region Public methods
- public Categories GetSections() {
- Sections sections = new Sections();
+ public Categories GetCategories() {
+ Categories categories = new Categories();
bool tryNext = true;
string name;
- Category tn;
+ Category cat;
for (int i=1;tryNext;i++) {
name = GetName(i);
if (name != null) {
- tn = new Category{
+ cat = new Category{
Name = name,
Start = GetStartTime(i),
Stop = GetStopTime(i),
HotKey = GetHotKey(i),
- Color = ColorGetColor(i)};
- tn.SortMethodString = GetSortMethod(i);
- sections.AddSection(tn);
+ Color = GetColor(i)};
+ cat.SortMethodString = GetSortMethod(i);
+ categories.AddCategory(cat);
}
else tryNext=false;
}
- return sections;
+ return categories;
}
#endregion
diff --git a/LongoMatch/IO/SectionsWriter.cs b/LongoMatch/IO/SectionsWriter.cs
index df2dc9f..96a816e 100644
--- a/LongoMatch/IO/SectionsWriter.cs
+++ b/LongoMatch/IO/SectionsWriter.cs
@@ -31,7 +31,7 @@ namespace LongoMatch.IO
{
- public class SectionsWriter
+ public class CategoriesWriter
{
diff --git a/LongoMatch/Main.cs b/LongoMatch/Main.cs
index cffc908..09a0f89 100644
--- a/LongoMatch/Main.cs
+++ b/LongoMatch/Main.cs
@@ -141,7 +141,7 @@ namespace LongoMatch
string fConfig;
fConfig = System.IO.Path.Combine(TemplatesDir(),"default.sct");
if (!System.IO.File.Exists(fConfig)) {
- SectionsWriter.CreateNewTemplate("default.sct");
+ CategoriesWriter.CreateNewTemplate("default.sct");
}
fConfig = System.IO.Path.Combine(TemplatesDir(),"default.tem");
diff --git a/LongoMatch/Time/Tag.cs b/LongoMatch/Time/Tag.cs
index 2ce2776..a230107 100644
--- a/LongoMatch/Time/Tag.cs
+++ b/LongoMatch/Time/Tag.cs
@@ -54,7 +54,7 @@ namespace LongoMatch.TimeNodes
public override int GetHashCode()
{
- return TagCategory.GetHashCode() && Text.GetHashCode();
+ return TagCategory.GetHashCode() + Value.GetHashCode();
}
}
}
diff --git a/LongoMatch/Utils/ProjectUtils.cs b/LongoMatch/Utils/ProjectUtils.cs
index 8027a06..c426104 100644
--- a/LongoMatch/Utils/ProjectUtils.cs
+++ b/LongoMatch/Utils/ProjectUtils.cs
@@ -107,12 +107,12 @@ namespace LongoMatch.Utils
return;
}
- isFake = (project.File.FilePath == Constants.FAKE_PROJECT);
+ isFake = (project.Description.File.FilePath == Constants.FAKE_PROJECT);
/* If it's a fake live project prompt for a video file and
* create a new PreviewMediaFile for this project */
if (isFake){
- project.File = null;
+ project.Description.File = null;
npd = new NewProjectDialog();
npd.TransientFor = window;
npd.Use = ProjectType.EditProject;
@@ -140,8 +140,9 @@ namespace LongoMatch.Utils
DialogFlags.Modal,
MessageType.Question,
Gtk.ButtonsType.YesNo,
- Catalog.GetString("A project already exists for the file:")+project.File.FilePath+
- "\n"+Catalog.GetString("Do you want to overwrite it?"));
+ Catalog.GetString("A project already exists for the file:")+
+ project.Description.File.FilePath+ "\n" +
+ Catalog.GetString("Do you want to overwrite it?"));
md.Icon=Stetic.IconLoader.LoadIcon(window, "longomatch", Gtk.IconSize.Dialog, 48);
res = md.Run();
md.Destroy();
@@ -277,9 +278,9 @@ namespace LongoMatch.Utils
/* Create all the thumbnails */
factory = new MultimediaFactory();
capturer = factory.getFramesCapturer();
- capturer.Open (project.File.FilePath);
- foreach (List<MediaTimeNode> list in project.GetDataArray()){
- foreach (MediaTimeNode play in list){
+ capturer.Open (project.Description.File.FilePath);
+ foreach (List<Play> list in project.PlaysGroupedByCategory){
+ foreach (Play play in list){
try{
capturer.SeekTime(play.Start.MSeconds + ((play.Stop - play.Start).MSeconds/2),
true);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
index 620681e..0986d2f 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
@@ -77,10 +77,13 @@ namespace LongoMatch.Gui.Component {
w3.Position = 0;
w3.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild
- this.timeadjustwidget1 = null;
+ this.timeadjustwidget1 = new LongoMatch.Gui.Component.TimeAdjustWidget();
+ this.timeadjustwidget1.Events = ((Gdk.EventMask)(256));
+ this.timeadjustwidget1.Name = "timeadjustwidget1";
this.vbox3.Add(this.timeadjustwidget1);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox3[this.timeadjustwidget1]));
w4.Position = 1;
+ w4.Expand = false;
w4.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild
this.hbox2 = new Gtk.HBox();
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
index 60a9a9e..1289afb 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
@@ -88,7 +88,6 @@ 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 4aeb5da..df52cd1 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayListWidget.cs
@@ -67,7 +67,10 @@ namespace LongoMatch.Gui.Component {
w2.Expand = false;
w2.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
- this.playlisttreeview1 = null;
+ this.playlisttreeview1 = new LongoMatch.Gui.Component.PlayListTreeView();
+ this.playlisttreeview1.Sensitive = false;
+ this.playlisttreeview1.CanFocus = true;
+ this.playlisttreeview1.Name = "playlisttreeview1";
this.vbox1.Add(this.playlisttreeview1);
Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.playlisttreeview1]));
w3.Position = 1;
@@ -207,6 +210,7 @@ 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.PlayersListTreeWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs
index d5eac8f..bf6fea1 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlayersListTreeWidget.cs
@@ -28,7 +28,9 @@ namespace LongoMatch.Gui.Component {
this.scrolledwindow1.Name = "scrolledwindow1";
this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
// Container child scrolledwindow1.Gtk.Container+ContainerChild
- this.playerstreeview = null;
+ this.playerstreeview = new LongoMatch.Gui.Component.PlayersTreeView();
+ this.playerstreeview.CanFocus = true;
+ this.playerstreeview.Name = "playerstreeview";
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 e539aa8..e154dac 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlaysListTreeWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.PlaysListTreeWidget.cs
@@ -30,7 +30,9 @@ namespace LongoMatch.Gui.Component {
Gtk.Viewport w1 = new Gtk.Viewport();
w1.ShadowType = ((Gtk.ShadowType)(0));
// Container child GtkViewport.Gtk.Container+ContainerChild
- this.treeview = null;
+ this.treeview = new LongoMatch.Gui.Component.PlaysTreeView();
+ this.treeview.CanFocus = true;
+ this.treeview.Name = "treeview";
w1.Add(this.treeview);
this.scrolledwindow1.Add(w1);
this.Add(this.scrolledwindow1);
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectTemplateWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectTemplateWidget.cs
index 54713a3..8f24b99 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectTemplateWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.ProjectTemplateWidget.cs
@@ -48,7 +48,9 @@ namespace LongoMatch.Gui.Component {
this.scrolledwindow2.Name = "scrolledwindow2";
this.scrolledwindow2.ShadowType = ((Gtk.ShadowType)(1));
// Container child scrolledwindow2.Gtk.Container+ContainerChild
- this.sectionstreeview1 = null;
+ this.sectionstreeview1 = new LongoMatch.Gui.Component.CategoriesTreeView();
+ this.sectionstreeview1.CanFocus = true;
+ this.sectionstreeview1.Name = "sectionstreeview1";
this.scrolledwindow2.Add(this.sectionstreeview1);
this.hbox1.Add(this.scrolledwindow2);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.scrolledwindow2]));
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs
index f72faa9..2dfe184 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs
@@ -45,7 +45,9 @@ namespace LongoMatch.Gui.Component {
this.GtkScrolledWindow.Name = "GtkScrolledWindow";
this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
- this.treeview = null;
+ this.treeview = new LongoMatch.Gui.Component.TagsTreeView();
+ this.treeview.CanFocus = true;
+ this.treeview.Name = "treeview";
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 b71ae2f..b52f120 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TeamTemplateWidget.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Component.TeamTemplateWidget.cs
@@ -34,7 +34,9 @@ namespace LongoMatch.Gui.Component {
this.scrolledwindow2.Name = "scrolledwindow2";
this.scrolledwindow2.ShadowType = ((Gtk.ShadowType)(1));
// Container child scrolledwindow2.Gtk.Container+ContainerChild
- this.playerpropertiestreeview1 = null;
+ this.playerpropertiestreeview1 = new LongoMatch.Gui.Component.PlayerPropertiesTreeView();
+ this.playerpropertiestreeview1.CanFocus = true;
+ this.playerpropertiestreeview1.Name = "playerpropertiestreeview1";
this.scrolledwindow2.Add(this.playerpropertiestreeview1);
this.hbox1.Add(this.scrolledwindow2);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.scrolledwindow2]));
@@ -44,6 +46,8 @@ 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.Dialog.DrawingTool.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
index 590a96d..0031aa7 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
@@ -51,7 +51,9 @@ namespace LongoMatch.Gui.Dialog {
this.vbox2.Name = "vbox2";
this.vbox2.Spacing = 6;
// Container child vbox2.Gtk.Box+BoxChild
- this.drawingtoolbox1 = null;
+ this.drawingtoolbox1 = new LongoMatch.Gui.Component.DrawingToolBox();
+ this.drawingtoolbox1.Events = ((Gdk.EventMask)(256));
+ this.drawingtoolbox1.Name = "drawingtoolbox1";
this.vbox2.Add(this.drawingtoolbox1);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.drawingtoolbox1]));
w2.Position = 0;
@@ -117,7 +119,9 @@ namespace LongoMatch.Gui.Dialog {
w21.Expand = false;
w21.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
- this.drawingwidget1 = null;
+ this.drawingwidget1 = new LongoMatch.Gui.Component.DrawingWidget();
+ this.drawingwidget1.Events = ((Gdk.EventMask)(256));
+ this.drawingwidget1.Name = "drawingwidget1";
this.hbox1.Add(this.drawingwidget1);
Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.hbox1[this.drawingwidget1]));
w22.Position = 1;
@@ -148,6 +152,10 @@ 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 e7f6284..b010df0 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
@@ -30,7 +30,9 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.timenodeproperties2 = null;
+ this.timenodeproperties2 = new LongoMatch.Gui.Component.CategoryProperties();
+ this.timenodeproperties2.Events = ((Gdk.EventMask)(256));
+ this.timenodeproperties2.Name = "timenodeproperties2";
w1.Add(this.timenodeproperties2);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.timenodeproperties2]));
w2.Position = 0;
@@ -55,7 +57,7 @@ namespace LongoMatch.Gui.Dialog {
if ((this.Child != null)) {
this.Child.ShowAll();
}
- this.DefaultWidth = 266;
+ this.DefaultWidth = 492;
this.DefaultHeight = 191;
this.Show();
}
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditPlayerDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditPlayerDialog.cs
index 056313c..6c556cc 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditPlayerDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.EditPlayerDialog.cs
@@ -32,7 +32,9 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.playerproperties1 = null;
+ this.playerproperties1 = new LongoMatch.Gui.Component.PlayerProperties();
+ this.playerproperties1.Events = ((Gdk.EventMask)(256));
+ this.playerproperties1.Name = "playerproperties1";
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.NewProjectDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs
index c5fc734..89d289e 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs
@@ -36,7 +36,12 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.fdwidget = null;
+ 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);
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 6fb6dda..eef9a74 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.OpenProjectDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.OpenProjectDialog.cs
@@ -35,7 +35,9 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.projectlistwidget = null;
+ this.projectlistwidget = new LongoMatch.Gui.Component.ProjectListWidget();
+ this.projectlistwidget.Events = ((Gdk.EventMask)(256));
+ this.projectlistwidget.Name = "projectlistwidget";
w1.Add(this.projectlistwidget);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.projectlistwidget]));
w2.Position = 0;
@@ -77,6 +79,7 @@ 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.ProjectTemplateEditorDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.cs
index 9a48ddb..8af9674 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog.cs
@@ -33,7 +33,10 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.projecttemplatewidget = null;
+ this.projecttemplatewidget = new LongoMatch.Gui.Component.ProjectTemplateWidget();
+ this.projecttemplatewidget.Events = ((Gdk.EventMask)(256));
+ this.projecttemplatewidget.Name = "projecttemplatewidget";
+ this.projecttemplatewidget.Edited = false;
w1.Add(this.projecttemplatewidget);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.projecttemplatewidget]));
w2.Position = 0;
@@ -58,7 +61,7 @@ namespace LongoMatch.Gui.Dialog {
if ((this.Child != null)) {
this.Child.ShowAll();
}
- this.DefaultWidth = 516;
+ this.DefaultWidth = 518;
this.DefaultHeight = 243;
this.Show();
}
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs
index d8cca3a..215d06b 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs
@@ -70,7 +70,9 @@ namespace LongoMatch.Gui.Dialog {
this.hpaned1.Name = "hpaned1";
this.hpaned1.Position = 349;
// Container child hpaned1.Gtk.Paned+PanedChild
- this.projectlistwidget1 = null;
+ this.projectlistwidget1 = new LongoMatch.Gui.Component.ProjectListWidget();
+ this.projectlistwidget1.Events = ((Gdk.EventMask)(256));
+ this.projectlistwidget1.Name = "projectlistwidget1";
this.hpaned1.Add(this.projectlistwidget1);
Gtk.Paned.PanedChild w2 = ((Gtk.Paned.PanedChild)(this.hpaned1[this.projectlistwidget1]));
w2.Resize = false;
@@ -87,7 +89,14 @@ namespace LongoMatch.Gui.Dialog {
this.GtkAlignment2.Name = "GtkAlignment2";
this.GtkAlignment2.LeftPadding = ((uint)(12));
// Container child GtkAlignment2.Gtk.Container+ContainerChild
- this.projectdetails = null;
+ 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.GtkAlignment2.Add(this.projectdetails);
this.frame1.Add(this.GtkAlignment2);
this.GtkLabel6 = new Gtk.Label();
@@ -194,9 +203,11 @@ namespace LongoMatch.Gui.Dialog {
if ((this.Child != null)) {
this.Child.ShowAll();
}
- this.DefaultWidth = 804;
+ this.DefaultWidth = 1006;
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.TaggerDialog.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs
index abcf366..969036a 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs
@@ -29,7 +29,9 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.taggerwidget1 = null;
+ this.taggerwidget1 = new LongoMatch.Gui.Component.TaggerWidget();
+ this.taggerwidget1.Events = ((Gdk.EventMask)(256));
+ this.taggerwidget1.Name = "taggerwidget1";
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 9850640..c090d0c 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TeamTemplateEditor.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TeamTemplateEditor.cs
@@ -32,7 +32,10 @@ namespace LongoMatch.Gui.Dialog {
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
- this.teamtemplatewidget1 = null;
+ this.teamtemplatewidget1 = new LongoMatch.Gui.Component.TeamTemplateWidget();
+ this.teamtemplatewidget1.Events = ((Gdk.EventMask)(256));
+ this.teamtemplatewidget1.Name = "teamtemplatewidget1";
+ this.teamtemplatewidget1.Edited = false;
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 4d6dc3a..71f4cba 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.TemplatesManager.cs
@@ -160,12 +160,20 @@ namespace LongoMatch.Gui.Dialog {
this.hbox1.Name = "hbox1";
this.hbox1.Spacing = 6;
// Container child hbox1.Gtk.Box+BoxChild
- this.sectionspropertieswidget1 = null;
+ 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.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 = null;
+ 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.hbox1.Add(this.teamtemplatewidget1);
Gtk.Box.BoxChild w33 = ((Gtk.Box.BoxChild)(this.hbox1[this.teamtemplatewidget1]));
w33.Position = 1;
@@ -196,6 +204,8 @@ 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 5aa89cd..3316b17 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -244,7 +244,9 @@ namespace LongoMatch.Gui {
this.notebook1.CurrentPage = 0;
this.notebook1.TabPos = ((Gtk.PositionType)(3));
// Container child notebook1.Gtk.Notebook+NotebookChild
- this.treewidget1 = null;
+ this.treewidget1 = new LongoMatch.Gui.Component.PlaysListTreeWidget();
+ this.treewidget1.Events = ((Gdk.EventMask)(256));
+ this.treewidget1.Name = "treewidget1";
this.notebook1.Add(this.treewidget1);
// Notebook tab
this.playslabel = new Gtk.Label();
@@ -253,7 +255,9 @@ namespace LongoMatch.Gui {
this.notebook1.SetTabLabel(this.treewidget1, this.playslabel);
this.playslabel.ShowAll();
// Container child notebook1.Gtk.Notebook+NotebookChild
- this.localplayerslisttreewidget = null;
+ this.localplayerslisttreewidget = new LongoMatch.Gui.Component.PlayersListTreeWidget();
+ this.localplayerslisttreewidget.Events = ((Gdk.EventMask)(256));
+ this.localplayerslisttreewidget.Name = "localplayerslisttreewidget";
this.notebook1.Add(this.localplayerslisttreewidget);
Gtk.Notebook.NotebookChild w5 = ((Gtk.Notebook.NotebookChild)(this.notebook1[this.localplayerslisttreewidget]));
w5.Position = 1;
@@ -264,7 +268,9 @@ namespace LongoMatch.Gui {
this.notebook1.SetTabLabel(this.localplayerslisttreewidget, this.localteamlabel);
this.localteamlabel.ShowAll();
// Container child notebook1.Gtk.Notebook+NotebookChild
- this.visitorplayerslisttreewidget = null;
+ this.visitorplayerslisttreewidget = new LongoMatch.Gui.Component.PlayersListTreeWidget();
+ this.visitorplayerslisttreewidget.Events = ((Gdk.EventMask)(256));
+ this.visitorplayerslisttreewidget.Name = "visitorplayerslisttreewidget";
this.notebook1.Add(this.visitorplayerslisttreewidget);
Gtk.Notebook.NotebookChild w6 = ((Gtk.Notebook.NotebookChild)(this.notebook1[this.visitorplayerslisttreewidget]));
w6.Position = 2;
@@ -275,7 +281,9 @@ namespace LongoMatch.Gui {
this.notebook1.SetTabLabel(this.visitorplayerslisttreewidget, this.visitorteamlabel);
this.visitorteamlabel.ShowAll();
// Container child notebook1.Gtk.Notebook+NotebookChild
- this.tagstreewidget1 = null;
+ this.tagstreewidget1 = new LongoMatch.Gui.Component.TagsTreeWidget();
+ this.tagstreewidget1.Events = ((Gdk.EventMask)(256));
+ this.tagstreewidget1.Name = "tagstreewidget1";
this.notebook1.Add(this.tagstreewidget1);
Gtk.Notebook.NotebookChild w7 = ((Gtk.Notebook.NotebookChild)(this.notebook1[this.tagstreewidget1]));
w7.Position = 3;
@@ -305,7 +313,9 @@ namespace LongoMatch.Gui {
this.videowidgetsbox.Name = "videowidgetsbox";
this.videowidgetsbox.Spacing = 6;
// Container child videowidgetsbox.Gtk.Box+BoxChild
- this.drawingtoolbox1 = null;
+ this.drawingtoolbox1 = new LongoMatch.Gui.Component.DrawingToolBox();
+ this.drawingtoolbox1.Events = ((Gdk.EventMask)(256));
+ this.drawingtoolbox1.Name = "drawingtoolbox1";
this.videowidgetsbox.Add(this.drawingtoolbox1);
Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.videowidgetsbox[this.drawingtoolbox1]));
w10.Position = 0;
@@ -331,13 +341,19 @@ 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 = null;
+ 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.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 = null;
+ this.buttonswidget1 = new LongoMatch.Gui.Component.ButtonsWidget();
+ this.buttonswidget1.Events = ((Gdk.EventMask)(256));
+ this.buttonswidget1.Name = "buttonswidget1";
this.vbox5.Add(this.buttonswidget1);
Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.vbox5[this.buttonswidget1]));
w15.Position = 2;
@@ -352,12 +368,17 @@ namespace LongoMatch.Gui {
this.rightvbox.Name = "rightvbox";
this.rightvbox.Spacing = 6;
// Container child rightvbox.Gtk.Box+BoxChild
- this.noteswidget1 = null;
+ this.noteswidget1 = new LongoMatch.Gui.Component.NotesWidget();
+ this.noteswidget1.Events = ((Gdk.EventMask)(256));
+ this.noteswidget1.Name = "noteswidget1";
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 = null;
+ this.playlistwidget2 = new LongoMatch.Gui.Component.PlayListWidget();
+ this.playlistwidget2.WidthRequest = 100;
+ this.playlistwidget2.Events = ((Gdk.EventMask)(256));
+ this.playlistwidget2.Name = "playlistwidget2";
this.rightvbox.Add(this.playlistwidget2);
Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.rightvbox[this.playlistwidget2]));
w18.Position = 1;
@@ -397,6 +418,11 @@ 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();
@@ -418,9 +444,11 @@ 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 9ffe2d8..bdf40dd 100644
--- a/LongoMatch/gtk-gui/gui.stetic
+++ b/LongoMatch/gtk-gui/gui.stetic
@@ -1112,7 +1112,7 @@
</widget>
</child>
</widget>
- <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.ProjectsManager" design-size="804 597">
+ <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.ProjectsManager" design-size="1006 597">
<property name="MemberName" />
<property name="Title" translatable="yes">Projects Manager</property>
<property name="Icon">stock:longomatch Dialog</property>
@@ -2231,7 +2231,7 @@
</widget>
</child>
</widget>
- <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.CategoryProperties" design-size="284 120">
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.CategoryProperties" design-size="479 120">
<property name="MemberName" />
<child>
<widget class="Gtk.VBox" id="vbox3">
@@ -2277,12 +2277,11 @@
<widget class="LongoMatch.Gui.Component.TimeAdjustWidget" id="timeadjustwidget1">
<property name="MemberName" />
<property name="Events">ButtonPressMask</property>
- <signal name="LeadTimeChanged" handler="OnTimeadjustwidget1LeadTimeChanged" />
- <signal name="LagTimeChanged" handler="OnTimeadjustwidget1LagTimeChanged" />
</widget>
<packing>
<property name="Position">1</property>
- <property name="AutoSize">False</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
@@ -2410,7 +2409,7 @@ Sort by duration</property>
</widget>
</child>
</widget>
- <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog" design-size="516 243">
+ <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.ProjectTemplateEditorDialog" design-size="518 243">
<property name="MemberName" />
<property name="Title" translatable="yes">Categories Template</property>
<property name="Icon">stock:longomatch Dialog</property>
@@ -4486,6 +4485,7 @@ Hotkeys with a single key are also allowed with Ctrl+key.</property>
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes" />
+ <property name="Active">True</property>
<property name="DrawIndicator">False</property>
<property name="HasLabel">False</property>
<property name="UseUnderline">True</property>
@@ -4812,7 +4812,7 @@ Show-><b> S</b>
</widget>
</child>
</widget>
- <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.EditCategoryDialog" design-size="266 191">
+ <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.EditCategoryDialog" design-size="492 191">
<property name="MemberName" />
<property name="Title" translatable="yes">Category Details</property>
<property name="Icon">resource:longomatch.png</property>
diff --git a/LongoMatch/gtk-gui/objects.xml b/LongoMatch/gtk-gui/objects.xml
index 960d155..aa72a78 100644
--- a/LongoMatch/gtk-gui/objects.xml
+++ b/LongoMatch/gtk-gui/objects.xml
@@ -16,7 +16,11 @@
</signals>
</object>
<object type="LongoMatch.Gui.Component.PlayersTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
- <itemgroups />
+ <itemgroups>
+ <itemgroup label="ListTreeViewBase Properties">
+ <property name="Colors" />
+ </itemgroup>
+ </itemgroups>
<signals>
<itemgroup label="PlayersTreeView Signals">
<signal name="TimeNodeSelected" />
@@ -47,7 +51,11 @@
</signals>
</object>
<object type="LongoMatch.Gui.Component.PlaysTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
- <itemgroups />
+ <itemgroups>
+ <itemgroup label="ListTreeViewBase Properties">
+ <property name="Colors" />
+ </itemgroup>
+ </itemgroups>
<signals>
<itemgroup label="PlaysTreeView Signals">
<signal name="TimeNodeChanged" />
@@ -112,7 +120,11 @@
</signals>
</object>
<object type="LongoMatch.Gui.Component.TagsTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
- <itemgroups />
+ <itemgroups>
+ <itemgroup label="ListTreeViewBase Properties">
+ <property name="Colors" />
+ </itemgroup>
+ </itemgroups>
<signals>
<itemgroup label="ListTreeViewBase Signals">
<signal name="TimeNodeChanged" />
@@ -145,10 +157,6 @@
</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>
@@ -166,6 +174,41 @@
<itemgroups />
<signals />
</object>
+ <object type="LongoMatch.Gui.Component.DrawingWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Component.ButtonsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals>
+ <itemgroup label="ButtonsWidget Signals">
+ <signal name="NewMarkEvent" />
+ <signal name="NewMarkStartEvent" />
+ <signal name="NewMarkStopEvent" />
+ </itemgroup>
+ </signals>
+ </object>
+ <object type="LongoMatch.Gui.Component.PlayListWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals>
+ <itemgroup label="PlayListWidget Signals">
+ <signal name="PlayListNodeSelected" />
+ <signal name="ApplyCurrentRate" />
+ <signal name="Progress" />
+ </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.ProjectDetailsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
<itemgroups>
<itemgroup label="ProjectDetailsWidget Properties">
@@ -185,31 +228,10 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.TagsTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
- <signals>
- <itemgroup label="TagsTreeWidget Signals">
- <signal name="TimeNodeSelected" />
- <signal name="TimeNodeChanged" />
- <signal name="PlayListNodeAdded" />
- <signal name="SnapshotSeriesEvent" />
- </itemgroup>
- </signals>
- </object>
- <object type="LongoMatch.Gui.Component.DrawingWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Popup.TransparentDrawingArea" palette-category="General" allow-children="false" base-type="Gtk.Window">
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.ButtonsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
- <signals>
- <itemgroup label="ButtonsWidget Signals">
- <signal name="NewMarkEvent" />
- <signal name="NewMarkStartEvent" />
- <signal name="NewMarkStopEvent" />
- </itemgroup>
- </signals>
- </object>
<object type="LongoMatch.Gui.Component.ProjectTemplateWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
<itemgroups>
<itemgroup label="ProjectTemplateWidget Properties">
@@ -233,16 +255,6 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.PlayListWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
- <signals>
- <itemgroup label="PlayListWidget Signals">
- <signal name="PlayListNodeSelected" />
- <signal name="ApplyCurrentRate" />
- <signal name="Progress" />
- </itemgroup>
- </signals>
- </object>
<object type="LongoMatch.Gui.Component.PlaysListTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals>
@@ -257,10 +269,10 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.PlayersListTreeWidget" palette-category="General" 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="PlayersListTreeWidget Signals">
+ <itemgroup label="TagsTreeWidget Signals">
<signal name="TimeNodeSelected" />
<signal name="TimeNodeChanged" />
<signal name="PlayListNodeAdded" />
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]