[longomatch/newui: 86/157] Show score and penalty cards events in timelines
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/newui: 86/157] Show score and penalty cards events in timelines
- Date: Mon, 1 Sep 2014 09:48:35 +0000 (UTC)
commit a5566e1a8945bc0a44c151401685c2f420aa4cd6
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon Aug 25 18:13:40 2014 +0200
Show score and penalty cards events in timelines
LongoMatch.Core/Common/PlaysFilter.cs | 12 +-
LongoMatch.Core/Handlers/Handlers.cs | 4 +-
LongoMatch.Core/Interfaces/ITimelineNode.cs | 32 ---
LongoMatch.Core/LongoMatch.Core.mdp | 1 -
LongoMatch.Core/Store/Category.cs | 81 +------
LongoMatch.Core/Store/PenaltyCard.cs | 2 +-
LongoMatch.Core/Store/Play.cs | 4 +-
LongoMatch.Core/Store/Project.cs | 34 ++--
LongoMatch.Core/Store/Score.cs | 2 +-
LongoMatch.Core/Store/TaggerButton.cs | 75 +++++-
LongoMatch.Core/Store/TimelineNode.cs | 2 +-
LongoMatch.Drawing.Cairo/CairoContext.cs | 2 +-
LongoMatch.Drawing/CanvasObjects/CategoryLabel.cs | 6 +-
LongoMatch.Drawing/LongoMatch.Drawing.mdp | 2 +
LongoMatch.Drawing/Widgets/CategoriesLabels.cs | 52 +++-
LongoMatch.Drawing/Widgets/PlaysTimeline.cs | 104 ++++++--
LongoMatch.GUI/Gui/Component/CategoryProperties.cs | 42 ++--
.../Gui/Component/PlaysListTreeWidget.cs | 16 +-
LongoMatch.GUI/Gui/Component/Timeline.cs | 2 +-
LongoMatch.GUI/Gui/Menu/PlaysMenu.cs | 6 +-
LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs | 2 -
LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs | 13 +-
.../LongoMatch.Gui.Component.CategoryProperties.cs | 286 ++++++++++----------
LongoMatch.GUI/gtk-gui/gui.stetic | 172 +++++++------
LongoMatch.GUI/gtk-gui/objects.xml | 9 -
LongoMatch.Services/Services/EventsManager.cs | 8 +-
LongoMatch.Services/Services/HotKeysManager.cs | 8 +-
Tests/Core/TestProject.cs | 2 +-
28 files changed, 522 insertions(+), 459 deletions(-)
---
diff --git a/LongoMatch.Core/Common/PlaysFilter.cs b/LongoMatch.Core/Common/PlaysFilter.cs
index 69cc0b4..bc8e5b1 100644
--- a/LongoMatch.Core/Common/PlaysFilter.cs
+++ b/LongoMatch.Core/Common/PlaysFilter.cs
@@ -31,20 +31,20 @@ namespace LongoMatch.Common
public event FilterUpdatedHandler FilterUpdated;
- Dictionary<Category, List<Tag>> categoriesFilter;
+ Dictionary<TaggerButton, List<Tag>> categoriesFilter;
List<Player> playersFilter;
Project project;
public PlaysFilter (Project project)
{
this.project = project;
- categoriesFilter = new Dictionary<Category, List<Tag>>();
+ categoriesFilter = new Dictionary<TaggerButton, List<Tag>>();
playersFilter = new List<Player>();
ClearAll();
UpdateFilters();
}
- public List<Category> VisibleCategories {
+ public List<TaggerButton> VisibleCategories {
get;
protected set;
}
@@ -89,7 +89,7 @@ namespace LongoMatch.Common
Update();
}
- public void FilterCategory (Category cat, bool visible) {
+ public void FilterCategory (TaggerButton cat, bool visible) {
if (visible) {
if (!categoriesFilter.ContainsKey (cat))
categoriesFilter[cat] = new List<Tag> ();
@@ -100,7 +100,7 @@ namespace LongoMatch.Common
Update();
}
- public void FilterCategoryTag (Category cat, Tag tag, bool visible) {
+ public void FilterCategoryTag (TaggerButton cat, Tag tag, bool visible) {
List<Tag> tags;
if (visible) {
@@ -148,7 +148,7 @@ namespace LongoMatch.Common
void UpdateVisibleCategories () {
if (categoriesFilter.Count == 0) {
- VisibleCategories = project.Categories.CategoriesList;
+ VisibleCategories = project.Categories.List;
} else {
VisibleCategories = categoriesFilter.Keys.ToList();
}
diff --git a/LongoMatch.Core/Handlers/Handlers.cs b/LongoMatch.Core/Handlers/Handlers.cs
index ddefa86..b90360c 100644
--- a/LongoMatch.Core/Handlers/Handlers.cs
+++ b/LongoMatch.Core/Handlers/Handlers.cs
@@ -38,7 +38,7 @@ namespace LongoMatch.Handlers
public delegate void NewTagHandler (TaggerButton tagger, List<Player> plays, List<Tag> tags, Time
start, Time stop);
//A play was edited
public delegate void TimeNodeChangedHandler(TimeNode tNode, object val);
- public delegate void CategoryChangedHandler(Category cat);
+ public delegate void CategoryChangedHandler(AnalysisCategory cat);
/* A list of plays needs to be deleted */
public delegate void PlaysDeletedHandler(List<Play> plays);
/* Tag a play */
@@ -142,7 +142,7 @@ namespace LongoMatch.Handlers
public delegate void AnalysisModeChangedHandler (VideoAnalysisMode mode);
public delegate void TagSubcategoriesChangedHandler (bool tagsubcategories);
- public delegate void ShowTimelineMenuHandler (List<Play> plays, Category cat, Time time);
+ public delegate void ShowTimelineMenuHandler (List<Play> plays, AnalysisCategory cat, Time time);
public delegate void ShowTaggerMenuHandler (List<Play> plays);
public delegate void ShowDrawToolMenuHandler (IBlackboardObject drawable);
public delegate void ConfigureDrawingObjectHandler (IBlackboardObject drawable);
diff --git a/LongoMatch.Core/LongoMatch.Core.mdp b/LongoMatch.Core/LongoMatch.Core.mdp
index c7320e0..080cc15 100644
--- a/LongoMatch.Core/LongoMatch.Core.mdp
+++ b/LongoMatch.Core/LongoMatch.Core.mdp
@@ -56,7 +56,6 @@
<File subtype="Code" buildaction="Compile" name="Interfaces/ITemplatesService.cs" />
<File subtype="Code" buildaction="Compile" name="Interfaces/IDatabase.cs" />
<File subtype="Code" buildaction="Compile" name="Store/TimelineNode.cs" />
- <File subtype="Code" buildaction="Compile" name="Interfaces/ITimelineNode.cs" />
<File subtype="Directory" buildaction="Compile" name="Interfaces/GUI" />
<File subtype="Code" buildaction="Compile" name="Interfaces/GUI/IRenderingStateBar.cs" />
<File subtype="Code" buildaction="Compile" name="Interfaces/GUI/IPlayerBin.cs" />
diff --git a/LongoMatch.Core/Store/Category.cs b/LongoMatch.Core/Store/Category.cs
index 821fd41..46fda62 100644
--- a/LongoMatch.Core/Store/Category.cs
+++ b/LongoMatch.Core/Store/Category.cs
@@ -36,7 +36,7 @@ namespace LongoMatch.Store
/// tagged in this category
/// </summary>
[Serializable]
- public class Category:TaggerButton, IIDObject
+ public class Category: AnalysisCategory, IIDObject
{
#region Constructors
@@ -58,30 +58,6 @@ namespace LongoMatch.Store
#region Properties
- /// <summary>
- /// Unique ID for this category
- /// </summary>
- public Guid ID {
- get;
- set;
- }
-
- /// <summary>
- /// A key combination to create plays in this category
- /// </summary>
- public HotKey HotKey {
- get;
- set;
- }
-
- //// <summary>
- /// Sort method used to sort plays for this category
- /// </summary>
- public SortMethodType SortMethod {
- get;
- set;
- }
-
public List<Tag> Tags {
get;
set;
@@ -97,61 +73,6 @@ namespace LongoMatch.Store
set;
}
- public bool TagGoalPosition {
- get;
- set;
- }
-
- public bool TagFieldPosition {
- get;
- set;
- }
-
- public bool TagHalfFieldPosition {
- get;
- set;
- }
-
- public bool FieldPositionIsDistance {
- get;
- set;
- }
-
- public bool HalfFieldPositionIsDistance {
- get;
- set;
- }
-
- /// <summary>
- /// Sort method string used for the UI
- /// </summary>
- [JsonIgnore]
- public string SortMethodString {
- get {
- switch(SortMethod) {
- case SortMethodType.SortByName:
- return Catalog.GetString("Sort by name");
- case SortMethodType.SortByStartTime:
- return Catalog.GetString("Sort by start time");
- case SortMethodType.SortByStopTime:
- return Catalog.GetString("Sort by stop time");
- case SortMethodType.SortByDuration:
- return Catalog.GetString("Sort by duration");
- default:
- return Catalog.GetString("Sort by name");
- }
- }
- set {
- if(value == Catalog.GetString("Sort by start time"))
- SortMethod = SortMethodType.SortByStartTime;
- else if(value == Catalog.GetString("Sort by stop time"))
- SortMethod = SortMethodType.SortByStopTime;
- else if(value == Catalog.GetString("Sort by duration"))
- SortMethod = SortMethodType.SortByDuration;
- else
- SortMethod = SortMethodType.SortByName;
- }
- }
#endregion
}
diff --git a/LongoMatch.Core/Store/PenaltyCard.cs b/LongoMatch.Core/Store/PenaltyCard.cs
index 33bb955..fde581d 100644
--- a/LongoMatch.Core/Store/PenaltyCard.cs
+++ b/LongoMatch.Core/Store/PenaltyCard.cs
@@ -21,7 +21,7 @@ using LongoMatch.Interfaces;
namespace LongoMatch.Store
{
- public class PenaltyCard: EventButton
+ public class PenaltyCard: AnalysisEventCategory
{
public PenaltyCard ()
{
diff --git a/LongoMatch.Core/Store/Play.cs b/LongoMatch.Core/Store/Play.cs
index d5faecc..dc58b0e 100644
--- a/LongoMatch.Core/Store/Play.cs
+++ b/LongoMatch.Core/Store/Play.cs
@@ -34,7 +34,7 @@ namespace LongoMatch.Store
/// </summary>
[Serializable]
- public class Play : PixbufTimeNode, ITimelineNode, IIDObject
+ public class Play : PixbufTimeNode, IIDObject
{
#region Constructors
@@ -57,7 +57,7 @@ namespace LongoMatch.Store
/// <summary>
/// Category in which this play is tagged
/// </summary>
- public Category Category {
+ public AnalysisCategory Category {
get;
set;
}
diff --git a/LongoMatch.Core/Store/Project.cs b/LongoMatch.Core/Store/Project.cs
index b6971c3..51e3fcc 100644
--- a/LongoMatch.Core/Store/Project.cs
+++ b/LongoMatch.Core/Store/Project.cs
@@ -59,8 +59,6 @@ namespace LongoMatch.Store
VisitorTeamTemplate = new TeamTemplate();
Timers = new List<Timer> ();
Periods = new List<Period> ();
- ScoreTimeline = new List<ScoreEvent>();
- PenaltyCardsTimeline = new List<PenaltyCardEvent> ();
Playlists = new List<Playlist> ();
}
#endregion
@@ -80,16 +78,6 @@ namespace LongoMatch.Store
set;
}
- public List<ScoreEvent> ScoreTimeline {
- get;
- set;
- }
-
- public List<PenaltyCardEvent> PenaltyCardsTimeline {
- get;
- set;
- }
-
public ProjectDescription Description {
get{
return description;
@@ -145,7 +133,21 @@ namespace LongoMatch.Store
}
[JsonIgnore]
- public IEnumerable<IGrouping<Category, Play>> PlaysGroupedByCategory {
+ public List<Play> ScorePlays {
+ get {
+ return Timeline.OfType<ScoreEvent>().Select (t => (Play) t).ToList();
+ }
+ }
+
+ [JsonIgnore]
+ public List<Play> PenaltyCardsPlays {
+ get {
+ return Timeline.OfType<PenaltyCardEvent>().Select (t => (Play) t).ToList();
+ }
+ }
+
+ [JsonIgnore]
+ public IEnumerable<IGrouping<TaggerButton, Play>> PlaysGroupedByCategory {
get {
return Timeline.GroupBy(play => play.Category);
}
@@ -184,7 +186,7 @@ namespace LongoMatch.Store
/// <returns>
/// A <see cref="MediaTimeNode"/>: created play
/// </returns>
- public Play AddPlay(Category category, Time start, Time stop, Image miniature) {
+ public Play AddPlay(AnalysisCategory category, Time start, Time stop, Image miniature) {
string count= String.Format("{0:000}", PlaysInCategory (category).Count + 1);
string name = String.Format("{0} {1}",category.Name, count);
@@ -240,12 +242,12 @@ namespace LongoMatch.Store
}
}
- public List<Play> PlaysInCategory(Category category) {
+ public List<Play> PlaysInCategory(TaggerButton category) {
return Timeline.Where(p => p.Category.ID == category.ID).ToList();
}
public int GetScore (Team team) {
- return ScoreTimeline.Where (s => PlayTaggedTeam (s) == team).Sum(s =>
s.Score.Points);
+ return Timeline.OfType<ScoreEvent>().Where (s => PlayTaggedTeam (s) == team).Sum(s =>
s.Score.Points);
}
public Team PlayTaggedTeam (Play play) {
diff --git a/LongoMatch.Core/Store/Score.cs b/LongoMatch.Core/Store/Score.cs
index 926e894..72f1ab5 100644
--- a/LongoMatch.Core/Store/Score.cs
+++ b/LongoMatch.Core/Store/Score.cs
@@ -22,7 +22,7 @@ using LongoMatch.Common;
namespace LongoMatch.Store
{
[Serializable]
- public class Score: EventButton
+ public class Score: AnalysisEventCategory
{
public Score ()
{
diff --git a/LongoMatch.Core/Store/TaggerButton.cs b/LongoMatch.Core/Store/TaggerButton.cs
index c29b13f..813423b 100644
--- a/LongoMatch.Core/Store/TaggerButton.cs
+++ b/LongoMatch.Core/Store/TaggerButton.cs
@@ -18,6 +18,7 @@
using System;
using LongoMatch.Common;
using Newtonsoft.Json;
+using Mono.Unix;
namespace LongoMatch.Store
{
@@ -34,6 +35,13 @@ namespace LongoMatch.Store
TextColor = Color.Grey2;
Start = new Time {Seconds = 10};
Stop = new Time {Seconds = 10};
+ HotKey = new HotKey();
+ ID = new Guid();
+ }
+
+ public Guid ID {
+ get;
+ set;
}
public string Name {
@@ -92,6 +100,16 @@ namespace LongoMatch.Store
set;
}
+ public HotKey HotKey {
+ get;
+ set;
+ }
+
+ public SortMethodType SortMethod {
+ get;
+ set;
+ }
+
[JsonIgnore]
public Color LightColor {
@@ -105,13 +123,68 @@ namespace LongoMatch.Store
set;
}
+ [JsonIgnore]
+ public string SortMethodString {
+ get {
+ switch(SortMethod) {
+ case SortMethodType.SortByName:
+ return Catalog.GetString("Sort by name");
+ case SortMethodType.SortByStartTime:
+ return Catalog.GetString("Sort by start time");
+ case SortMethodType.SortByStopTime:
+ return Catalog.GetString("Sort by stop time");
+ case SortMethodType.SortByDuration:
+ return Catalog.GetString("Sort by duration");
+ default:
+ return Catalog.GetString("Sort by name");
+ }
+ }
+ set {
+ if(value == Catalog.GetString("Sort by start time"))
+ SortMethod = SortMethodType.SortByStartTime;
+ else if(value == Catalog.GetString("Sort by stop time"))
+ SortMethod = SortMethodType.SortByStopTime;
+ else if(value == Catalog.GetString("Sort by duration"))
+ SortMethod = SortMethodType.SortByDuration;
+ else
+ SortMethod = SortMethodType.SortByName;
+ }
+ }
}
- public class EventButton: TaggerButton {
+ public class AnalysisCategory: TaggerButton {
+ public bool TagGoalPosition {
+ get;
+ set;
+ }
+
+ public bool TagFieldPosition {
+ get;
+ set;
+ }
+
+ public bool TagHalfFieldPosition {
+ get;
+ set;
+ }
+
+ public bool FieldPositionIsDistance {
+ get;
+ set;
+ }
+
+ public bool HalfFieldPositionIsDistance {
+ get;
+ set;
+ }
+ }
+
+ public class AnalysisEventCategory: AnalysisCategory {
public Time EventTime {
get;
set;
}
}
+
}
diff --git a/LongoMatch.Core/Store/TimelineNode.cs b/LongoMatch.Core/Store/TimelineNode.cs
index a731af2..2da229a 100644
--- a/LongoMatch.Core/Store/TimelineNode.cs
+++ b/LongoMatch.Core/Store/TimelineNode.cs
@@ -24,7 +24,7 @@ namespace LongoMatch.Store
/* FIXME: Code duplicated from Play, unfortunately we can't
* modify the class hierachy */
[Serializable]
- public class TimelineNode: TimeNode, ITimelineNode
+ public class TimelineNode: TimeNode
{
public TimelineNode ()
{
diff --git a/LongoMatch.Drawing.Cairo/CairoContext.cs b/LongoMatch.Drawing.Cairo/CairoContext.cs
index 2eb66a4..96ec732 100644
--- a/LongoMatch.Drawing.Cairo/CairoContext.cs
+++ b/LongoMatch.Drawing.Cairo/CairoContext.cs
@@ -23,7 +23,7 @@ namespace LongoMatch.Drawing.Cairo
{
public class CairoContext: IContext
{
- public CairoContext (Window window)
+ public CairoContext (Drawable window)
{
Value = CairoHelper.Create (window);
}
diff --git a/LongoMatch.Drawing/CanvasObjects/CategoryLabel.cs
b/LongoMatch.Drawing/CanvasObjects/CategoryLabel.cs
index 97be2f2..015d474 100644
--- a/LongoMatch.Drawing/CanvasObjects/CategoryLabel.cs
+++ b/LongoMatch.Drawing/CanvasObjects/CategoryLabel.cs
@@ -24,10 +24,10 @@ namespace LongoMatch.Drawing.CanvasObjects
{
public class CategoryLabel: CanvasObject, ICanvasObject
{
- Category category;
+ TaggerButton category;
double width;
- public CategoryLabel (Category category, double width, double height,
+ public CategoryLabel (TaggerButton category, double width, double height,
double offsetY)
{
this.category = category;
@@ -53,7 +53,7 @@ namespace LongoMatch.Drawing.CanvasObjects
public double OffsetY {
set;
- protected get;
+ get;
}
public override void Draw (IDrawingToolkit tk, Area area)
diff --git a/LongoMatch.Drawing/LongoMatch.Drawing.mdp b/LongoMatch.Drawing/LongoMatch.Drawing.mdp
index ee2a512..30c9257 100644
--- a/LongoMatch.Drawing/LongoMatch.Drawing.mdp
+++ b/LongoMatch.Drawing/LongoMatch.Drawing.mdp
@@ -52,10 +52,12 @@
<File subtype="Code" buildaction="Compile" name="CanvasObjects/FieldObject.cs" />
<File subtype="Code" buildaction="Compile" name="CanvasObjects/PlayersTaggerObject.cs" />
<File subtype="Code" buildaction="Compile" name="Widgets/Dashboard.cs" />
+ <File subtype="Code" buildaction="Compile" name="PlayslistCellRenderer.cs" />
</Contents>
<References>
<ProjectReference type="Package" localcopy="True" refto="System, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
<ProjectReference type="Project" localcopy="True" refto="LongoMatch.Core" />
<ProjectReference type="Package" specificVersion="False" localcopy="False" refto="System.Core,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Package" localcopy="True" refto="Mono.Posix, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=0738eb9f132ed756" />
</References>
</Project>
\ No newline at end of file
diff --git a/LongoMatch.Drawing/Widgets/CategoriesLabels.cs b/LongoMatch.Drawing/Widgets/CategoriesLabels.cs
index 0c9a03e..6a43d5c 100644
--- a/LongoMatch.Drawing/Widgets/CategoriesLabels.cs
+++ b/LongoMatch.Drawing/Widgets/CategoriesLabels.cs
@@ -21,6 +21,7 @@ using LongoMatch.Store;
using LongoMatch.Interfaces.Drawing;
using LongoMatch.Common;
using LongoMatch.Drawing.CanvasObjects;
+using Mono.Unix;
namespace LongoMatch.Drawing.Widgets
{
@@ -28,11 +29,11 @@ namespace LongoMatch.Drawing.Widgets
{
Project project;
PlaysFilter filter;
- Dictionary<Category, CategoryLabel> categories;
+ Dictionary<TaggerButton, CategoryLabel> categories;
public CategoriesLabels (IWidget widget): base (widget)
{
- categories = new Dictionary<Category, CategoryLabel> ();
+ categories = new Dictionary<TaggerButton, CategoryLabel> ();
}
public double Scroll {
@@ -58,38 +59,67 @@ namespace LongoMatch.Drawing.Widgets
void FillCanvas ()
{
+ CategoryLabel l;
int i = 0, w, h;
w = StyleConf.TimelineLabelsWidth;
h = StyleConf.TimelineCategoryHeight;
widget.Width = w;
+ /* Add the scores label */
+ if (project.Categories.Scores.Count > 0) {
+ l = new CategoryLabel (new TaggerButton { Name = Catalog.GetString ("Score")
},
+ w, h, i * h);
+ Objects.Add (l);
+ i++;
+ foreach (Score s in project.Categories.Scores) {
+ categories [s] = l;
+ }
+ }
+
+ /* Add the penalty cards label */
+ if (project.Categories.PenaltyCards.Count > 0) {
+ l = new CategoryLabel (new TaggerButton {Name = Catalog.GetString ("Penalty
cards")},
+ w, h, i * h);
+ Objects.Add (l);
+ i++;
+ foreach (PenaltyCard pc in project.Categories.PenaltyCards) {
+ categories [pc] = l;
+ }
+ }
+
/* Start from bottom to top with categories */
- foreach (Category cat in project.Categories.CategoriesList) {
- CategoryLabel l;
-
+ foreach (TaggerButton cat in project.Categories.CategoriesList) {
/* Add the category label */
l = new CategoryLabel (cat, w, h, i * h);
categories [cat] = l;
Objects.Add (l);
i++;
}
+
}
void UpdateVisibleCategories ()
{
int i = 0;
- foreach (Category cat in categories.Keys) {
+ foreach (CategoryLabel ct in categories.Values) {
+ ct.Visible = false;
+ ct.OffsetY = -1;
+ }
+
+ foreach (TaggerButton cat in categories.Keys) {
CategoryLabel label = categories [cat];
if (filter.VisibleCategories.Contains (cat)) {
- label.OffsetY = i * label.Height;
- label.Visible = true;
- if (i % 2 == 0) {
- label.Even = true;
+ label.Visible |= true;
+ if (label.OffsetY == -1) {
+ label.OffsetY = i * label.Height;
+ if (i % 2 == 0) {
+ label.Even = true;
+ }
+ i++;
}
- i++;
} else {
label.Visible = false;
}
diff --git a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
index 29bc042..e9afbcb 100644
--- a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
+++ b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
@@ -36,11 +36,11 @@ namespace LongoMatch.Drawing.Widgets
PlaysFilter playsFilter;
double secondsPerPixel;
Time duration;
- Dictionary<Category, CategoryTimeline> categories;
+ Dictionary<AnalysisCategory, CategoryTimeline> categories;
public PlaysTimeline (IWidget widget): base(widget)
{
- categories = new Dictionary<Category, CategoryTimeline> ();
+ categories = new Dictionary<AnalysisCategory, CategoryTimeline> ();
secondsPerPixel = 0.1;
Accuracy = Constants.TIMELINE_ACCURACY;
SelectionMode = MultiSelectionMode.MultipleWithModifier;
@@ -52,7 +52,13 @@ namespace LongoMatch.Drawing.Widgets
Clear ();
categories.Clear ();
duration = project.Description.File.Duration;
- widget.Height = project.Categories.List.Count * StyleConf.TimelineCategoryHeight;
+ widget.Height = project.Categories.CategoriesList.Count *
StyleConf.TimelineCategoryHeight;
+ if (project.Categories.Scores.Count > 0) {
+ widget.Height += StyleConf.TimelineCategoryHeight;
+ }
+ if (project.Categories.PenaltyCards.Count > 0) {
+ widget.Height += StyleConf.TimelineCategoryHeight;
+ }
playsFilter = filter;
FillCanvas ();
filter.FilterUpdated += UpdateVisibleCategories;
@@ -99,25 +105,60 @@ namespace LongoMatch.Drawing.Widgets
}
}
+ Color ColorForRow (int row)
+ {
+ Color c;
+
+ if (row % 2 == 0) {
+ c = Config.Style.PaletteBackground;
+ } else {
+ c = Config.Style.PaletteBackgroundLight;
+ }
+ return c;
+ }
+
void FillCanvas ()
{
- for (int i=0; i<project.Categories.CategoriesList.Count; i++) {
- Category cat;
- CategoryTimeline tl;
- Color c;
-
- if (i % 2 == 0) {
- c = Config.Style.PaletteBackground;
- } else {
- c = Config.Style.PaletteBackgroundLight;
+ CategoryTimeline tl;
+ int i = 0;
+
+ List<Category> cats = project.Categories.CategoriesList;
+ List<Score> scores = project.Categories.Scores;
+ List<PenaltyCard> cards = project.Categories.PenaltyCards;
+
+ if (scores.Count > 0) {
+ tl = new CategoryTimeline (project.ScorePlays, duration,
+ i * StyleConf.TimelineCategoryHeight,
+ ColorForRow (i));
+ Objects.Add (tl);
+ i++;
+ foreach (Score s in scores) {
+ categories [s] = tl;
}
-
- cat = project.Categories.CategoriesList [i];
- tl = new CategoryTimeline (project.PlaysInCategory (cat),
- duration, i * StyleConf.TimelineCategoryHeight, c);
+ }
+
+ if (cards.Count > 0) {
+ tl = new CategoryTimeline (project.PenaltyCardsPlays, duration,
+ i * StyleConf.TimelineCategoryHeight,
+ ColorForRow (i));
+ Objects.Add (tl);
+ i++;
+ foreach (PenaltyCard pc in cards) {
+ categories [pc] = tl;
+ }
+ }
+
+ for (i = i; i < cats.Count; i++) {
+ AnalysisCategory cat;
+ cat = cats [i];
+ tl = new CategoryTimeline (project.PlaysInCategory (cat), duration,
+ i * StyleConf.TimelineCategoryHeight,
+ ColorForRow (i));
categories [cat] = tl;
Objects.Add (tl);
+ Console.WriteLine (i);
}
+
UpdateVisibleCategories ();
Update ();
}
@@ -125,14 +166,21 @@ namespace LongoMatch.Drawing.Widgets
void UpdateVisibleCategories ()
{
int i = 0;
- foreach (Category cat in categories.Keys) {
+ foreach (CategoryTimeline ct in categories.Values) {
+ ct.Visible = false;
+ ct.OffsetY = -1;
+ }
+
+ foreach (AnalysisCategory cat in categories.Keys) {
TimelineObject timeline = categories [cat];
if (playsFilter.VisibleCategories.Contains (cat)) {
- timeline.OffsetY = i * timeline.Height;
- timeline.Visible = true;
- i++;
+ if (timeline.OffsetY == -1) {
+ timeline.OffsetY = i * timeline.Height;
+ i++;
+ }
+ timeline.Visible |= true;
} else {
- timeline.Visible = false;
+ timeline.Visible |= false;
}
}
widget.ReDraw ();
@@ -169,11 +217,17 @@ namespace LongoMatch.Drawing.Widgets
protected override void ShowMenu (Point coords)
{
- Category cat = null;
+ AnalysisCategory cat = null;
List<Play> plays = Selections.Select (p => (p.Drawable as PlayObject).Play).ToList ();
- foreach (Category c in categories.Keys) {
- TimelineObject tl = categories [c];
+ foreach (AnalysisCategory ac in categories.Keys) {
+ TimelineObject tl;
+ Category c = ac as Category;
+ if (ac == null)
+ continue;
+
+
+ tl = categories [c];
if (!tl.Visible)
continue;
if (coords.Y >= tl.OffsetY && coords.Y < tl.OffsetY + tl.Height) {
@@ -182,7 +236,7 @@ namespace LongoMatch.Drawing.Widgets
}
}
- if (cat != null && ShowMenuEvent != null) {
+ if ((cat != null || plays.Count > 0) && ShowMenuEvent != null) {
ShowMenuEvent (plays, cat,
Utils.PosToTime (coords, SecondsPerPixel));
}
diff --git a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
index 40e7f41..2be5745 100644
--- a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
@@ -48,6 +48,7 @@ namespace LongoMatch.Gui.Component
SizeGroup sizegroup;
TaggerButton tagger;
+ AnalysisCategory posTagger;
Category cat;
PenaltyCard card;
Score score;
@@ -107,6 +108,7 @@ namespace LongoMatch.Gui.Component
public TaggerButton Tagger {
set {
tagger = value;
+ posTagger = value as AnalysisCategory;
cat = value as Category;
card = value as PenaltyCard;
score = value as Score;
@@ -146,33 +148,39 @@ namespace LongoMatch.Gui.Component
}
}
- private void UpdateGui() {
+ private void UpdateGui ()
+ {
ignore = true;
cattable.Visible = cat != null;
+ postable.Visible = posTagger != null;
scoretable.Visible = score != null;
cardtable.Visible = card != null;
if (tagger != null) {
nameentry.Text = tagger.Name;
- colorbutton1.Color = Helpers.Misc.ToGdkColor(tagger.Color);
- colorbutton2.Color = Helpers.Misc.ToGdkColor(tagger.TextColor);
+ colorbutton1.Color = Helpers.Misc.ToGdkColor (tagger.Color);
+ colorbutton2.Color = Helpers.Misc.ToGdkColor (tagger.TextColor);
lastLeadTime = tagger.Start;
tagmodecombobox.Active = (int)tagger.TagMode;
leadtimebutton.Value = tagger.Start.Seconds;
lagtimebutton.Value = tagger.Stop.Seconds;
+ sortmethodcombobox.Active = (int)tagger.SortMethod;
+ if (tagger.HotKey != null && tagger.HotKey.Defined)
+ hotKeyLabel.Text = tagger.HotKey.ToString ();
+ else
+ hotKeyLabel.Text = Catalog.GetString ("none");
+ }
+ if (posTagger != null) {
+ SetPositionCombo (fieldcombobox, posTagger.TagFieldPosition,
+ posTagger.FieldPositionIsDistance);
+ SetPositionCombo (hfieldcombobox, posTagger.TagHalfFieldPosition,
+ posTagger.HalfFieldPositionIsDistance);
+ SetPositionCombo (goalcombobox, posTagger.TagGoalPosition, false);
}
if(cat != null) {
tagscheckbutton.Active = cat.ShowSubcategories;
tprbutton.Value = cat.TagsPerRow;
- sortmethodcombobox.Active = (int)cat.SortMethod;
- SetPositionCombo (fieldcombobox, cat.TagFieldPosition,
cat.FieldPositionIsDistance);
- SetPositionCombo (hfieldcombobox, cat.TagHalfFieldPosition,
cat.HalfFieldPositionIsDistance);
- SetPositionCombo (goalcombobox, cat.TagGoalPosition, false);
- if(cat.HotKey.Defined)
- hotKeyLabel.Text = cat.HotKey.ToString();
- else
- hotKeyLabel.Text = Catalog.GetString("none");
}
if (score != null) {
pointsbutton.Value = score.Points;
@@ -205,13 +213,13 @@ namespace LongoMatch.Gui.Component
ReadPositionCombo (sender as ComboBox, out tag, out trayectory);
if (sender == fieldcombobox) {
- cat.TagFieldPosition = tag;
- cat.FieldPositionIsDistance = trayectory;
+ posTagger.TagFieldPosition = tag;
+ posTagger.FieldPositionIsDistance = trayectory;
} else if (sender == hfieldcombobox) {
- cat.TagHalfFieldPosition = tag;
- cat.HalfFieldPositionIsDistance = trayectory;
+ posTagger.TagHalfFieldPosition = tag;
+ posTagger.HalfFieldPositionIsDistance = trayectory;
} else {
- cat.TagGoalPosition = tag;
+ posTagger.TagGoalPosition = tag;
}
Edited = true;
}
@@ -273,7 +281,7 @@ namespace LongoMatch.Gui.Component
void HandleSortMethodChanged(object sender, System.EventArgs e)
{
- cat.SortMethodString = sortmethodcombobox.ActiveText;
+ tagger.SortMethodString = sortmethodcombobox.ActiveText;
Edited = true;
}
diff --git a/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
b/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
index 9035885..fe5579c 100644
--- a/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
@@ -121,17 +121,17 @@ namespace LongoMatch.Gui.Component
}
private TreeStore GetModel(Project project){
- Dictionary<Category, TreeIter> itersDic = new Dictionary<Category, TreeIter>();
- Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof(Play));
+ Dictionary<TaggerButton, TreeIter> itersDic = new Dictionary<TaggerButton,
TreeIter>();
+ Gtk.TreeStore dataFileListStore = new Gtk.TreeStore(typeof (TaggerButton),
typeof(TimeNode));
- foreach(Category cat in project.Categories.CategoriesList) {
- Gtk.TreeIter iter = dataFileListStore.AppendValues(cat);
+ foreach(TaggerButton cat in project.Categories.List) {
+ Gtk.TreeIter iter = dataFileListStore.AppendValues(cat, null);
itersDic.Add(cat, iter);
}
var queryPlaysByCategory = project.PlaysGroupedByCategory;
foreach(var playsGroup in queryPlaysByCategory) {
- Category cat = playsGroup.Key;
+ TaggerButton cat = playsGroup.Key;
if(!itersDic.ContainsKey(cat))
continue;
foreach(Play play in playsGroup) {
@@ -141,11 +141,11 @@ namespace LongoMatch.Gui.Component
return dataFileListStore;
}
- private string CategoryPath(Category cat) {
- return project.Categories.CategoriesList.IndexOf(cat).ToString();
+ private string CategoryPath(TaggerButton cat) {
+ return project.Categories.List.IndexOf(cat).ToString();
}
- protected virtual void OnEditProperties(Category cat) {
+ protected virtual void OnEditProperties(AnalysisCategory cat) {
EditCategoryDialog dialog = new EditCategoryDialog(project, cat);
dialog.Run();
dialog.Destroy();
diff --git a/LongoMatch.GUI/Gui/Component/Timeline.cs b/LongoMatch.GUI/Gui/Component/Timeline.cs
index 5e142a8..b076284 100644
--- a/LongoMatch.GUI/Gui/Component/Timeline.cs
+++ b/LongoMatch.GUI/Gui/Component/Timeline.cs
@@ -168,7 +168,7 @@ namespace LongoMatch.Gui.Component
QueueDraw ();
}
- void HandleShowMenu (List<Play> plays, Category cat, Time time)
+ void HandleShowMenu (List<Play> plays, AnalysisCategory cat, Time time)
{
menu.ShowTimelineMenu (project, plays, cat, time);
}
diff --git a/LongoMatch.GUI/Gui/Menu/PlaysMenu.cs b/LongoMatch.GUI/Gui/Menu/PlaysMenu.cs
index 29352c7..94c8215 100644
--- a/LongoMatch.GUI/Gui/Menu/PlaysMenu.cs
+++ b/LongoMatch.GUI/Gui/Menu/PlaysMenu.cs
@@ -34,7 +34,7 @@ namespace LongoMatch.Gui.Menus
MenuItem edit, newPlay, del, addPLN, snapshot, render;
MenuItem duplicate, moveCat, drawings;
List<Play> plays;
- Category cat;
+ AnalysisCategory cat;
Time time;
Project project;
@@ -52,12 +52,12 @@ namespace LongoMatch.Gui.Menus
ShowMenu (project, plays, null, null, null, false);
}
- public void ShowTimelineMenu (Project project, List<Play> plays, Category cat, Time time)
+ public void ShowTimelineMenu (Project project, List<Play> plays, AnalysisCategory cat, Time
time)
{
ShowMenu (project, plays, cat, time, null, false);
}
- private void ShowMenu (Project project, List<Play> plays, Category cat, Time time,
+ private void ShowMenu (Project project, List<Play> plays, AnalysisCategory cat, Time time,
List<Category> categories, bool editableName)
{
this.plays = plays;
diff --git a/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs b/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs
index 141c168..6461454 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs
@@ -64,8 +64,6 @@ namespace LongoMatch.Gui.Component
"</ui>");
playersMenu = manager.GetWidget("/PlayersMenu") as Menu;
-
- edit.Activated += OnEdit;
}
protected override int SortFunction(TreeModel model, TreeIter a, TreeIter b) {
diff --git a/LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs b/LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs
index 715ed4c..5a73db1 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs
@@ -112,7 +112,7 @@ namespace LongoMatch.Gui.Component
sortByStop.Activated += OnSortActivated;
sortByDuration.Activated += OnSortActivated;
editProp.Activated += delegate(object sender, EventArgs e) {
- EditProperties(GetValueFromPath(Selection.GetSelectedRows()[0]) as Category);
+ EditProperties(GetValueFromPath(Selection.GetSelectedRows()[0]) as
AnalysisCategory);
};
}
@@ -138,7 +138,7 @@ namespace LongoMatch.Gui.Component
TimeNode tna, tnb;
TreeIter parent;
int depth;
- Category category;
+ AnalysisCategory category;
if(model == null)
return 0;
@@ -162,7 +162,7 @@ namespace LongoMatch.Gui.Component
return int.Parse(model.GetPath(a).ToString())
- int.Parse(model.GetPath(b).ToString());
- category = model.GetValue(parent,0) as Category;
+ category = model.GetValue(parent,0) as AnalysisCategory;
tna = model.GetValue(a, 0)as TimeNode;
tnb = model.GetValue(b, 0) as TimeNode;
@@ -181,11 +181,11 @@ namespace LongoMatch.Gui.Component
}
private void OnSortActivated(object o, EventArgs args) {
- Category category;
+ AnalysisCategory category;
RadioAction sender;
sender = o as RadioAction;
- category = GetValueFromPath(Selection.GetSelectedRows()[0]) as Category;
+ category = GetValueFromPath(Selection.GetSelectedRows()[0]) as AnalysisCategory;
if(sender == sortByName)
category.SortMethod = SortMethodType.SortByName;
@@ -234,10 +234,11 @@ namespace LongoMatch.Gui.Component
if(paths.Length == 1) {
TimeNode selectedTimeNode = GetValueFromPath(paths[0]) as TimeNode;
+
if (selectedTimeNode != null) {
ShowMenu ();
} else {
- SetupSortMenu((GetValueFromPath(paths[0]) as
Category).SortMethod);
+ SetupSortMenu((GetValueFromPath(paths[0]) as
AnalysisCategory).SortMethod);
categoriesMenu.Popup();
}
}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
index 5365f61..1270bcd 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
@@ -18,16 +18,17 @@ namespace LongoMatch.Gui.Component
private global::Gtk.Entry nameentry;
private global::Gtk.Label taglabel;
private global::Gtk.ComboBox tagmodecombobox;
- private global::Gtk.Table cattable;
+ private global::Gtk.Table postable;
private global::Gtk.ComboBox fieldcombobox;
private global::Gtk.ComboBox goalcombobox;
- private global::Gtk.HBox hbox5;
- private global::Gtk.Label hotKeyLabel;
- private global::Gtk.Button changebuton;
private global::Gtk.ComboBox hfieldcombobox;
private global::Gtk.Label label10;
private global::Gtk.Label label11;
private global::Gtk.Label label12;
+ private global::Gtk.Table cattable;
+ private global::Gtk.HBox hbox5;
+ private global::Gtk.Label hotKeyLabel;
+ private global::Gtk.Button changebuton;
private global::Gtk.Label label14;
private global::Gtk.Label label15;
private global::Gtk.Label label6;
@@ -214,122 +215,127 @@ namespace LongoMatch.Gui.Component
w13.Expand = false;
w13.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild
- this.cattable = new global::Gtk.Table (((uint)(7)), ((uint)(2)), true);
- this.cattable.Name = "cattable";
- this.cattable.RowSpacing = ((uint)(6));
- this.cattable.ColumnSpacing = ((uint)(6));
- // Container child cattable.Gtk.Table+TableChild
+ this.postable = new global::Gtk.Table (((uint)(3)), ((uint)(2)), true);
+ this.postable.Name = "postable";
+ this.postable.RowSpacing = ((uint)(6));
+ this.postable.ColumnSpacing = ((uint)(6));
+ // Container child postable.Gtk.Table+TableChild
this.fieldcombobox = global::Gtk.ComboBox.NewText ();
this.fieldcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Not tagged"));
this.fieldcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Tag as point"));
this.fieldcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Tag as
trayectory"));
this.fieldcombobox.Name = "fieldcombobox";
this.fieldcombobox.Active = 0;
- this.cattable.Add (this.fieldcombobox);
- global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.cattable
[this.fieldcombobox]));
- w14.TopAttach = ((uint)(4));
- w14.BottomAttach = ((uint)(5));
+ this.postable.Add (this.fieldcombobox);
+ global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.postable
[this.fieldcombobox]));
w14.LeftAttach = ((uint)(1));
w14.RightAttach = ((uint)(2));
w14.XOptions = ((global::Gtk.AttachOptions)(4));
w14.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child cattable.Gtk.Table+TableChild
+ // Container child postable.Gtk.Table+TableChild
this.goalcombobox = global::Gtk.ComboBox.NewText ();
this.goalcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Not tagged"));
this.goalcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Tag as point"));
this.goalcombobox.Name = "goalcombobox";
this.goalcombobox.Active = 0;
- this.cattable.Add (this.goalcombobox);
- global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.cattable
[this.goalcombobox]));
- w15.TopAttach = ((uint)(6));
- w15.BottomAttach = ((uint)(7));
+ this.postable.Add (this.goalcombobox);
+ global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.postable
[this.goalcombobox]));
+ w15.TopAttach = ((uint)(2));
+ w15.BottomAttach = ((uint)(3));
w15.LeftAttach = ((uint)(1));
w15.RightAttach = ((uint)(2));
w15.XOptions = ((global::Gtk.AttachOptions)(4));
w15.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child cattable.Gtk.Table+TableChild
- this.hbox5 = new global::Gtk.HBox ();
- this.hbox5.Name = "hbox5";
- this.hbox5.Spacing = 6;
- // Container child hbox5.Gtk.Box+BoxChild
- this.hotKeyLabel = new global::Gtk.Label ();
- this.hotKeyLabel.Name = "hotKeyLabel";
- this.hotKeyLabel.LabelProp = global::Mono.Unix.Catalog.GetString ("none");
- this.hbox5.Add (this.hotKeyLabel);
- global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.hbox5
[this.hotKeyLabel]));
- w16.Position = 0;
- w16.Expand = false;
- w16.Fill = false;
- // Container child hbox5.Gtk.Box+BoxChild
- this.changebuton = new global::Gtk.Button ();
- this.changebuton.Sensitive = false;
- this.changebuton.CanFocus = true;
- this.changebuton.Name = "changebuton";
- this.changebuton.UseUnderline = true;
- this.changebuton.Label = global::Mono.Unix.Catalog.GetString ("Change");
- this.hbox5.Add (this.changebuton);
- global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox5
[this.changebuton]));
- w17.Position = 1;
- w17.Expand = false;
- w17.Fill = false;
- this.cattable.Add (this.hbox5);
- global::Gtk.Table.TableChild w18 = ((global::Gtk.Table.TableChild)(this.cattable
[this.hbox5]));
- w18.TopAttach = ((uint)(2));
- w18.BottomAttach = ((uint)(3));
- w18.LeftAttach = ((uint)(1));
- w18.RightAttach = ((uint)(2));
- w18.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child cattable.Gtk.Table+TableChild
+ // Container child postable.Gtk.Table+TableChild
this.hfieldcombobox = global::Gtk.ComboBox.NewText ();
this.hfieldcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Not tagged"));
this.hfieldcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Tag as point"));
this.hfieldcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Tag as
trayectory"));
this.hfieldcombobox.Name = "hfieldcombobox";
this.hfieldcombobox.Active = 0;
- this.cattable.Add (this.hfieldcombobox);
- global::Gtk.Table.TableChild w19 = ((global::Gtk.Table.TableChild)(this.cattable
[this.hfieldcombobox]));
- w19.TopAttach = ((uint)(5));
- w19.BottomAttach = ((uint)(6));
- w19.LeftAttach = ((uint)(1));
- w19.RightAttach = ((uint)(2));
- w19.XOptions = ((global::Gtk.AttachOptions)(4));
- w19.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child cattable.Gtk.Table+TableChild
+ this.postable.Add (this.hfieldcombobox);
+ global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.postable
[this.hfieldcombobox]));
+ w16.TopAttach = ((uint)(1));
+ w16.BottomAttach = ((uint)(2));
+ w16.LeftAttach = ((uint)(1));
+ w16.RightAttach = ((uint)(2));
+ w16.XOptions = ((global::Gtk.AttachOptions)(4));
+ w16.YOptions = ((global::Gtk.AttachOptions)(4));
+ // Container child postable.Gtk.Table+TableChild
this.label10 = new global::Gtk.Label ();
this.label10.Name = "label10";
this.label10.Xalign = 1F;
this.label10.LabelProp = global::Mono.Unix.Catalog.GetString ("<span
font_desc=\"10\">Field position</span>");
this.label10.UseMarkup = true;
- this.cattable.Add (this.label10);
- global::Gtk.Table.TableChild w20 = ((global::Gtk.Table.TableChild)(this.cattable
[this.label10]));
- w20.TopAttach = ((uint)(4));
- w20.BottomAttach = ((uint)(5));
- w20.XOptions = ((global::Gtk.AttachOptions)(4));
- w20.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child cattable.Gtk.Table+TableChild
+ this.postable.Add (this.label10);
+ global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.postable
[this.label10]));
+ w17.YOptions = ((global::Gtk.AttachOptions)(4));
+ // Container child postable.Gtk.Table+TableChild
this.label11 = new global::Gtk.Label ();
this.label11.Name = "label11";
this.label11.Xalign = 1F;
this.label11.LabelProp = global::Mono.Unix.Catalog.GetString ("<span
font_desc=\"10\">Half field position</span>");
this.label11.UseMarkup = true;
- this.cattable.Add (this.label11);
- global::Gtk.Table.TableChild w21 = ((global::Gtk.Table.TableChild)(this.cattable
[this.label11]));
- w21.TopAttach = ((uint)(5));
- w21.BottomAttach = ((uint)(6));
- w21.XOptions = ((global::Gtk.AttachOptions)(4));
- w21.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child cattable.Gtk.Table+TableChild
+ this.postable.Add (this.label11);
+ global::Gtk.Table.TableChild w18 = ((global::Gtk.Table.TableChild)(this.postable
[this.label11]));
+ w18.TopAttach = ((uint)(1));
+ w18.BottomAttach = ((uint)(2));
+ w18.XOptions = ((global::Gtk.AttachOptions)(4));
+ w18.YOptions = ((global::Gtk.AttachOptions)(4));
+ // Container child postable.Gtk.Table+TableChild
this.label12 = new global::Gtk.Label ();
this.label12.Name = "label12";
this.label12.Xalign = 1F;
this.label12.LabelProp = global::Mono.Unix.Catalog.GetString ("<span
font_desc=\"10\">Goal position</span>");
this.label12.UseMarkup = true;
- this.cattable.Add (this.label12);
- global::Gtk.Table.TableChild w22 = ((global::Gtk.Table.TableChild)(this.cattable
[this.label12]));
- w22.TopAttach = ((uint)(6));
- w22.BottomAttach = ((uint)(7));
- w22.XOptions = ((global::Gtk.AttachOptions)(4));
- w22.YOptions = ((global::Gtk.AttachOptions)(4));
+ this.postable.Add (this.label12);
+ global::Gtk.Table.TableChild w19 = ((global::Gtk.Table.TableChild)(this.postable
[this.label12]));
+ w19.TopAttach = ((uint)(2));
+ w19.BottomAttach = ((uint)(3));
+ w19.XOptions = ((global::Gtk.AttachOptions)(4));
+ w19.YOptions = ((global::Gtk.AttachOptions)(4));
+ this.vbox3.Add (this.postable);
+ global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.postable]));
+ w20.Position = 1;
+ w20.Expand = false;
+ w20.Fill = false;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.cattable = new global::Gtk.Table (((uint)(4)), ((uint)(2)), true);
+ this.cattable.Name = "cattable";
+ this.cattable.RowSpacing = ((uint)(6));
+ this.cattable.ColumnSpacing = ((uint)(6));
+ // Container child cattable.Gtk.Table+TableChild
+ this.hbox5 = new global::Gtk.HBox ();
+ this.hbox5.Name = "hbox5";
+ this.hbox5.Spacing = 6;
+ // Container child hbox5.Gtk.Box+BoxChild
+ this.hotKeyLabel = new global::Gtk.Label ();
+ this.hotKeyLabel.Name = "hotKeyLabel";
+ this.hotKeyLabel.LabelProp = global::Mono.Unix.Catalog.GetString ("none");
+ this.hbox5.Add (this.hotKeyLabel);
+ global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.hbox5
[this.hotKeyLabel]));
+ w21.Position = 0;
+ w21.Expand = false;
+ w21.Fill = false;
+ // Container child hbox5.Gtk.Box+BoxChild
+ this.changebuton = new global::Gtk.Button ();
+ this.changebuton.Sensitive = false;
+ this.changebuton.CanFocus = true;
+ this.changebuton.Name = "changebuton";
+ this.changebuton.UseUnderline = true;
+ this.changebuton.Label = global::Mono.Unix.Catalog.GetString ("Change");
+ this.hbox5.Add (this.changebuton);
+ global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.hbox5
[this.changebuton]));
+ w22.Position = 1;
+ w22.Expand = false;
+ w22.Fill = false;
+ this.cattable.Add (this.hbox5);
+ global::Gtk.Table.TableChild w23 = ((global::Gtk.Table.TableChild)(this.cattable
[this.hbox5]));
+ w23.TopAttach = ((uint)(2));
+ w23.BottomAttach = ((uint)(3));
+ w23.LeftAttach = ((uint)(1));
+ w23.RightAttach = ((uint)(2));
+ w23.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child cattable.Gtk.Table+TableChild
this.label14 = new global::Gtk.Label ();
this.label14.Name = "label14";
@@ -337,9 +343,9 @@ namespace LongoMatch.Gui.Component
this.label14.LabelProp = global::Mono.Unix.Catalog.GetString ("<span
font_desc=\"10\">Show tags</span>");
this.label14.UseMarkup = true;
this.cattable.Add (this.label14);
- global::Gtk.Table.TableChild w23 = ((global::Gtk.Table.TableChild)(this.cattable
[this.label14]));
- w23.XOptions = ((global::Gtk.AttachOptions)(4));
- w23.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w24 = ((global::Gtk.Table.TableChild)(this.cattable
[this.label14]));
+ w24.XOptions = ((global::Gtk.AttachOptions)(4));
+ w24.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child cattable.Gtk.Table+TableChild
this.label15 = new global::Gtk.Label ();
this.label15.Name = "label15";
@@ -347,10 +353,10 @@ namespace LongoMatch.Gui.Component
this.label15.LabelProp = global::Mono.Unix.Catalog.GetString ("<span
font_desc=\"10\">Tags per row</span>");
this.label15.UseMarkup = true;
this.cattable.Add (this.label15);
- global::Gtk.Table.TableChild w24 = ((global::Gtk.Table.TableChild)(this.cattable
[this.label15]));
- w24.TopAttach = ((uint)(1));
- w24.BottomAttach = ((uint)(2));
- w24.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w25 = ((global::Gtk.Table.TableChild)(this.cattable
[this.label15]));
+ w25.TopAttach = ((uint)(1));
+ w25.BottomAttach = ((uint)(2));
+ w25.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child cattable.Gtk.Table+TableChild
this.label6 = new global::Gtk.Label ();
this.label6.Name = "label6";
@@ -358,11 +364,11 @@ namespace LongoMatch.Gui.Component
this.label6.LabelProp = global::Mono.Unix.Catalog.GetString ("<span
font_desc=\"10\">HotKey</span>");
this.label6.UseMarkup = true;
this.cattable.Add (this.label6);
- global::Gtk.Table.TableChild w25 = ((global::Gtk.Table.TableChild)(this.cattable
[this.label6]));
- w25.TopAttach = ((uint)(2));
- w25.BottomAttach = ((uint)(3));
- w25.XOptions = ((global::Gtk.AttachOptions)(4));
- w25.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w26 = ((global::Gtk.Table.TableChild)(this.cattable
[this.label6]));
+ w26.TopAttach = ((uint)(2));
+ w26.BottomAttach = ((uint)(3));
+ w26.XOptions = ((global::Gtk.AttachOptions)(4));
+ w26.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child cattable.Gtk.Table+TableChild
this.label9 = new global::Gtk.Label ();
this.label9.Name = "label9";
@@ -370,11 +376,11 @@ namespace LongoMatch.Gui.Component
this.label9.LabelProp = global::Mono.Unix.Catalog.GetString ("<span
font_desc=\"10\">Sort Method</span>");
this.label9.UseMarkup = true;
this.cattable.Add (this.label9);
- global::Gtk.Table.TableChild w26 = ((global::Gtk.Table.TableChild)(this.cattable
[this.label9]));
- w26.TopAttach = ((uint)(3));
- w26.BottomAttach = ((uint)(4));
- w26.XOptions = ((global::Gtk.AttachOptions)(4));
- w26.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w27 = ((global::Gtk.Table.TableChild)(this.cattable
[this.label9]));
+ w27.TopAttach = ((uint)(3));
+ w27.BottomAttach = ((uint)(4));
+ w27.XOptions = ((global::Gtk.AttachOptions)(4));
+ w27.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child cattable.Gtk.Table+TableChild
this.sortmethodcombobox = global::Gtk.ComboBox.NewText ();
this.sortmethodcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Sort by
name"));
@@ -384,13 +390,13 @@ namespace LongoMatch.Gui.Component
this.sortmethodcombobox.Name = "sortmethodcombobox";
this.sortmethodcombobox.Active = 0;
this.cattable.Add (this.sortmethodcombobox);
- global::Gtk.Table.TableChild w27 = ((global::Gtk.Table.TableChild)(this.cattable
[this.sortmethodcombobox]));
- w27.TopAttach = ((uint)(3));
- w27.BottomAttach = ((uint)(4));
- w27.LeftAttach = ((uint)(1));
- w27.RightAttach = ((uint)(2));
- w27.XOptions = ((global::Gtk.AttachOptions)(4));
- w27.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w28 = ((global::Gtk.Table.TableChild)(this.cattable
[this.sortmethodcombobox]));
+ w28.TopAttach = ((uint)(3));
+ w28.BottomAttach = ((uint)(4));
+ w28.LeftAttach = ((uint)(1));
+ w28.RightAttach = ((uint)(2));
+ w28.XOptions = ((global::Gtk.AttachOptions)(4));
+ w28.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child cattable.Gtk.Table+TableChild
this.tagscheckbutton = new global::Gtk.CheckButton ();
this.tagscheckbutton.CanFocus = true;
@@ -399,11 +405,11 @@ namespace LongoMatch.Gui.Component
this.tagscheckbutton.Active = true;
this.tagscheckbutton.DrawIndicator = true;
this.cattable.Add (this.tagscheckbutton);
- global::Gtk.Table.TableChild w28 = ((global::Gtk.Table.TableChild)(this.cattable
[this.tagscheckbutton]));
- w28.LeftAttach = ((uint)(1));
- w28.RightAttach = ((uint)(2));
- w28.XOptions = ((global::Gtk.AttachOptions)(4));
- w28.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w29 = ((global::Gtk.Table.TableChild)(this.cattable
[this.tagscheckbutton]));
+ w29.LeftAttach = ((uint)(1));
+ w29.RightAttach = ((uint)(2));
+ w29.XOptions = ((global::Gtk.AttachOptions)(4));
+ w29.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child cattable.Gtk.Table+TableChild
this.tprbutton = new global::Gtk.SpinButton (1, 10, 1);
this.tprbutton.CanFocus = true;
@@ -413,17 +419,17 @@ namespace LongoMatch.Gui.Component
this.tprbutton.Numeric = true;
this.tprbutton.Value = 2;
this.cattable.Add (this.tprbutton);
- global::Gtk.Table.TableChild w29 = ((global::Gtk.Table.TableChild)(this.cattable
[this.tprbutton]));
- w29.TopAttach = ((uint)(1));
- w29.BottomAttach = ((uint)(2));
- w29.LeftAttach = ((uint)(1));
- w29.RightAttach = ((uint)(2));
- w29.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w30 = ((global::Gtk.Table.TableChild)(this.cattable
[this.tprbutton]));
+ w30.TopAttach = ((uint)(1));
+ w30.BottomAttach = ((uint)(2));
+ w30.LeftAttach = ((uint)(1));
+ w30.RightAttach = ((uint)(2));
+ w30.YOptions = ((global::Gtk.AttachOptions)(4));
this.vbox3.Add (this.cattable);
- global::Gtk.Box.BoxChild w30 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.cattable]));
- w30.Position = 1;
- w30.Expand = false;
- w30.Fill = false;
+ global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.cattable]));
+ w31.Position = 2;
+ w31.Expand = false;
+ w31.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild
this.cardtable = new global::Gtk.Table (((uint)(1)), ((uint)(2)), true);
this.cardtable.Name = "cardtable";
@@ -436,8 +442,8 @@ namespace LongoMatch.Gui.Component
this.label16.LabelProp = global::Mono.Unix.Catalog.GetString ("<span
font_desc=\"10\">Shape</span>");
this.label16.UseMarkup = true;
this.cardtable.Add (this.label16);
- global::Gtk.Table.TableChild w31 = ((global::Gtk.Table.TableChild)(this.cardtable
[this.label16]));
- w31.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w32 = ((global::Gtk.Table.TableChild)(this.cardtable
[this.label16]));
+ w32.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child cardtable.Gtk.Table+TableChild
this.shapecombobox = global::Gtk.ComboBox.NewText ();
this.shapecombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Rectangle"));
@@ -446,15 +452,15 @@ namespace LongoMatch.Gui.Component
this.shapecombobox.Name = "shapecombobox";
this.shapecombobox.Active = 0;
this.cardtable.Add (this.shapecombobox);
- global::Gtk.Table.TableChild w32 = ((global::Gtk.Table.TableChild)(this.cardtable
[this.shapecombobox]));
- w32.LeftAttach = ((uint)(1));
- w32.RightAttach = ((uint)(2));
- w32.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w33 = ((global::Gtk.Table.TableChild)(this.cardtable
[this.shapecombobox]));
+ w33.LeftAttach = ((uint)(1));
+ w33.RightAttach = ((uint)(2));
+ w33.YOptions = ((global::Gtk.AttachOptions)(4));
this.vbox3.Add (this.cardtable);
- global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.cardtable]));
- w33.Position = 2;
- w33.Expand = false;
- w33.Fill = false;
+ global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.cardtable]));
+ w34.Position = 3;
+ w34.Expand = false;
+ w34.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild
this.scoretable = new global::Gtk.Table (((uint)(1)), ((uint)(2)), true);
this.scoretable.Name = "scoretable";
@@ -467,8 +473,8 @@ namespace LongoMatch.Gui.Component
this.label17.LabelProp = global::Mono.Unix.Catalog.GetString ("<span
font_desc=\"10\">Points</span>");
this.label17.UseMarkup = true;
this.scoretable.Add (this.label17);
- global::Gtk.Table.TableChild w34 = ((global::Gtk.Table.TableChild)(this.scoretable
[this.label17]));
- w34.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w35 = ((global::Gtk.Table.TableChild)(this.scoretable
[this.label17]));
+ w35.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child scoretable.Gtk.Table+TableChild
this.pointsbutton = new global::Gtk.SpinButton (0, 1000, 1);
this.pointsbutton.CanFocus = true;
@@ -477,16 +483,16 @@ namespace LongoMatch.Gui.Component
this.pointsbutton.ClimbRate = 1;
this.pointsbutton.Numeric = true;
this.scoretable.Add (this.pointsbutton);
- global::Gtk.Table.TableChild w35 = ((global::Gtk.Table.TableChild)(this.scoretable
[this.pointsbutton]));
- w35.LeftAttach = ((uint)(1));
- w35.RightAttach = ((uint)(2));
- w35.XOptions = ((global::Gtk.AttachOptions)(4));
- w35.YOptions = ((global::Gtk.AttachOptions)(4));
+ global::Gtk.Table.TableChild w36 = ((global::Gtk.Table.TableChild)(this.scoretable
[this.pointsbutton]));
+ w36.LeftAttach = ((uint)(1));
+ w36.RightAttach = ((uint)(2));
+ w36.XOptions = ((global::Gtk.AttachOptions)(4));
+ w36.YOptions = ((global::Gtk.AttachOptions)(4));
this.vbox3.Add (this.scoretable);
- global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.scoretable]));
- w36.Position = 3;
- w36.Expand = false;
- w36.Fill = false;
+ global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.scoretable]));
+ w37.Position = 4;
+ w37.Expand = false;
+ w37.Fill = false;
this.Add (this.vbox3);
if ((this.Child != null)) {
this.Child.ShowAll ();
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index dc546b7..5238184 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -1177,10 +1177,9 @@ Manual</property>
</packing>
</child>
<child>
- <widget class="Gtk.Table" id="cattable">
+ <widget class="Gtk.Table" id="postable">
<property name="MemberName" />
- <property name="Visible">False</property>
- <property name="NRows">7</property>
+ <property name="NRows">3</property>
<property name="NColumns">2</property>
<property name="Homogeneous">True</property>
<property name="RowSpacing">6</property>
@@ -1195,8 +1194,6 @@ Tag as trayectory</property>
<property name="Active">0</property>
</widget>
<packing>
- <property name="TopAttach">4</property>
- <property name="BottomAttach">5</property>
<property name="LeftAttach">1</property>
<property name="RightAttach">2</property>
<property name="AutoSize">True</property>
@@ -1219,8 +1216,8 @@ Tag as point</property>
<property name="Active">0</property>
</widget>
<packing>
- <property name="TopAttach">6</property>
- <property name="BottomAttach">7</property>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
<property name="LeftAttach">1</property>
<property name="RightAttach">2</property>
<property name="AutoSize">True</property>
@@ -1235,54 +1232,6 @@ Tag as point</property>
</packing>
</child>
<child>
- <widget class="Gtk.HBox" id="hbox5">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.Label" id="hotKeyLabel">
- <property name="MemberName" />
- <property name="LabelProp" translatable="yes">none</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Button" id="changebuton">
- <property name="MemberName" />
- <property name="Sensitive">False</property>
- <property name="CanFocus">True</property>
- <property name="Type">TextOnly</property>
- <property name="Label" translatable="yes">Change</property>
- <property name="UseUnderline">True</property>
- </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="TopAttach">2</property>
- <property name="BottomAttach">3</property>
- <property name="LeftAttach">1</property>
- <property name="RightAttach">2</property>
- <property name="AutoSize">False</property>
- <property name="YOptions">Fill</property>
- <property name="XExpand">True</property>
- <property name="XFill">True</property>
- <property name="XShrink">False</property>
- <property name="YExpand">False</property>
- <property name="YFill">True</property>
- <property name="YShrink">False</property>
- </packing>
- </child>
- <child>
<widget class="Gtk.ComboBox" id="hfieldcombobox">
<property name="MemberName" />
<property name="IsTextCombo">True</property>
@@ -1292,8 +1241,8 @@ Tag as trayectory</property>
<property name="Active">0</property>
</widget>
<packing>
- <property name="TopAttach">5</property>
- <property name="BottomAttach">6</property>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
<property name="LeftAttach">1</property>
<property name="RightAttach">2</property>
<property name="AutoSize">True</property>
@@ -1315,12 +1264,9 @@ Tag as trayectory</property>
<property name="UseMarkup">True</property>
</widget>
<packing>
- <property name="TopAttach">4</property>
- <property name="BottomAttach">5</property>
- <property name="AutoSize">True</property>
- <property name="XOptions">Fill</property>
+ <property name="AutoSize">False</property>
<property name="YOptions">Fill</property>
- <property name="XExpand">False</property>
+ <property name="XExpand">True</property>
<property name="XFill">True</property>
<property name="XShrink">False</property>
<property name="YExpand">False</property>
@@ -1336,8 +1282,8 @@ Tag as trayectory</property>
<property name="UseMarkup">True</property>
</widget>
<packing>
- <property name="TopAttach">5</property>
- <property name="BottomAttach">6</property>
+ <property name="TopAttach">1</property>
+ <property name="BottomAttach">2</property>
<property name="AutoSize">True</property>
<property name="XOptions">Fill</property>
<property name="YOptions">Fill</property>
@@ -1357,8 +1303,8 @@ Tag as trayectory</property>
<property name="UseMarkup">True</property>
</widget>
<packing>
- <property name="TopAttach">6</property>
- <property name="BottomAttach">7</property>
+ <property name="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
<property name="AutoSize">True</property>
<property name="XOptions">Fill</property>
<property name="YOptions">Fill</property>
@@ -1370,6 +1316,71 @@ Tag as trayectory</property>
<property name="YShrink">False</property>
</packing>
</child>
+ </widget>
+ <packing>
+ <property name="Position">1</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Table" id="cattable">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="NRows">4</property>
+ <property name="NColumns">2</property>
+ <property name="Homogeneous">True</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.HBox" id="hbox5">
+ <property name="MemberName" />
+ <property name="Spacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="hotKeyLabel">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">none</property>
+ </widget>
+ <packing>
+ <property name="Position">0</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Button" id="changebuton">
+ <property name="MemberName" />
+ <property name="Sensitive">False</property>
+ <property name="CanFocus">True</property>
+ <property name="Type">TextOnly</property>
+ <property name="Label" translatable="yes">Change</property>
+ <property name="UseUnderline">True</property>
+ </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="TopAttach">2</property>
+ <property name="BottomAttach">3</property>
+ <property name="LeftAttach">1</property>
+ <property name="RightAttach">2</property>
+ <property name="AutoSize">False</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">True</property>
+ <property name="XFill">True</property>
+ <property name="XShrink">False</property>
+ <property name="YExpand">False</property>
+ <property name="YFill">True</property>
+ <property name="YShrink">False</property>
+ </packing>
+ </child>
<child>
<widget class="Gtk.Label" id="label14">
<property name="MemberName" />
@@ -1529,7 +1540,7 @@ Sort by duration</property>
</child>
</widget>
<packing>
- <property name="Position">1</property>
+ <property name="Position">2</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -1585,7 +1596,7 @@ Circle</property>
</child>
</widget>
<packing>
- <property name="Position">2</property>
+ <property name="Position">3</property>
<property name="AutoSize">False</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -1643,7 +1654,7 @@ Circle</property>
</child>
</widget>
<packing>
- <property name="Position">3</property>
+ <property name="Position">4</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
@@ -6419,6 +6430,7 @@ You can continue with the current capture, cancel it or save your project.
<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>
@@ -9738,17 +9750,6 @@ You can continue with the current capture, cancel it or save your project.
</child>
</widget>
<widget class="Gtk.Bin" id="LongoMatch.Gui.Component.CodingWidget" design-size="1341 494">
- <action-group name="Timeline">
- <action id="positionMode">
- <property name="Type">Radio</property>
- <property name="Label" translatable="yes" />
- <property name="StockId">gtk-justify-fill</property>
- <property name="DrawAsRadio">False</property>
- <property name="Active">False</property>
- <property name="Value">0</property>
- <property name="Group">codingmode</property>
- </action>
- </action-group>
<action-group name="Default">
<action id="timelineMode">
<property name="Type">Radio</property>
@@ -9785,6 +9786,17 @@ You can continue with the current capture, cancel it or save your project.
<property name="Group">codingmode</property>
</action>
</action-group>
+ <action-group name="Timeline">
+ <action id="positionMode">
+ <property name="Type">Radio</property>
+ <property name="Label" translatable="yes" />
+ <property name="StockId">gtk-justify-fill</property>
+ <property name="DrawAsRadio">False</property>
+ <property name="Active">False</property>
+ <property name="Value">0</property>
+ <property name="Group">codingmode</property>
+ </action>
+ </action-group>
<property name="MemberName" />
<property name="Visible">False</property>
<child>
diff --git a/LongoMatch.GUI/gtk-gui/objects.xml b/LongoMatch.GUI/gtk-gui/objects.xml
index 00a341e..b13d44b 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -170,15 +170,6 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.CategoriesTreeView" palette-category="General"
allow-children="false" base-type="Gtk.TreeView">
- <itemgroups />
- <signals>
- <itemgroup label="CategoriesTreeView Signals">
- <signal name="CategoryClicked" />
- <signal name="CategoriesSelected" />
- </itemgroup>
- </signals>
- </object>
<object type="LongoMatch.Gui.Component.Stats.SubCategoryViewer" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals />
diff --git a/LongoMatch.Services/Services/EventsManager.cs b/LongoMatch.Services/Services/EventsManager.cs
index 5478da0..406cc66 100644
--- a/LongoMatch.Services/Services/EventsManager.cs
+++ b/LongoMatch.Services/Services/EventsManager.cs
@@ -171,7 +171,7 @@ namespace LongoMatch.Services
return frame;
}
- private void AddNewPlay (Category category, Time start, Time stop, List<Player> players,
+ private void AddNewPlay (AnalysisCategory category, Time start, Time stop, List<Player>
players,
List<Tag> tags, Image miniature)
{
Log.Debug (String.Format ("New play created start:{0} stop:{1} category:{2}",
@@ -209,7 +209,7 @@ namespace LongoMatch.Services
{
Image frame;
- if (player == null || openedProject == null)
+ if (player == null || openedProject == null || !(tagger is AnalysisCategory))
return;
start.MSeconds = Math.Max (0, start.MSeconds);
@@ -225,9 +225,7 @@ namespace LongoMatch.Services
}
}
frame = CaptureFrame (start);
- if (tagger is Category) {
- AddNewPlay (tagger as Category, start, stop, players, tags, frame);
- }
+ AddNewPlay (tagger as AnalysisCategory, start, stop, players, tags, frame);
}
void HandlePlaybackRateChanged (float rate)
diff --git a/LongoMatch.Services/Services/HotKeysManager.cs b/LongoMatch.Services/Services/HotKeysManager.cs
index cf69dd9..4616c70 100644
--- a/LongoMatch.Services/Services/HotKeysManager.cs
+++ b/LongoMatch.Services/Services/HotKeysManager.cs
@@ -32,12 +32,12 @@ namespace LongoMatch.Services
{
public class HotKeysManager
{
- Dictionary<HotKey, Category> dic;
+ Dictionary<HotKey, TaggerButton> dic;
bool ignoreKeys;
public HotKeysManager ()
{
- dic = new Dictionary<HotKey,Category> ();
+ dic = new Dictionary<HotKey,TaggerButton> ();
Config.EventsBroker.OpenedProjectChanged += HandleOpenedProjectChanged;
Config.EventsBroker.KeyPressed += KeyListener;
}
@@ -52,7 +52,7 @@ namespace LongoMatch.Services
dic.Clear ();
ignoreKeys = false;
- foreach (Category cat in project.Categories.CategoriesList) {
+ foreach (TaggerButton cat in project.Categories.List) {
if (cat.HotKey.Defined &&
!dic.ContainsKey (cat.HotKey))
dic.Add (cat.HotKey, cat);
@@ -65,7 +65,7 @@ namespace LongoMatch.Services
return;
#if HAVE_GTK
- Category cat = null;
+ TaggerButton cat = null;
HotKey hotkey = new HotKey ();
hotkey.Key = key;
diff --git a/Tests/Core/TestProject.cs b/Tests/Core/TestProject.cs
index 3f0ecbf..1becd6a 100644
--- a/Tests/Core/TestProject.cs
+++ b/Tests/Core/TestProject.cs
@@ -72,7 +72,7 @@ namespace Tests.Core
p.AddPlay (p.Categories.CategoriesList[2], new Time (1000), new Time (2000), null);
p.AddPlay (p.Categories.CategoriesList[6], new Time (1000), new Time (2000), null);
- IEnumerable<IGrouping<Category, Play>> g = p.PlaysGroupedByCategory;
+ IEnumerable<IGrouping<AnalysisCategory, Play>> g = p.PlaysGroupedByCategory;
Assert.AreEqual (g.Count(), 4);
IGrouping<Category, Play> gr = g.ElementAt (0);
Assert.AreEqual (gr.Key, p.Categories.CategoriesList[0]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]