[longomatch] Add new plays filter feature
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add new plays filter feature
- Date: Wed, 25 Jul 2012 11:44:40 +0000 (UTC)
commit 639c449e5b9112f7ea128ebc7471523f12e712bd
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Jul 25 13:43:45 2012 +0200
Add new plays filter feature
LongoMatch.Core/Common/PlaysFilter.cs | 117 +++++++++++++
LongoMatch.Core/Handlers/Handlers.cs | 3 +
LongoMatch.Core/Interfaces/GUI/IMainWindow.cs | 2 +-
LongoMatch.Core/LongoMatch.Core.mdp | 1 +
LongoMatch.Core/Store/Player.cs | 5 +
LongoMatch.Core/Store/TagStore.cs | 5 +
LongoMatch.GUI/CategoriesFilter.cs | 17 ++
LongoMatch.GUI/Gui/Component/CategoriesFilter.cs | 106 +++++++++++
LongoMatch.GUI/Gui/Component/PlayersFilter.cs | 144 +++++++++++++++
.../Gui/Component/PlayersListTreeWidget.cs | 6 +
.../Gui/Component/PlaysListTreeWidget.cs | 6 +
.../{ => Gui/Component}/PlaysSelectionWidget.cs | 7 +-
LongoMatch.GUI/Gui/MainWindow.cs | 9 +-
LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs | 66 ++++++--
LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs | 15 +--
LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs | 4 +-
LongoMatch.GUI/LongoMatch.GUI.mdp | 9 +-
.../LongoMatch.Gui.Component.CategoriesFilter.cs | 19 ++
.../LongoMatch.Gui.Component.PlayersFilter.cs | 32 ++++
...ongoMatch.Gui.Component.PlaysSelectionWidget.cs | 32 ++++-
.../LongoMatch.Gui.Component.TagsTreeWidget.cs | 114 ------------
.../gtk-gui/LongoMatch.Gui.MainWindow.cs | 4 +-
LongoMatch.GUI/gtk-gui/gui.stetic | 184 ++++++++------------
LongoMatch.GUI/gtk-gui/objects.xml | 136 +++++++++++----
LongoMatch.Services/Services/ProjectsManager.cs | 3 +-
libcesarplayer/liblongomatch.mdp | 2 +-
26 files changed, 745 insertions(+), 303 deletions(-)
---
diff --git a/LongoMatch.Core/Common/PlaysFilter.cs b/LongoMatch.Core/Common/PlaysFilter.cs
new file mode 100644
index 0000000..c52c2c4
--- /dev/null
+++ b/LongoMatch.Core/Common/PlaysFilter.cs
@@ -0,0 +1,117 @@
+//
+// Copyright (C) 2012 Andoni Morales Alastruey
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using LongoMatch.Handlers;
+using LongoMatch.Store;
+
+namespace LongoMatch.Common
+{
+ public class PlaysFilter
+ {
+
+ public event FilterUpdatedHandler FilterUpdated;
+
+ List<Category> categoriesFilter;
+ List<Player> playersFilter;
+ Project project;
+
+ public PlaysFilter (Project project)
+ {
+ this.project = project;
+ categoriesFilter = new List<Category>();
+ playersFilter = new List<Player>();
+ ClearAll();
+ }
+
+ public void Update () {
+ EmitFilterUpdated();
+ }
+
+ public void ClearPlayersFilter () {
+ categoriesFilter.Clear();
+ foreach (var cat in project.Categories)
+ categoriesFilter.Add(cat);
+ }
+
+ public void ClearCategoriesFilter () {
+ playersFilter.Clear();
+ foreach (var player in project.LocalTeamTemplate)
+ playersFilter.Add(player);
+ foreach (var player in project.VisitorTeamTemplate)
+ playersFilter.Add(player);
+ }
+
+ public void ClearAll () {
+ ClearCategoriesFilter();
+ ClearPlayersFilter();
+ }
+
+ public void FilterPlayer (Player player) {
+ playersFilter.Remove(player);
+ }
+
+ public void UnFilterPlayer(Player player) {
+ if (!playersFilter.Contains(player))
+ playersFilter.Add(player);
+ }
+
+ public void FilterCategory (Category category) {
+ categoriesFilter.Remove(category);
+ }
+
+ public void UnFilterCategory(Category category) {
+ if (!categoriesFilter.Contains(category))
+ categoriesFilter.Add(category);
+ }
+
+ public List<Category> VisibleCategories {
+ get {
+ return categoriesFilter;
+ }
+ }
+
+ public List<Player> VisiblePlayers {
+ get {
+ return playersFilter;
+ }
+ }
+
+ public bool IsVisible(object o) {
+ if (o is Player) {
+ return VisiblePlayers.Contains(o as Player);
+ } else if (o is Category) {
+ return VisibleCategories.Contains(o as Category);
+ } else if (o is Play) {
+ Play play = o as Play;
+ return VisiblePlayers.Intersect(play.Players.GetTagsValues()).Count() != 0 &&
+ VisibleCategories.Contains(play.Category);
+ } else {
+ return false;
+ }
+ }
+
+ void EmitFilterUpdated () {
+ if (FilterUpdated != null)
+ FilterUpdated ();
+ }
+ }
+}
+
diff --git a/LongoMatch.Core/Handlers/Handlers.cs b/LongoMatch.Core/Handlers/Handlers.cs
index 3fd18bf..9a877fd 100644
--- a/LongoMatch.Core/Handlers/Handlers.cs
+++ b/LongoMatch.Core/Handlers/Handlers.cs
@@ -129,4 +129,7 @@ namespace LongoMatch.Handlers
public delegate void KeyHandler (object sender, int key, int modifier);
+ /* The plays filter was updated */
+ public delegate void FilterUpdatedHandler ();
+
}
diff --git a/LongoMatch.Core/Interfaces/GUI/IMainWindow.cs b/LongoMatch.Core/Interfaces/GUI/IMainWindow.cs
index 08c9f09..827246a 100644
--- a/LongoMatch.Core/Interfaces/GUI/IMainWindow.cs
+++ b/LongoMatch.Core/Interfaces/GUI/IMainWindow.cs
@@ -72,7 +72,7 @@ namespace LongoMatch.Interfaces.GUI
event KeyHandler KeyPressed;
- void SetProject(Project project, ProjectType projectType, CaptureSettings props);
+ void SetProject(Project project, ProjectType projectType, CaptureSettings props, PlaysFilter filter);
void AddPlay(Play play);
void UpdateSelectedPlay (Play play);
void UpdateCategories (Categories categories);
diff --git a/LongoMatch.Core/LongoMatch.Core.mdp b/LongoMatch.Core/LongoMatch.Core.mdp
index 83cb0b7..4e8d4b5 100644
--- a/LongoMatch.Core/LongoMatch.Core.mdp
+++ b/LongoMatch.Core/LongoMatch.Core.mdp
@@ -98,6 +98,7 @@
<File subtype="Code" buildaction="Compile" name="Stats/PlayersStats.cs" />
<File subtype="Code" buildaction="Compile" name="Stats/GameUnitStats.cs" />
<File subtype="Code" buildaction="Compile" name="Stats/GameUnitsStats.cs" />
+ <File subtype="Code" buildaction="Compile" name="Common/PlaysFilter.cs" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
diff --git a/LongoMatch.Core/Store/Player.cs b/LongoMatch.Core/Store/Player.cs
index ca0dd06..d344b3d 100644
--- a/LongoMatch.Core/Store/Player.cs
+++ b/LongoMatch.Core/Store/Player.cs
@@ -118,6 +118,11 @@ namespace LongoMatch.Store
get;
set;
}
+
+ public override string ToString ()
+ {
+ return String.Format("{0} ({1})", Name, Number);
+ }
#endregion
}
diff --git a/LongoMatch.Core/Store/TagStore.cs b/LongoMatch.Core/Store/TagStore.cs
index 6e442cd..c4edf0e 100644
--- a/LongoMatch.Core/Store/TagStore.cs
+++ b/LongoMatch.Core/Store/TagStore.cs
@@ -77,6 +77,11 @@ namespace LongoMatch.Store
where tag.SubCategory.Equals(subCategory)
select tag).ToList();
}
+
+ public List<W> GetTagsValues() {
+ return (from tag in tagsList
+ select tag.Value).ToList();
+ }
}
[Serializable]
diff --git a/LongoMatch.GUI/CategoriesFilter.cs b/LongoMatch.GUI/CategoriesFilter.cs
new file mode 100644
index 0000000..abb3efd
--- /dev/null
+++ b/LongoMatch.GUI/CategoriesFilter.cs
@@ -0,0 +1,17 @@
+//
+// Copyright (C) 2012 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.
+//
diff --git a/LongoMatch.GUI/Gui/Component/CategoriesFilter.cs b/LongoMatch.GUI/Gui/Component/CategoriesFilter.cs
new file mode 100644
index 0000000..200bf00
--- /dev/null
+++ b/LongoMatch.GUI/Gui/Component/CategoriesFilter.cs
@@ -0,0 +1,106 @@
+//
+// Copyright (C) 2012 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 Gtk;
+using Mono.Unix;
+
+using LongoMatch.Common;
+using LongoMatch.Store;
+using LongoMatch.Store.Templates;
+
+namespace LongoMatch.Gui.Component
+{
+ [System.ComponentModel.ToolboxItem(true)]
+ public partial class CategoriesFilter : Gtk.Bin
+ {
+ PlaysFilter filter;
+ Categories categories;
+ TreeView tree;
+
+ public CategoriesFilter ()
+ {
+ this.Build ();
+ tree = new TreeView();
+ this.Add(tree);
+ tree.Show();
+ CreateTree();
+ }
+
+ public void SetFilter (PlaysFilter filter, Categories categories) {
+ this.filter = filter;
+ this.categories = categories;
+ FillTree();
+ }
+
+ private void CreateTree () {
+ TreeViewColumn nameColumn = new TreeViewColumn ();
+ CellRendererText nameCell = new CellRendererText ();
+ nameColumn.Title = Catalog.GetString("Category");
+ nameColumn.PackStart (nameCell, true);
+ nameColumn.SetCellDataFunc (nameCell, new TreeCellDataFunc (RenderCategory));
+
+ TreeViewColumn filterColumn = new TreeViewColumn ();
+ CellRendererToggle filterCell = new CellRendererToggle ();
+ filterColumn.Title = Catalog.GetString("Filter");
+ filterCell.Toggled += HandleFilterCellToggled;
+ filterColumn.PackStart (filterCell, true);
+ filterColumn.AddAttribute(filterCell, "active", 1);
+
+ tree.AppendColumn (nameColumn);
+ tree.AppendColumn (filterColumn);
+ }
+
+ private void FillTree () {
+ ListStore store = new ListStore (typeof (Category), typeof (bool));
+
+ foreach (Category cat in categories) {
+ store.AppendValues(cat, filter.VisibleCategories.Contains(cat));
+ }
+ tree.Model = store;
+ }
+
+ void HandleFilterCellToggled (object o, ToggledArgs args)
+ {
+ Gtk.TreeIter iter;
+ ListStore store = tree.Model as ListStore;
+
+ if (store.GetIterFromString(out iter, args.Path))
+ {
+ Category cat = (Category) store.GetValue(iter, 0);
+ bool active = !((bool) store.GetValue(iter, 1));
+
+ if (active) {
+ filter.UnFilterCategory(cat);
+ } else {
+ filter.FilterCategory(cat);
+ }
+
+ store.SetValue(iter, 1, active);
+ filter.Update();
+ }
+ }
+
+ private void RenderCategory (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
+ {
+ Category category = (Category) model.GetValue (iter, 0);
+ (cell as CellRendererText).Text = category.Name;
+ }
+ }
+}
+
+
diff --git a/LongoMatch.GUI/Gui/Component/PlayersFilter.cs b/LongoMatch.GUI/Gui/Component/PlayersFilter.cs
new file mode 100644
index 0000000..385cd1a
--- /dev/null
+++ b/LongoMatch.GUI/Gui/Component/PlayersFilter.cs
@@ -0,0 +1,144 @@
+//
+// Copyright (C) 2012 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 Mono.Unix;
+using Gtk;
+
+using LongoMatch.Common;
+using LongoMatch.Store;
+using LongoMatch.Store.Templates;
+
+namespace LongoMatch.Gui.Component
+{
+ [System.ComponentModel.ToolboxItem(true)]
+ public partial class PlayersFilter : Gtk.Bin
+ {
+ PlaysFilter filter;
+ TeamTemplate local, visitor;
+ Player localTeam, visitorTeam;
+ TreeIter localIter, visitorIter;
+
+ public PlayersFilter ()
+ {
+ this.Build ();
+ localTeam = new Player();
+ visitorTeam = new Player();
+ CreateTree();
+ }
+
+ public void SetFilter (PlaysFilter filter, TeamTemplate local, TeamTemplate visitor) {
+ this.filter = filter;
+ this.local = local;
+ this.visitor = visitor;
+ localTeam.Name = local.TeamName;
+ visitorTeam.Name = visitor.TeamName;
+ FillTree();
+ }
+
+ private void CreateTree () {
+ TreeViewColumn nameColumn = new TreeViewColumn ();
+ CellRendererText nameCell = new CellRendererText ();
+ nameColumn.Title = Catalog.GetString("Player");
+ nameColumn.PackStart (nameCell, true);
+ nameColumn.SetCellDataFunc (nameCell, new TreeCellDataFunc (RenderPlayer));
+
+ TreeViewColumn filterColumn = new TreeViewColumn ();
+ CellRendererToggle filterCell = new CellRendererToggle ();
+ filterColumn.Title = Catalog.GetString("Filter");
+ filterCell.Toggled += HandleFilterCellToggled;
+ filterColumn.PackStart (filterCell, true);
+ filterColumn.AddAttribute(filterCell, "active", 1);
+
+ tree.AppendColumn (nameColumn);
+ tree.AppendColumn (filterColumn);
+ }
+
+ private void FillTree () {
+ TreeStore store = new TreeStore (typeof (Player), typeof (bool));
+ localIter = store.AppendValues (localTeam);
+ visitorIter = store.AppendValues (visitorTeam);
+ store.SetValue(localIter, 1, false);
+ store.SetValue(visitorIter, 1, false);
+
+ foreach (Player player in local.PlayingPlayersList) {
+ store.AppendValues (localIter, player, filter.VisiblePlayers.Contains(player));
+ }
+
+ foreach (Player player in visitor.PlayingPlayersList) {
+ store.AppendValues (visitorIter, player, filter.VisiblePlayers.Contains(player));
+ }
+ tree.Model = store;
+ }
+
+ void HandleFilterCellToggled (object o, ToggledArgs args)
+ {
+ Gtk.TreeIter iter;
+ TreeStore store = tree.Model as TreeStore;
+
+ if (store.GetIterFromString(out iter, args.Path))
+ {
+ Player player = (Player) store.GetValue(iter, 0);
+ bool active = !((bool) store.GetValue(iter, 1));
+
+ /* Check all children */
+ if (player == localTeam || player == visitorTeam)
+ {
+ TreeIter child;
+ store.IterChildren(out child, iter);
+
+ while (store.IterIsValid(child)) {
+ Player childPlayer = (Player) store.GetValue(child, 0);
+ if (active)
+ filter.UnFilterPlayer(childPlayer);
+ else
+ filter.FilterPlayer(childPlayer);
+ store.SetValue(child, 1, active);
+ store.IterNext(ref child);
+ }
+ } else {
+ if (active) {
+ filter.UnFilterPlayer(player);
+ } else {
+ TreeIter team;
+ filter.FilterPlayer(player);
+ /* Uncheck the team check button */
+ if (local.Contains(player))
+ team = localIter;
+ else
+ team = visitorIter;
+ store.SetValue(team, 1, false);
+ }
+ }
+
+ store.SetValue(iter, 1, active);
+ filter.Update();
+ }
+ }
+
+ private void RenderPlayer (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
+ {
+ Player player = (Player) model.GetValue (iter, 0);
+ string name = player.ToString();
+ if (player == localTeam || player == visitorTeam) {
+ name = player.Name;
+ }
+ (cell as CellRendererText).Text = name;
+ }
+ }
+}
+
diff --git a/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs b/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
index 7eee510..7345569 100644
--- a/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlayersListTreeWidget.cs
@@ -67,6 +67,12 @@ namespace LongoMatch.Gui.Component
}
}
+ public PlaysFilter Filter {
+ set{
+ playerstreeview.Filter = value;
+ }
+ }
+
public void SetTeam(TeamTemplate template, List<Play> plays) {
TreeStore team;
Dictionary<Player, TreeIter> playersDict = new Dictionary<Player, TreeIter>();
diff --git a/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs b/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
index 4eac941..115170a 100644
--- a/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysListTreeWidget.cs
@@ -69,6 +69,12 @@ namespace LongoMatch.Gui.Component
ts = value;
}
}
+
+ public PlaysFilter Filter {
+ set{
+ treeview.Filter = value;
+ }
+ }
public void RemovePlays(List<Play> plays) {
TreeIter iter, child;
diff --git a/LongoMatch.GUI/PlaysSelectionWidget.cs b/LongoMatch.GUI/Gui/Component/PlaysSelectionWidget.cs
similarity index 93%
rename from LongoMatch.GUI/PlaysSelectionWidget.cs
rename to LongoMatch.GUI/Gui/Component/PlaysSelectionWidget.cs
index 5ea3d59..0085b4b 100644
--- a/LongoMatch.GUI/PlaysSelectionWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/PlaysSelectionWidget.cs
@@ -48,7 +48,7 @@ namespace LongoMatch.Gui.Component
#region Plubic Methods
- public void SetProject(Project project, bool isLive) {
+ public void SetProject(Project project, bool isLive, PlaysFilter filter) {
this.project = project;
playsList.ProjectIsLive = isLive;
localPlayersList.ProjectIsLive = isLive;
@@ -58,7 +58,12 @@ namespace LongoMatch.Gui.Component
localPlayersList.Project = project;
visitorPlaysList.LabelProp = project.VisitorTeamTemplate.TeamName;
localPlaysList.LabelProp = project.LocalTeamTemplate.TeamName;
+ playsList.Filter = filter;
+ localPlayersList.Filter = filter;
+ visitorPlayersList.Filter = filter;
UpdateTeamsModels();
+ playersfilter.SetFilter(filter, project.LocalTeamTemplate, project.VisitorTeamTemplate);
+ categoriesfilter.SetFilter(filter, project.Categories);
}
public void Clear() {
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index c1f39c0..a4acfd0 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -325,7 +325,7 @@ namespace LongoMatch.Gui
}
}
- public void SetProject(Project project, ProjectType projectType, CaptureSettings props)
+ public void SetProject(Project project, ProjectType projectType, CaptureSettings props, PlaysFilter filter)
{
bool isLive = false;
@@ -354,7 +354,8 @@ namespace LongoMatch.Gui
openedProject = project;
this.projectType = projectType;
- playsSelection.SetProject(project, isLive);
+ filter.FilterUpdated += OnFilterUpdated;
+ playsSelection.SetProject(project, isLive, filter);
buttonswidget.Categories = project.Categories;
MakeActionsSensitive(true,projectType);
ShowWidgets();
@@ -676,6 +677,10 @@ namespace LongoMatch.Gui
" the current project will be closed:")+"\n" + message);
EmitCloseOpenedProject(true);
}
+
+ protected virtual void OnFilterUpdated()
+ {
+ }
#endregion
#region Events
diff --git a/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs b/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs
index e76ab50..9146e24 100644
--- a/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs
+++ b/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs
@@ -41,6 +41,9 @@ namespace LongoMatch.Gui.Component
protected Gtk.TreeViewColumn nameColumn;
protected bool editing;
protected bool projectIsLive;
+
+ TreeModelFilter modelFilter;
+ PlaysFilter filter;
public event TimeNodeChangedHandler TimeNodeChanged;
public event PlaySelectedHandler TimeNodeSelected;
@@ -95,6 +98,34 @@ namespace LongoMatch.Gui.Component
}
}
+ public PlaysFilter Filter {
+ set {
+ filter = value;
+ filter.FilterUpdated += OnFilterUpdated;
+ }
+ get {
+ return filter;
+ }
+ }
+
+ new public TreeStore Model {
+ set {
+ if(value != null) {
+ modelFilter = new TreeModelFilter (value, null);
+ modelFilter.VisibleFunc = new TreeModelFilterVisibleFunc (FilterFunction);
+ value.SetSortFunc(0, SortFunction);
+ value.SetSortColumnId(0,SortType.Ascending);
+ // Assign the filter as our tree's model
+ base.Model = modelFilter;
+ } else {
+ base.Model = null;
+ }
+ }
+ get {
+ return (base.Model as TreeModelFilter).ChildModel as TreeStore;
+ }
+ }
+
protected void EmitTimeNodeChanged(TimeNode tn, object o) {
if(TimeNodeChanged != null)
TimeNodeChanged(tn, o);
@@ -138,8 +169,8 @@ namespace LongoMatch.Gui.Component
protected object GetValueFromPath(TreePath path) {
Gtk.TreeIter iter;
- Model.GetIter(out iter, path);
- return Model.GetValue(iter,0);
+ modelFilter.GetIter(out iter, path);
+ return modelFilter.GetValue(iter,0);
}
protected void EmitTimeNodeChanged(TimeNode tNode) {
@@ -201,21 +232,28 @@ namespace LongoMatch.Gui.Component
} else if(o is Player) {
c.Background = "white";
c.CellBackground = "white";
- c.Markup = String.Format("{0} ({1})", (o as Player).Name, Model.IterNChildren(iter));
+ c.Markup = String.Format("{0} ({1})", (o as Player).Name, modelFilter.IterNChildren(iter));
} else if(o is Category) {
c.Background = "white";
c.CellBackground = "white";
- c.Markup = String.Format("{0} ({1})", (o as TimeNode).Name, Model.IterNChildren(iter));
+ c.Markup = String.Format("{0} ({1})", (o as TimeNode).Name, modelFilter.IterNChildren(iter));
}
}
+ protected bool FilterFunction(TreeModel model, TreeIter iter) {
+ if (Filter == null)
+ return true;
+ object o = model.GetValue(iter, 0);
+ return Filter.IsVisible(o);
+ }
+
protected virtual void OnNameCellEdited(object o, Gtk.EditedArgs args)
{
Gtk.TreeIter iter;
object item;
- Model.GetIter(out iter, new Gtk.TreePath(args.Path));
- item = this.Model.GetValue(iter,0);
+ modelFilter.GetIter(out iter, new Gtk.TreePath(args.Path));
+ item = modelFilter.GetValue(iter,0);
if(item is TimeNode) {
(item as TimeNode).Name = args.NewText;
@@ -231,8 +269,8 @@ namespace LongoMatch.Gui.Component
protected virtual void OnTreeviewRowActivated(object o, Gtk.RowActivatedArgs args)
{
Gtk.TreeIter iter;
- this.Model.GetIter(out iter, args.Path);
- object item = this.Model.GetValue(iter, 0);
+ modelFilter.GetIter(out iter, args.Path);
+ object item = modelFilter.GetValue(iter, 0);
if(!(item is Play))
return;
@@ -250,14 +288,14 @@ namespace LongoMatch.Gui.Component
* each time a row is deleted */
foreach(var path in paths) {
TreeIter iter;
- Model.GetIter(out iter, path);
- playsList.Add((Play)Model.GetValue(iter, 0));
+ modelFilter.GetIter(out iter, path);
+ playsList.Add((Play)modelFilter.GetValue(iter, 0));
iters.Add(iter);
}
/* Delete all the iters now */
for(int i=0; i< iters.Count; i++) {
TreeIter iter = iters[i];
- (Model as TreeStore).Remove(ref iter);
+ Model.Remove(ref iter);
}
if(TimeNodeDeleted != null)
TimeNodeDeleted(playsList);
@@ -316,6 +354,12 @@ namespace LongoMatch.Gui.Component
NewRenderingJob(this, null);
}
+ protected void OnFilterUpdated() {
+ modelFilter.Refilter();
+ }
+
protected abstract bool SelectFunction(TreeSelection selection, TreeModel model, TreePath path, bool selected);
+ protected abstract int SortFunction(TreeModel model, TreeIter a, TreeIter b);
+
}
}
diff --git a/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs b/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs
index 52b8912..d2e65a5 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlayersTreeView.cs
@@ -45,19 +45,6 @@ namespace LongoMatch.Gui.Component
get;
}
- new public TreeStore Model {
- set {
- if(value != null) {
- value.SetSortFunc(0, SortFunction);
- value.SetSortColumnId(0,SortType.Ascending);
- }
- base.Model = value;
- }
- get {
- return base.Model as TreeStore;
- }
- }
-
private void SetPlayersMenu() {
Action edit;
UIManager manager;
@@ -83,7 +70,7 @@ namespace LongoMatch.Gui.Component
edit.Activated += OnEdit;
}
- protected int SortFunction(TreeModel model, TreeIter a, TreeIter b) {
+ protected override int SortFunction(TreeModel model, TreeIter a, TreeIter b) {
object oa;
object ob;
diff --git a/LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs b/LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs
index 0a7f326..be8a14d 100644
--- a/LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs
+++ b/LongoMatch.GUI/Gui/TreeView/PlaysTreeView.cs
@@ -57,7 +57,7 @@ namespace LongoMatch.Gui.Component
return base.Model as TreeStore;
}
}
-
+
private void SetCategoriesMenu() {
Gtk.Action edit, editProp, sortMenu;
UIManager manager;
@@ -132,7 +132,7 @@ namespace LongoMatch.Gui.Component
}
}
- protected int SortFunction(TreeModel model, TreeIter a, TreeIter b) {
+ protected override int SortFunction(TreeModel model, TreeIter a, TreeIter b) {
TreeStore store;
TimeNode tna, tnb;
TreeIter parent;
diff --git a/LongoMatch.GUI/LongoMatch.GUI.mdp b/LongoMatch.GUI/LongoMatch.GUI.mdp
index 3d3564b..899723f 100644
--- a/LongoMatch.GUI/LongoMatch.GUI.mdp
+++ b/LongoMatch.GUI/LongoMatch.GUI.mdp
@@ -59,8 +59,6 @@
<File subtype="Code" buildaction="Compile" name="Gui/Dialog/DrawingTool.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Component/TaggerWidget.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Dialog/TaggerDialog.cs" />
- <File subtype="Code" buildaction="Compile" name="Gui/TreeView/TagsTreeView.cs" />
- <File subtype="Code" buildaction="Compile" name="Gui/Component/TagsTreeWidget.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Dialog/ProjectSelectionDialog.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Dialog/EndCaptureDialog.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Dialog/BusyDialog.cs" />
@@ -95,7 +93,6 @@
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.TaggerWidget.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.TaggerDialog.cs" />
- <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.TagsTreeWidget.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.EndCaptureDialog.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Dialog.BusyDialog.cs" />
@@ -153,8 +150,12 @@
<File subtype="Code" buildaction="Compile" name="Gui/Cairo.cs" />
<File subtype="Code" buildaction="Compile" name="Gui/Component/PlayersTagger.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.PlayersTagger.cs" />
- <File subtype="Code" buildaction="Compile" name="PlaysSelectionWidget.cs" />
<File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.PlaysSelectionWidget.cs" />
+ <File subtype="Code" buildaction="Compile" name="Gui/Component/PlayersFilter.cs" />
+ <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.PlayersFilter.cs" />
+ <File subtype="Code" buildaction="Compile" name="Gui/Component/CategoriesFilter.cs" />
+ <File subtype="Code" buildaction="Compile" name="gtk-gui/LongoMatch.Gui.Component.CategoriesFilter.cs" />
+ <File subtype="Code" buildaction="Compile" name="Gui/Component/PlaysSelectionWidget.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.CategoriesFilter.cs b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoriesFilter.cs
new file mode 100644
index 0000000..5bffd1a
--- /dev/null
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoriesFilter.cs
@@ -0,0 +1,19 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace LongoMatch.Gui.Component
+{
+ public partial class CategoriesFilter
+ {
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget LongoMatch.Gui.Component.CategoriesFilter
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "LongoMatch.Gui.Component.CategoriesFilter";
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ }
+ }
+}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.PlayersFilter.cs b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.PlayersFilter.cs
new file mode 100644
index 0000000..a500179
--- /dev/null
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.PlayersFilter.cs
@@ -0,0 +1,32 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace LongoMatch.Gui.Component
+{
+ public partial class PlayersFilter
+ {
+ private global::Gtk.ScrolledWindow GtkScrolledWindow;
+ private global::Gtk.TreeView tree;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget LongoMatch.Gui.Component.PlayersFilter
+ global::Stetic.BinContainer.Attach (this);
+ this.Name = "LongoMatch.Gui.Component.PlayersFilter";
+ // Container child LongoMatch.Gui.Component.PlayersFilter.Gtk.Container+ContainerChild
+ this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
+ this.GtkScrolledWindow.Name = "GtkScrolledWindow";
+ this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
+ // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
+ this.tree = new global::Gtk.TreeView ();
+ this.tree.CanFocus = true;
+ this.tree.Name = "tree";
+ this.GtkScrolledWindow.Add (this.tree);
+ this.Add (this.GtkScrolledWindow);
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.Hide ();
+ }
+ }
+}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.PlaysSelectionWidget.cs b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.PlaysSelectionWidget.cs
index 54a4ea2..99a90f2 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.PlaysSelectionWidget.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.PlaysSelectionWidget.cs
@@ -11,6 +11,10 @@ namespace LongoMatch.Gui.Component
private global::Gtk.Label localPlaysList;
private global::LongoMatch.Gui.Component.PlayersListTreeWidget visitorPlayersList;
private global::Gtk.Label visitorPlaysList;
+ private global::LongoMatch.Gui.Component.PlayersFilter playersfilter;
+ private global::Gtk.Label label4;
+ private global::LongoMatch.Gui.Component.CategoriesFilter categoriesfilter;
+ private global::Gtk.Label label5;
protected virtual void Build ()
{
@@ -22,7 +26,7 @@ namespace LongoMatch.Gui.Component
this.notebook1 = new global::Gtk.Notebook ();
this.notebook1.CanFocus = true;
this.notebook1.Name = "notebook1";
- this.notebook1.CurrentPage = 2;
+ this.notebook1.CurrentPage = 4;
this.notebook1.TabPos = ((global::Gtk.PositionType)(3));
// Container child notebook1.Gtk.Notebook+NotebookChild
this.playsList = new global::LongoMatch.Gui.Component.PlaysListTreeWidget ();
@@ -59,6 +63,32 @@ namespace LongoMatch.Gui.Component
this.visitorPlaysList.Name = "visitorPlaysList";
this.notebook1.SetTabLabel (this.visitorPlayersList, this.visitorPlaysList);
this.visitorPlaysList.ShowAll ();
+ // Container child notebook1.Gtk.Notebook+NotebookChild
+ this.playersfilter = new global::LongoMatch.Gui.Component.PlayersFilter ();
+ this.playersfilter.Events = ((global::Gdk.EventMask)(256));
+ this.playersfilter.Name = "playersfilter";
+ this.notebook1.Add (this.playersfilter);
+ global::Gtk.Notebook.NotebookChild w4 = ((global::Gtk.Notebook.NotebookChild)(this.notebook1 [this.playersfilter]));
+ w4.Position = 3;
+ // Notebook tab
+ this.label4 = new global::Gtk.Label ();
+ this.label4.Name = "label4";
+ this.label4.LabelProp = global::Mono.Unix.Catalog.GetString ("Players filter");
+ this.notebook1.SetTabLabel (this.playersfilter, this.label4);
+ this.label4.ShowAll ();
+ // Container child notebook1.Gtk.Notebook+NotebookChild
+ this.categoriesfilter = new global::LongoMatch.Gui.Component.CategoriesFilter ();
+ this.categoriesfilter.Events = ((global::Gdk.EventMask)(256));
+ this.categoriesfilter.Name = "categoriesfilter";
+ this.notebook1.Add (this.categoriesfilter);
+ global::Gtk.Notebook.NotebookChild w5 = ((global::Gtk.Notebook.NotebookChild)(this.notebook1 [this.categoriesfilter]));
+ w5.Position = 4;
+ // Notebook tab
+ this.label5 = new global::Gtk.Label ();
+ this.label5.Name = "label5";
+ this.label5.LabelProp = global::Mono.Unix.Catalog.GetString ("Categories filter");
+ this.notebook1.SetTabLabel (this.categoriesfilter, this.label5);
+ this.label5.ShowAll ();
this.Add (this.notebook1);
if ((this.Child != null)) {
this.Child.ShowAll ();
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
index 781fd51..09ca5ce 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -135,12 +135,12 @@ namespace LongoMatch.Gui
this.ImportProjectAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Import Project");
w1.Add (this.ImportProjectAction, "<Control>i");
this.ManualTaggingViewAction = new global::Gtk.RadioAction ("ManualTaggingViewAction", global::Mono.Unix.Catalog.GetString ("Manual tagging view"), null, null, 0);
- this.ManualTaggingViewAction.Group = this.TaggingViewAction.Group;
+ this.ManualTaggingViewAction.Group = this.TimelineViewAction.Group;
this.ManualTaggingViewAction.Sensitive = false;
this.ManualTaggingViewAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Free Capture Mode");
w1.Add (this.ManualTaggingViewAction, "<Control>f");
this.GameUnitsViewAction = new global::Gtk.RadioAction ("GameUnitsViewAction", global::Mono.Unix.Catalog.GetString ("Game units view"), null, null, 0);
- this.GameUnitsViewAction.Group = this.TaggingViewAction.Group;
+ this.GameUnitsViewAction.Group = this.ManualTaggingViewAction.Group;
this.GameUnitsViewAction.Sensitive = false;
this.GameUnitsViewAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Game units view");
w1.Add (this.GameUnitsViewAction, null);
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 2cb3984..df5ee45 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -5280,119 +5280,6 @@ Show-><b> S</b>
</widget>
</child>
</widget>
- <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.TagsTreeWidget" design-size="217 300">
- <property name="MemberName" />
- <property name="Visible">False</property>
- <child>
- <widget class="Gtk.VBox" id="vbox1">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
- <property name="MemberName" />
- <property name="ShadowType">In</property>
- <child>
- <widget class="LongoMatch.Gui.Component.TagsTreeView" id="treeview">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="ShowScrollbars">True</property>
- <property name="Colors">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.VBox" id="tagsvbox">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <placeholder />
- </child>
- <child>
- <placeholder />
- </child>
- <child>
- <placeholder />
- </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>
- <child>
- <widget class="Gtk.HBox" id="hbox1">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.ComboBox" id="tagscombobox">
- <property name="MemberName" />
- <property name="IsTextCombo">True</property>
- <property name="Items" translatable="yes" />
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.Button" id="AddFilterButton">
- <property name="MemberName" />
- <property name="CanFocus">True</property>
- <property name="Type">TextAndIcon</property>
- <property name="Icon">stock:gtk-add Menu</property>
- <property name="Label" translatable="yes">Add Filter</property>
- <property name="UseUnderline">True</property>
- <signal name="Clicked" handler="OnAddFilter" />
- </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">2</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="Gtk.HBox" id="hbox2">
- <property name="MemberName" />
- <property name="Spacing">6</property>
- <child>
- <widget class="Gtk.ComboBox" id="filtercombobox">
- <property name="MemberName" />
- <property name="IsTextCombo">True</property>
- <property name="Items" translatable="yes" />
- <signal name="Changed" handler="OnFiltercomboboxChanged" />
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="Position">3</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
- <property name="Fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
<widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.ProjectSelectionDialog" design-size="332 183">
<property name="MemberName" />
<property name="Title" translatable="yes">New Project</property>
@@ -6783,14 +6670,14 @@ Defining <b> Game Units </b> will help you during the analysis to in
</widget>
</child>
</widget>
- <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.PlaysSelectionWidget" design-size="300 495">
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.PlaysSelectionWidget" design-size="355 495">
<property name="MemberName" />
<property name="Visible">False</property>
<child>
<widget class="Gtk.Notebook" id="notebook1">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="CurrentPage">2</property>
+ <property name="CurrentPage">4</property>
<property name="TabPos">Bottom</property>
<child>
<widget class="LongoMatch.Gui.Component.PlaysListTreeWidget" id="playsList">
@@ -6841,7 +6728,74 @@ Defining <b> Game Units </b> will help you during the analysis to in
<property name="type">tab</property>
</packing>
</child>
+ <child>
+ <widget class="LongoMatch.Gui.Component.PlayersFilter" id="playersfilter">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label4">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Players filter</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="LongoMatch.Gui.Component.CategoriesFilter" id="categoriesfilter">
+ <property name="MemberName" />
+ <property name="Events">ButtonPressMask</property>
+ </widget>
+ <packing>
+ <property name="Position">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="label5">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">Categories filter</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.PlayersFilter" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+ <property name="MemberName" />
+ <property name="ShadowType">In</property>
+ <child>
+ <widget class="Gtk.TreeView" id="tree">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="ShowScrollbars">True</property>
+ </widget>
+ </child>
</widget>
</child>
</widget>
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.CategoriesFilter" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <placeholder />
+ </child>
+ </widget>
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.CategoriesFilter" design-size="300 300">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <child>
+ <placeholder />
+ </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 a4ff671..2f4493b 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -36,18 +36,6 @@
</itemgroups>
<signals />
</object>
- <object type="LongoMatch.Gui.Component.PlayersListTreeWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
- <signals>
- <itemgroup label="PlayersListTreeWidget Signals">
- <signal name="TimeNodeSelected" />
- <signal name="TimeNodeChanged" />
- <signal name="PlayListNodeAdded" />
- <signal name="SnapshotSeriesEvent" />
- <signal name="RenderPlaylistEvent" />
- </itemgroup>
- </signals>
- </object>
<object type="LongoMatch.Gui.Component.RenderingJobsTreeView" palette-category="General" allow-children="false" base-type="Gtk.TreeView">
<itemgroups />
<signals>
@@ -67,17 +55,6 @@
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.TagsTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
- <signals>
- <itemgroup label="TagsTreeWidget Signals">
- <signal name="TimeNodeSelected" />
- <signal name="TimeNodeChanged" />
- <signal name="PlayListNodeAdded" />
- <signal name="SnapshotSeriesEvent" />
- </itemgroup>
- </signals>
- </object>
<object type="LongoMatch.Gui.Component.TeamTaggerWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals />
@@ -220,6 +197,7 @@
<property name="Competition" />
<property name="LocalGoals" />
<property name="VisitorGoals" />
+ <property name="Date" />
</itemgroup>
</itemgroups>
<signals>
@@ -228,10 +206,44 @@
</itemgroup>
</signals>
</object>
+ <object type="LongoMatch.Gui.Component.StringTaggerWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Component.CategoryProperties" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals>
+ <itemgroup label="CategoryProperties Signals">
+ <signal name="HotKeyChanged" />
+ </itemgroup>
+ </signals>
+ </object>
<object type="LongoMatch.Gui.Component.PlayersTagger" palette-category="General" allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals />
</object>
+ <object type="LongoMatch.Gui.SubCategoriesTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
+ <itemgroups />
+ <signals>
+ <itemgroup label="SubCategoriesTreeView Signals">
+ <signal name="SubCategoriesDeleted" />
+ <signal name="SubCategorySelected" />
+ </itemgroup>
+ </signals>
+ </object>
+ <object type="LongoMatch.Gui.Component.PlaysSelectionWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals>
+ <itemgroup label="PlaysSelectionWidget Signals">
+ <signal name="PlaysDeleted" />
+ <signal name="PlaySelected" />
+ <signal name="PlayListNodeAdded" />
+ <signal name="SnapshotSeries" />
+ <signal name="RenderPlaylist" />
+ <signal name="TagPlay" />
+ </itemgroup>
+ </signals>
+ </object>
<object type="LongoMatch.Gui.Component.PlaysListTreeWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals>
@@ -246,28 +258,84 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.StringTaggerWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.PlayersListTreeWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals>
+ <itemgroup label="PlayersListTreeWidget Signals">
+ <signal name="TimeNodeSelected" />
+ <signal name="TimeNodeChanged" />
+ <signal name="PlayListNodeAdded" />
+ <signal name="SnapshotSeriesEvent" />
+ <signal name="RenderPlaylistEvent" />
+ </itemgroup>
+ </signals>
+ </object>
+ <object type="LongoMatch.Gui.Component.PlayersFilter" palette-category="General" allow-children="false" base-type="Gtk.Bin">
<itemgroups />
<signals />
</object>
- <object type="LongoMatch.Gui.Component.CategoryProperties" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+ <object type="LongoMatch.Gui.Component.CategoriesFilter" palette-category="General" allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Component.TeamTemplateEditorWidget" palette-category="General" allow-children="false" base-type="LongoMatch.Gui.Base.TemplatesEditorBase">
+ <itemgroups />
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Component.CategoriesTemplateEditorWidget" palette-category="General" allow-children="false" base-type="LongoMatch.Gui.Base.TemplatesEditorBase">
<itemgroups />
+ <signals />
+ </object>
+ <object type="LongoMatch.Gui.Component.TimeScale" palette-category="LongoMatch" allow-children="false" base-type="Gtk.DrawingArea">
+ <itemgroups>
+ <itemgroup label="TimeScaleBase[LongoMatch.Store.Play] Properties">
+ <property name="PixelRatio" />
+ <property name="CurrentFrame" />
+ </itemgroup>
+ </itemgroups>
<signals>
- <itemgroup label="CategoryProperties Signals">
- <signal name="HotKeyChanged" />
+ <itemgroup label="TimeScale Signals">
+ <signal name="NewMarkAtFrameEvent" />
+ <signal name="TimeNodeChanged" />
+ <signal name="TimeNodeSelected" />
+ <signal name="TimeNodeDeleted" />
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.PlaysSelectionWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
+ <object type="LongoMatch.Gui.Component.PlaysTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
+ <itemgroups>
+ <itemgroup label="ListTreeViewBase Properties">
+ <property name="Colors" />
+ </itemgroup>
+ </itemgroups>
<signals>
- <itemgroup label="PlaysSelectionWidget Signals">
- <signal name="PlaysDeleted" />
- <signal name="PlaySelected" />
+ <itemgroup label="PlaysTreeView Signals">
+ <signal name="EditProperties" />
+ <signal name="TimeNodeChanged" />
+ <signal name="TimeNodeSelected" />
+ <signal name="TimeNodeDeleted" />
<signal name="PlayListNodeAdded" />
- <signal name="SnapshotSeries" />
- <signal name="RenderPlaylist" />
+ <signal name="SnapshotSeriesEvent" />
+ <signal name="TagPlay" />
+ <signal name="NewRenderingJob" />
+ </itemgroup>
+ </signals>
+ </object>
+ <object type="LongoMatch.Gui.Component.PlayersTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
+ <itemgroups>
+ <itemgroup label="ListTreeViewBase Properties">
+ <property name="Colors" />
+ </itemgroup>
+ </itemgroups>
+ <signals>
+ <itemgroup label="ListTreeViewBase Signals">
+ <signal name="TimeNodeChanged" />
+ <signal name="TimeNodeSelected" />
+ <signal name="TimeNodeDeleted" />
+ <signal name="PlayListNodeAdded" />
+ <signal name="SnapshotSeriesEvent" />
<signal name="TagPlay" />
+ <signal name="NewRenderingJob" />
</itemgroup>
</signals>
</object>
diff --git a/LongoMatch.Services/Services/ProjectsManager.cs b/LongoMatch.Services/Services/ProjectsManager.cs
index 7afbf18..f7e1c43 100644
--- a/LongoMatch.Services/Services/ProjectsManager.cs
+++ b/LongoMatch.Services/Services/ProjectsManager.cs
@@ -194,7 +194,8 @@ namespace LongoMatch.Services
OpenedProject = project;
OpenedProjectType = projectType;
- mainWindow.SetProject(project, projectType, props);
+ PlaysFilter filter = new PlaysFilter(project);
+ mainWindow.SetProject(project, projectType, props, filter);
EmitProjectChanged();
return true;
}
diff --git a/libcesarplayer/liblongomatch.mdp b/libcesarplayer/liblongomatch.mdp
index 3349a84..48cfdaf 100644
--- a/libcesarplayer/liblongomatch.mdp
+++ b/libcesarplayer/liblongomatch.mdp
@@ -10,7 +10,7 @@
<Output directory="../bin" output="libcesarplayer.dll" />
<Build debugmode="True" target="SharedLibrary" />
<Execution consolepause="True" runwithwarnings="True" />
- <CodeGeneration WarningLevel="All" WarningsAsErrors="True" OptimizationLevel="3" ExtraCompilerArguments="" ExtraLinkerArguments="" DefineSymbols="MONODEVELOP" ctype="CCompilationParameters" />
+ <CodeGeneration WarningLevel="All" WarningsAsErrors="False" OptimizationLevel="3" ExtraCompilerArguments="" ExtraLinkerArguments="" DefineSymbols="MONODEVELOP" ctype="CCompilationParameters" />
</Configuration>
</Configurations>
<Contents>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]