[longomatch] Make use of gameunits configurable
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Make use of gameunits configurable
- Date: Sun, 18 Dec 2011 21:43:20 +0000 (UTC)
commit 54a54a98138a4cdc78cd0b997e4559e616620e2e
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Dec 14 14:15:40 2011 +0100
Make use of gameunits configurable
LongoMatch.Core/Config.cs | 4 ++++
.../Gui/Component/CategoriesTemplateEditor.cs | 4 +++-
LongoMatch.GUI/Gui/MainWindow.cs | 17 ++++++++++++-----
3 files changed, 19 insertions(+), 6 deletions(-)
---
diff --git a/LongoMatch.Core/Config.cs b/LongoMatch.Core/Config.cs
index 262c3ad..04979e2 100644
--- a/LongoMatch.Core/Config.cs
+++ b/LongoMatch.Core/Config.cs
@@ -61,6 +61,10 @@ namespace LongoMatch
public static string RelativeToPrefix(string relativePath) {
return Path.Combine(baseDirectory, relativePath);
}
+
+
+ /* Properties */
+ public static bool useGameUnits = false;
}
}
diff --git a/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs b/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs
index 83aeba8..8e607fb 100644
--- a/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoriesTemplateEditor.cs
@@ -43,7 +43,9 @@ namespace LongoMatch.Gui.Component
FirstPageName = Catalog.GetString("Categories");
AddTreeView(categoriestreeview);
gameUnitsEditor = new GameUnitsEditor();
- AddPage(gameUnitsEditor, "Game phases");
+ if (Config.useGameUnits) {
+ AddPage(gameUnitsEditor, "Game phases");
+ }
}
public override Categories Template {
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index 30e26d3..e054424 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -121,6 +121,9 @@ namespace LongoMatch.Gui
ConnectSignals();
ConnectMenuSignals();
+
+ if (!Config.useGameUnits)
+ GameUnitsViewAction.Visible = false;
}
#endregion
@@ -479,9 +482,11 @@ namespace LongoMatch.Gui
timeline.Visible = !action.Active && TimelineViewAction.Active;
buttonswidget.Visible = !action.Active &&
(TaggingViewAction.Active || ManualTaggingViewAction.Active);
- guTimeline.Visible = !action.Visible && GameUnitsViewAction.Active;
- gameunitstaggerwidget1.Visible = !action.Active && (GameUnitsViewAction.Active ||
- TaggingViewAction.Active || ManualTaggingViewAction.Active);
+ if (Config.useGameUnits) {
+ guTimeline.Visible = !action.Visible && GameUnitsViewAction.Active;
+ gameunitstaggerwidget1.Visible = !action.Active && (GameUnitsViewAction.Active ||
+ TaggingViewAction.Active || ManualTaggingViewAction.Active);
+ }
if(action.Active)
rightvbox.Visible = false;
else if(!action.Active && (playlist.Visible || notes.Visible))
@@ -497,8 +502,10 @@ namespace LongoMatch.Gui
buttonswidget.Visible = action == ManualTaggingViewAction || sender == TaggingViewAction;
timeline.Visible = action == TimelineViewAction;
- guTimeline.Visible = action == GameUnitsViewAction;
- gameunitstaggerwidget1.Visible = buttonswidget.Visible || guTimeline.Visible;
+ if (Config.useGameUnits) {
+ guTimeline.Visible = action == GameUnitsViewAction;
+ gameunitstaggerwidget1.Visible = buttonswidget.Visible || guTimeline.Visible;
+ }
if(action == ManualTaggingViewAction)
buttonswidget.Mode = TagMode.Free;
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]