[longomatch] Add a component to edit analysis templates
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add a component to edit analysis templates
- Date: Mon, 7 Jul 2014 11:20:24 +0000 (UTC)
commit 69b9b4335095af606dfd182897197dbfc9d32ea3
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon Mar 24 19:00:46 2014 +0100
Add a component to edit analysis templates
.../Gui/Component/AnalysisTemplateEditor.cs | 59 +++++
LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs | 5 +
LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs | 184 +++++++++++++-
LongoMatch.GUI/LongoMatch.GUI.mdp | 2 +
...goMatch.Gui.Component.AnalysisTemplateEditor.cs | 95 +++++++
.../LongoMatch.Gui.Component.DrawingToolBox.cs | 1 -
.../LongoMatch.Gui.Panel.NewProjectPanel.cs | 1 +
.../LongoMatch.Gui.Panel.ProjectsManagerPanel.cs | 1 -
.../LongoMatch.Gui.Panel.SportsTemplatesPanel.cs | 183 +++++++++++++
.../gtk-gui/LongoMatch.Gui.Panel.WelcomePanel.cs | 1 -
LongoMatch.GUI/gtk-gui/gui.stetic | 270 +++++++++++++++++++-
LongoMatch.GUI/gtk-gui/objects.xml | 12 +
12 files changed, 802 insertions(+), 12 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/AnalysisTemplateEditor.cs
b/LongoMatch.GUI/Gui/Component/AnalysisTemplateEditor.cs
new file mode 100644
index 0000000..2458ae3
--- /dev/null
+++ b/LongoMatch.GUI/Gui/Component/AnalysisTemplateEditor.cs
@@ -0,0 +1,59 @@
+//
+// Copyright (C) 2014 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 LongoMatch.Store.Templates;
+
+namespace LongoMatch.Gui.Component
+{
+ [System.ComponentModel.ToolboxItem(true)]
+ public partial class AnalysisTemplateEditor : Gtk.Bin
+ {
+ bool edited;
+
+ public AnalysisTemplateEditor ()
+ {
+ this.Build ();
+ buttonswidget.Mode = LongoMatch.Common.TagMode.Predifined;
+ buttonswidget.NewMarkEvent += HandleNewMarkEvent;
+ categoryproperties.Visible = false;
+ }
+
+ public Categories Template {
+ set {
+ buttonswidget.Categories = value;
+ }
+ }
+
+ public bool Edited {
+ set {
+ edited = value;
+ }
+ get {
+ return edited;
+ }
+ }
+
+ void HandleNewMarkEvent (LongoMatch.Store.Category category)
+ {
+ categoryproperties.Visible = true;
+ categoryproperties.Category = category;
+ }
+
+ }
+}
+
diff --git a/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
b/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
index f3b48ef..2608e01 100644
--- a/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/ProjectsManagerPanel.cs
@@ -61,6 +61,7 @@ namespace LongoMatch.Gui.Panel
savebutton.Clicked += HandleSaveClicked;
exportbutton.Clicked += HandleExportClicked;
deletebutton.Clicked += HandleDeleteClicked;
+ templatebutton.Clicked += HandleTeamTemplateClicked;
calendarbutton.Clicked += HandleCalendarClicked;
notebook1.Page = 0;
}
@@ -176,6 +177,10 @@ namespace LongoMatch.Gui.Panel
loadedProject.Description.MatchDate = date;
datelabel.Text = date.ToShortDateString ();
}
+
+ void HandleTeamTemplateClicked (object sender, EventArgs e)
+ {
+ }
void HandleDeleteClicked (object sender, EventArgs e)
{
diff --git a/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
b/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
index 2342da0..cede9fd 100644
--- a/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/SportsTemplatesPanel.cs
@@ -16,16 +16,190 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
//
using System;
+using LongoMatch.Interfaces.GUI;
+using Gtk;
+using System.Collections.Generic;
+using LongoMatch.Store.Templates;
+using LongoMatch.Interfaces;
+using LongoMatch.Handlers;
+using Gdk;
+using Mono.Unix;
+using LongoMatch.Gui.Helpers;
+using LongoMatch.Gui.Dialog;
namespace LongoMatch.Gui.Panel
{
- [System.ComponentModel.ToolboxItem(true)]
- public partial class SportsTemplatesPanel : Gtk.Bin
+ [System.ComponentModel.ToolboxItem(true)]
+ public partial class SportsTemplatesPanel : Gtk.Bin, IPanel
+ {
+ public event BackEventHandle BackEvent;
+
+ ListStore templates;
+ List<string> selectedTemplate;
+ Categories loadedTemplate;
+
+ ICategoriesTemplatesProvider provider;
+
+ public SportsTemplatesPanel ()
{
- public SportsTemplatesPanel ()
- {
- this.Build ();
+ this.Build ();
+ provider = Config.CategoriesTemplatesProvider;
+
+ templates = new ListStore (typeof(Pixbuf), typeof(string));
+
+ templatestreeview.Model = templates;
+ templatestreeview.Model = templates;
+ templatestreeview.HeadersVisible = false;
+ templatestreeview.AppendColumn ("Icon", new CellRendererPixbuf (), "pixbuf", 0);
+ templatestreeview.AppendColumn ("Text", new CellRendererText (), "text", 1);
+ templatestreeview.SearchColumn = 1;
+ templatestreeview.EnableGridLines = TreeViewGridLines.None;
+ templatestreeview.CursorChanged += HandleSelectionChanged;
+
+ teamsvbox.WidthRequest = 280;
+
+ //teamtemplateeditor1.Visible = false;
+ newteam.Visible = true;
+ deleteteambutton.Visible = false;
+
+ selectedTemplate = new List<string>();
+ newteam.Clicked += HandleNewTeamClicked;
+ deleteteambutton.Clicked += HandleDeleteTeamClicked;
+
+ backbutton.Clicked += (sender, o) => {
+ if (BackEvent != null)
+ BackEvent();
+ };
+ Load (null);
+
+ }
+
+ void Load (string templateName) {
+ TreeIter templateIter = TreeIter.Zero;
+ bool first = true;
+
+ templates.Clear ();
+ foreach (Categories template in provider.Templates) {
+ Pixbuf img;
+ TreeIter iter;
+
+ if (template.Image != null)
+ img = template.Image.Value;
+ else
+ img = Gdk.Pixbuf.LoadFromResource ("logo.svg");
+
+ iter = templates.AppendValues (img, template.Name);
+ if (first || template.Name == templateName) {
+ templateIter = iter;
}
+ first = false;
+ }
+ if (templates.IterIsValid (templateIter)) {
+ templatestreeview.Selection.SelectIter (templateIter);
+ HandleSelectionChanged (null, null);
+ }
+ }
+
+ void LoadTemplate (string templateName) {
+ if (loadedTemplate != null && analysistemplateeditor.Edited) {
+ string msg = Catalog.GetString ("Do you want to save the current template");
+ if (Config.GUIToolkit.QuestionMessage (msg, null, this)) {
+ provider.Update (loadedTemplate);
+ } else {
+ return;
+ }
+ }
+
+ try {
+ loadedTemplate = provider.Load (templateName);
+ analysistemplateeditor.Template = loadedTemplate;
+ } catch (Exception ex) {
+ Log.Exception (ex);
+ GUIToolkit.Instance.ErrorMessage (Catalog.GetString ("Could not load
template"));
+ return;
+ }
+ }
+
+ void HandleSelectionChanged (object sender, EventArgs e)
+ {
+ TreeIter iter;
+ TreePath[] pathArray;
+
+ selectedTemplate.Clear ();
+
+ pathArray = templatestreeview.Selection.GetSelectedRows ();
+ for(int i=0; i< pathArray.Length; i++) {
+ templatestreeview.Model.GetIterFromString (out iter, pathArray[i].ToString());
+ selectedTemplate.Add (templatestreeview.Model.GetValue (iter, 1) as string);
+ }
+
+ deleteteambutton.Visible = selectedTemplate.Count >= 1;
+ analysistemplateeditor.Visible = true;
+
+ if (selectedTemplate.Count == 1) {
+ LoadTemplate (selectedTemplate[0]);
+ }
+ }
+
+ void HandleDeleteTeamClicked (object sender, EventArgs e)
+ {
+ foreach (string teamName in selectedTemplate) {
+ if (teamName == "default") {
+ MessagesHelpers.ErrorMessage (this,
+ Catalog.GetString ("The default template can't be deleted"));
+ continue;
+ }
+ string msg = Catalog.GetString("Do you really want to delete the template: ")
+ teamName;
+ if (MessagesHelpers.QuestionMessage (this, msg, null)) {
+ provider.Delete (teamName);
+ }
+ }
+ Load ("default");
+ }
+
+ void HandleNewTeamClicked (object sender, EventArgs e)
+ {
+ bool create = false;
+
+ EntryDialog dialog = new EntryDialog();
+ dialog.TransientFor = (Gtk.Window)this.Toplevel;
+ dialog.ShowCount = true;
+ dialog.Text = Catalog.GetString("New team");
+ dialog.AvailableTemplates = provider.TemplatesNames;
+
+ while (dialog.Run() == (int)ResponseType.Ok) {
+ if (dialog.Text == "") {
+ MessagesHelpers.ErrorMessage (dialog, Catalog.GetString("The template
name is empty."));
+ continue;
+ } else if (dialog.Text == "default") {
+ MessagesHelpers.ErrorMessage (dialog, Catalog.GetString("The template
can't be named 'default'."));
+ continue;
+ } else if(provider.Exists(dialog.Text)) {
+ var msg = Catalog.GetString("The template already exists. " +
+ "Do you want to overwrite it ?");
+ if (MessagesHelpers.QuestionMessage (this, msg)) {
+ create = true;
+ break;
+ }
+ } else {
+ create = true;
+ break;
+ }
+ }
+
+ if (create) {
+ if (dialog.SelectedTemplate != null) {
+ provider.Copy (dialog.SelectedTemplate, dialog.Text);
+ } else {
+ Categories template;
+ template = Categories.DefaultTemplate (dialog.Count);
+ template.Name = dialog.Text;
+ provider.Save (template);
+ }
+ Load (dialog.Text);
+ }
+ dialog.Destroy();
+ }
}
}
diff --git a/LongoMatch.GUI/LongoMatch.GUI.mdp b/LongoMatch.GUI/LongoMatch.GUI.mdp
index fabeb1e..7f8125c 100644
--- a/LongoMatch.GUI/LongoMatch.GUI.mdp
+++ b/LongoMatch.GUI/LongoMatch.GUI.mdp
@@ -199,6 +199,8 @@
<File subtype="Code" buildaction="Compile" name="Gui/Panel/SportsTemplatesPanel.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Panel.SportsTemplatesPanel.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.CalendarDialog.cs" />
+ <File subtype="Code" buildaction="Compile" name="Gui/Component/AnalysisTemplateEditor.cs" />
+ <File subtype="Code" buildaction="Compile"
name="gtk-gui/LongoMatch.Gui.Component.AnalysisTemplateEditor.cs" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="atk-sharp, Version=2.12.0.0, Culture=neutral,
PublicKeyToken=35e10195dab3c99f" />
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.AnalysisTemplateEditor.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.AnalysisTemplateEditor.cs
new file mode 100644
index 0000000..634e51e
--- /dev/null
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.AnalysisTemplateEditor.cs
@@ -0,0 +1,95 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace LongoMatch.Gui.Component
+{
+ public partial class AnalysisTemplateEditor
+ {
+ private global::Gtk.VBox vbox2;
+ private global::Gtk.HBox hbox1;
+ private global::LongoMatch.Gui.Component.ButtonsWidget buttonswidget;
+ private global::LongoMatch.Gui.Component.CategoryProperties categoryproperties;
+ private global::Gtk.HButtonBox hbuttonbox2;
+ private global::Gtk.Button button486;
+ private global::Gtk.Button button485;
+ private global::Gtk.Button button484;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget LongoMatch.Gui.Component.AnalysisTemplateEditor
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "LongoMatch.Gui.Component.AnalysisTemplateEditor";
+ // Container child
LongoMatch.Gui.Component.AnalysisTemplateEditor.Gtk.Container+ContainerChild
+ this.vbox2 = new global::Gtk.VBox ();
+ this.vbox2.Name = "vbox2";
+ this.vbox2.Spacing = 6;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.hbox1 = new global::Gtk.HBox ();
+ this.hbox1.Name = "hbox1";
+ this.hbox1.Spacing = 6;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.buttonswidget = new global::LongoMatch.Gui.Component.ButtonsWidget ();
+ this.buttonswidget.Events = ((global::Gdk.EventMask)(256));
+ this.buttonswidget.Name = "buttonswidget";
+ this.hbox1.Add (this.buttonswidget);
+ global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox1
[this.buttonswidget]));
+ w1.Position = 0;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.categoryproperties = new global::LongoMatch.Gui.Component.CategoryProperties ();
+ this.categoryproperties.Events = ((global::Gdk.EventMask)(256));
+ this.categoryproperties.Name = "categoryproperties";
+ this.hbox1.Add (this.categoryproperties);
+ global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1
[this.categoryproperties]));
+ w2.Position = 1;
+ w2.Expand = false;
+ w2.Fill = false;
+ this.vbox2.Add (this.hbox1);
+ global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
+ w3.Position = 0;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.hbuttonbox2 = new global::Gtk.HButtonBox ();
+ this.hbuttonbox2.Name = "hbuttonbox2";
+ // Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild
+ this.button486 = new global::Gtk.Button ();
+ this.button486.CanFocus = true;
+ this.button486.Name = "button486";
+ this.button486.UseUnderline = true;
+ this.button486.Label = global::Mono.Unix.Catalog.GetString ("GtkButton");
+ this.hbuttonbox2.Add (this.button486);
+ global::Gtk.ButtonBox.ButtonBoxChild w4 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.button486]));
+ w4.Expand = false;
+ w4.Fill = false;
+ // Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild
+ this.button485 = new global::Gtk.Button ();
+ this.button485.CanFocus = true;
+ this.button485.Name = "button485";
+ this.button485.UseUnderline = true;
+ this.button485.Label = global::Mono.Unix.Catalog.GetString ("GtkButton");
+ this.hbuttonbox2.Add (this.button485);
+ global::Gtk.ButtonBox.ButtonBoxChild w5 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.button485]));
+ w5.Position = 1;
+ w5.Expand = false;
+ w5.Fill = false;
+ // Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild
+ this.button484 = new global::Gtk.Button ();
+ this.button484.CanFocus = true;
+ this.button484.Name = "button484";
+ this.button484.UseUnderline = true;
+ this.button484.Label = global::Mono.Unix.Catalog.GetString ("GtkButton");
+ this.hbuttonbox2.Add (this.button484);
+ global::Gtk.ButtonBox.ButtonBoxChild w6 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.button484]));
+ w6.Position = 2;
+ w6.Expand = false;
+ w6.Fill = false;
+ this.vbox2.Add (this.hbuttonbox2);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox2
[this.hbuttonbox2]));
+ w7.Position = 1;
+ w7.Expand = false;
+ this.Add (this.vbox2);
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ }
+ }
+}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
index 54bfdc5..8feb7f2 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.DrawingToolBox.cs
@@ -58,7 +58,6 @@ namespace LongoMatch.Gui.Component
this.circlebutton = new global::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 global::GLib.SList (global::System.IntPtr.Zero);
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.NewProjectPanel.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.NewProjectPanel.cs
index 59deb26..3f1434b 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.NewProjectPanel.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.NewProjectPanel.cs
@@ -143,6 +143,7 @@ namespace LongoMatch.Gui.Panel
this.fromfileradiobutton = new global::Gtk.RadioButton
(global::Mono.Unix.Catalog.GetString ("New project using a video file"));
this.fromfileradiobutton.CanFocus = true;
this.fromfileradiobutton.Name = "fromfileradiobutton";
+ this.fromfileradiobutton.Active = true;
this.fromfileradiobutton.DrawIndicator = true;
this.fromfileradiobutton.UseUnderline = true;
this.fromfileradiobutton.FocusOnClick = false;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.ProjectsManagerPanel.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.ProjectsManagerPanel.cs
index 4169e1e..a392384 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.ProjectsManagerPanel.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.ProjectsManagerPanel.cs
@@ -463,7 +463,6 @@ namespace LongoMatch.Gui.Panel
w61.Position = 0;
// Container child rbox.Gtk.Box+BoxChild
this.hbuttonbox1 = new global::Gtk.HButtonBox ();
- this.hbuttonbox1.Name = "hbuttonbox1";
// Container child hbuttonbox1.Gtk.ButtonBox+ButtonBoxChild
this.savebutton = new global::Gtk.Button ();
this.savebutton.Sensitive = false;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.SportsTemplatesPanel.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.SportsTemplatesPanel.cs
index e35cec0..13d700a 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.SportsTemplatesPanel.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.SportsTemplatesPanel.cs
@@ -4,12 +4,195 @@ namespace LongoMatch.Gui.Panel
{
public partial class SportsTemplatesPanel
{
+ private global::Gtk.VBox vbox3;
+ private global::Gtk.HBox hbox1;
+ private global::Gtk.VBox teamsvbox;
+ private global::Gtk.Frame frame4;
+ private global::Gtk.Alignment GtkAlignment7;
+ private global::Gtk.ScrolledWindow GtkScrolledWindow1;
+ private global::Gtk.TreeView templatestreeview;
+ private global::Gtk.Label GtkLabel7;
+ private global::Gtk.HButtonBox hbuttonbox4;
+ private global::Gtk.Button newteam;
+ private global::Gtk.Button deleteteambutton;
+ private global::Gtk.VSeparator vseparator2;
+ private global::LongoMatch.Gui.Component.AnalysisTemplateEditor analysistemplateeditor;
+ private global::Gtk.HSeparator hseparator1;
+ private global::Gtk.HButtonBox hbuttonbox3;
+ private global::Gtk.Button backbutton;
+
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
// Widget LongoMatch.Gui.Panel.SportsTemplatesPanel
global::Stetic.BinContainer.Attach (this);
this.Name = "LongoMatch.Gui.Panel.SportsTemplatesPanel";
+ // Container child
LongoMatch.Gui.Panel.SportsTemplatesPanel.Gtk.Container+ContainerChild
+ this.vbox3 = new global::Gtk.VBox ();
+ this.vbox3.Name = "vbox3";
+ this.vbox3.Spacing = 6;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.hbox1 = new global::Gtk.HBox ();
+ this.hbox1.Name = "hbox1";
+ this.hbox1.Spacing = 6;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.teamsvbox = new global::Gtk.VBox ();
+ this.teamsvbox.WidthRequest = 280;
+ this.teamsvbox.Name = "teamsvbox";
+ this.teamsvbox.Spacing = 6;
+ // Container child teamsvbox.Gtk.Box+BoxChild
+ this.frame4 = new global::Gtk.Frame ();
+ this.frame4.Name = "frame4";
+ this.frame4.ShadowType = ((global::Gtk.ShadowType)(0));
+ // Container child frame4.Gtk.Container+ContainerChild
+ this.GtkAlignment7 = new global::Gtk.Alignment (0F, 0F, 1F, 1F);
+ this.GtkAlignment7.Name = "GtkAlignment7";
+ this.GtkAlignment7.LeftPadding = ((uint)(12));
+ // Container child GtkAlignment7.Gtk.Container+ContainerChild
+ this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow ();
+ this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
+ this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1));
+ // Container child GtkScrolledWindow1.Gtk.Container+ContainerChild
+ this.templatestreeview = new global::Gtk.TreeView ();
+ this.templatestreeview.CanFocus = true;
+ this.templatestreeview.Name = "templatestreeview";
+ this.GtkScrolledWindow1.Add (this.templatestreeview);
+ this.GtkAlignment7.Add (this.GtkScrolledWindow1);
+ this.frame4.Add (this.GtkAlignment7);
+ this.GtkLabel7 = new global::Gtk.Label ();
+ this.GtkLabel7.Name = "GtkLabel7";
+ this.GtkLabel7.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Analysis
templates</b>");
+ this.GtkLabel7.UseMarkup = true;
+ this.frame4.LabelWidget = this.GtkLabel7;
+ this.teamsvbox.Add (this.frame4);
+ global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.teamsvbox
[this.frame4]));
+ w4.Position = 0;
+ // Container child teamsvbox.Gtk.Box+BoxChild
+ this.hbuttonbox4 = new global::Gtk.HButtonBox ();
+ this.hbuttonbox4.Name = "hbuttonbox4";
+ // Container child hbuttonbox4.Gtk.ButtonBox+ButtonBoxChild
+ this.newteam = new global::Gtk.Button ();
+ this.newteam.CanFocus = true;
+ this.newteam.Name = "newteam";
+ this.newteam.UseUnderline = true;
+ // Container child newteam.Gtk.Container+ContainerChild
+ global::Gtk.Alignment w5 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
+ // Container child GtkAlignment.Gtk.Container+ContainerChild
+ global::Gtk.HBox w6 = new global::Gtk.HBox ();
+ w6.Spacing = 2;
+ // Container child GtkHBox.Gtk.Container+ContainerChild
+ global::Gtk.Image w7 = new global::Gtk.Image ();
+ w7.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-add",
global::Gtk.IconSize.Dialog);
+ w6.Add (w7);
+ // Container child GtkHBox.Gtk.Container+ContainerChild
+ global::Gtk.Label w9 = new global::Gtk.Label ();
+ w9.LabelProp = global::Mono.Unix.Catalog.GetString ("New");
+ w9.UseUnderline = true;
+ w6.Add (w9);
+ w5.Add (w6);
+ this.newteam.Add (w5);
+ this.hbuttonbox4.Add (this.newteam);
+ global::Gtk.ButtonBox.ButtonBoxChild w13 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox4 [this.newteam]));
+ w13.Expand = false;
+ w13.Fill = false;
+ // Container child hbuttonbox4.Gtk.ButtonBox+ButtonBoxChild
+ this.deleteteambutton = new global::Gtk.Button ();
+ this.deleteteambutton.CanFocus = true;
+ this.deleteteambutton.Name = "deleteteambutton";
+ this.deleteteambutton.UseUnderline = true;
+ // Container child deleteteambutton.Gtk.Container+ContainerChild
+ global::Gtk.Alignment w14 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
+ // Container child GtkAlignment.Gtk.Container+ContainerChild
+ global::Gtk.HBox w15 = new global::Gtk.HBox ();
+ w15.Spacing = 2;
+ // Container child GtkHBox.Gtk.Container+ContainerChild
+ global::Gtk.Image w16 = new global::Gtk.Image ();
+ w16.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-remove",
global::Gtk.IconSize.Dialog);
+ w15.Add (w16);
+ // Container child GtkHBox.Gtk.Container+ContainerChild
+ global::Gtk.Label w18 = new global::Gtk.Label ();
+ w18.LabelProp = global::Mono.Unix.Catalog.GetString ("Delete");
+ w18.UseUnderline = true;
+ w15.Add (w18);
+ w14.Add (w15);
+ this.deleteteambutton.Add (w14);
+ this.hbuttonbox4.Add (this.deleteteambutton);
+ global::Gtk.ButtonBox.ButtonBoxChild w22 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox4 [this.deleteteambutton]));
+ w22.Position = 1;
+ w22.Expand = false;
+ w22.Fill = false;
+ this.teamsvbox.Add (this.hbuttonbox4);
+ global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.teamsvbox
[this.hbuttonbox4]));
+ w23.Position = 1;
+ w23.Expand = false;
+ w23.Fill = false;
+ this.hbox1.Add (this.teamsvbox);
+ global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.hbox1
[this.teamsvbox]));
+ w24.Position = 0;
+ w24.Expand = false;
+ w24.Fill = false;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.vseparator2 = new global::Gtk.VSeparator ();
+ this.vseparator2.Name = "vseparator2";
+ this.hbox1.Add (this.vseparator2);
+ global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.hbox1
[this.vseparator2]));
+ w25.Position = 1;
+ w25.Expand = false;
+ w25.Fill = false;
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.analysistemplateeditor = new
global::LongoMatch.Gui.Component.AnalysisTemplateEditor ();
+ this.analysistemplateeditor.Events = ((global::Gdk.EventMask)(256));
+ this.analysistemplateeditor.Name = "analysistemplateeditor";
+ this.analysistemplateeditor.Edited = false;
+ this.hbox1.Add (this.analysistemplateeditor);
+ global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.hbox1
[this.analysistemplateeditor]));
+ w26.Position = 2;
+ this.vbox3.Add (this.hbox1);
+ global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox1]));
+ w27.Position = 0;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.hseparator1 = new global::Gtk.HSeparator ();
+ this.hseparator1.Name = "hseparator1";
+ this.vbox3.Add (this.hseparator1);
+ global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.hseparator1]));
+ w28.Position = 1;
+ w28.Expand = false;
+ w28.Fill = false;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.hbuttonbox3 = new global::Gtk.HButtonBox ();
+ this.hbuttonbox3.Name = "hbuttonbox3";
+ this.hbuttonbox3.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(3));
+ // Container child hbuttonbox3.Gtk.ButtonBox+ButtonBoxChild
+ this.backbutton = new global::Gtk.Button ();
+ this.backbutton.CanFocus = true;
+ this.backbutton.Name = "backbutton";
+ this.backbutton.UseUnderline = true;
+ // Container child backbutton.Gtk.Container+ContainerChild
+ global::Gtk.Alignment w29 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
+ // Container child GtkAlignment.Gtk.Container+ContainerChild
+ global::Gtk.HBox w30 = new global::Gtk.HBox ();
+ w30.Spacing = 2;
+ // Container child GtkHBox.Gtk.Container+ContainerChild
+ global::Gtk.Image w31 = new global::Gtk.Image ();
+ w31.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-back",
global::Gtk.IconSize.Dialog);
+ w30.Add (w31);
+ // Container child GtkHBox.Gtk.Container+ContainerChild
+ global::Gtk.Label w33 = new global::Gtk.Label ();
+ w33.LabelProp = global::Mono.Unix.Catalog.GetString ("_Back");
+ w33.UseUnderline = true;
+ w30.Add (w33);
+ w29.Add (w30);
+ this.backbutton.Add (w29);
+ this.hbuttonbox3.Add (this.backbutton);
+ global::Gtk.ButtonBox.ButtonBoxChild w37 =
((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox3 [this.backbutton]));
+ w37.Expand = false;
+ w37.Fill = false;
+ this.vbox3.Add (this.hbuttonbox3);
+ global::Gtk.Box.BoxChild w38 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.hbuttonbox3]));
+ w38.Position = 2;
+ w38.Expand = false;
+ w38.Fill = false;
+ this.Add (this.vbox3);
if ((this.Child != null)) {
this.Child.ShowAll ();
}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.WelcomePanel.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.WelcomePanel.cs
index e101721..4419a43 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.WelcomePanel.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.WelcomePanel.cs
@@ -48,7 +48,6 @@ namespace LongoMatch.Gui.Panel
w2.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.hbuttonbox1 = new global::Gtk.HButtonBox ();
- this.hbuttonbox1.Name = "hbuttonbox1";
this.hbuttonbox1.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(1));
// Container child hbuttonbox1.Gtk.ButtonBox+ButtonBoxChild
this.newbutton = new global::Gtk.Button ();
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 2665e25..7e6f9aa 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -2635,7 +2635,6 @@ 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>
@@ -7419,6 +7418,7 @@ Defining <b> Game Units </b> will help you during the analysis to in
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">New project using a video
file</property>
+ <property name="Active">True</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
@@ -8691,7 +8691,7 @@ Defining <b> Game Units </b> will help you during the analysis to in
</child>
</widget>
<packing>
- <property name="Position">1</property>
+ <property name="Position">2</property>
<property name="AutoSize">False</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -10028,11 +10028,273 @@ Defining <b> Game Units </b> will help you during the analysis to in
</widget>
</child>
</widget>
- <widget class="Gtk.Bin" id="LongoMatch.Gui.Panel.SportsTemplatesPanel" design-size="300 300">
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Panel.SportsTemplatesPanel" design-size="1087 501">
<property name="MemberName" />
<property name="Visible">False</property>
<child>
- <placeholder />
+ <widget class="Gtk.VBox" id="vbox3">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.VBox" id="teamsvbox">
+ <property name="MemberName" />
+ <property name="WidthRequest">280</property>
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Frame" id="frame4">
+ <property name="MemberName" />
+ <property name="ShadowType">None</property>
+ <child>
+ <widget class="Gtk.Alignment" id="GtkAlignment7">
+ <property name="MemberName" />
+ <property name="Xalign">0</property>
+ <property name="Yalign">0</property>
+ <property name="LeftPadding">12</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="templatestreeview">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="GtkLabel7">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes"><b>Analysis
templates</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">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HButtonBox" id="hbuttonbox4">
+ <property name="MemberName" />
+ <property name="Size">2</property>
+ <child>
+ <widget class="Gtk.Button" id="newteam">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-add Dialog</property>
+ <property name="Label" translatable="yes">New</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="deleteteambutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-remove Dialog</property>
+ <property name="Label" translatable="yes">Delete</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.VSeparator" id="vseparator2">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="LongoMatch.Gui.Component.AnalysisTemplateEditor" id="analysistemplateeditor">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ <property name="Edited">False</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HSeparator" id="hseparator1">
+ <property name="MemberName" />
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HButtonBox" id="hbuttonbox3">
+ <property name="MemberName" />
+ <property name="Size">1</property>
+ <property name="LayoutStyle">Start</property>
+ <child>
+ <widget class="Gtk.Button" id="backbutton">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextAndIcon</property>
+ <property name="Icon">stock:gtk-go-back Dialog</property>
+ <property name="Label" translatable="yes">_Back</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.AnalysisTemplateEditor" design-size="1403 461">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.VBox" id="vbox2">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox1">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="LongoMatch.Gui.Component.ButtonsWidget" id="buttonswidget">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="LongoMatch.Gui.Component.CategoryProperties" id="categoryproperties">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.HButtonBox" id="hbuttonbox2">
+ <property name="MemberName" />
+ <property name="Size">3</property>
+ <child>
+ <widget class="Gtk.Button" id="button486">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">GtkButton</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button485">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">GtkButton</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="button484">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">GtkButton</property>
+ <property name="UseUnderline">True</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">False</property>
+ <property name="Expand">False</property>
+ </packing>
+ </child>
+ </widget>
</child>
</widget>
</stetic-interface>
\ No newline at end of file
diff --git a/LongoMatch.GUI/gtk-gui/objects.xml b/LongoMatch.GUI/gtk-gui/objects.xml
index 29d7622..e37beda 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -498,6 +498,18 @@
</object>
<object type="LongoMatch.Gui.Panel.SportsTemplatesPanel" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups />
+ <signals>
+ <itemgroup label="IPanel Signals">
+ <signal name="BackEvent" />
+ </itemgroup>
+ </signals>
+ </object>
+ <object type="LongoMatch.Gui.Component.AnalysisTemplateEditor" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <itemgroups>
+ <itemgroup label="AnalysisTemplateEditor Properties">
+ <property name="Edited" />
+ </itemgroup>
+ </itemgroups>
<signals />
</object>
</objects>
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]