[longomatch] Add team selection for timers
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add team selection for timers
- Date: Wed, 8 Oct 2014 00:11:28 +0000 (UTC)
commit 384c0bb8e1eaf8df87349fb1f299afb91abc26d6
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sun Oct 5 20:04:49 2014 +0200
Add team selection for timers
LongoMatch.GUI/Gui/Component/CategoryProperties.cs | 17 ++++++-
.../LongoMatch.Gui.Component.CategoryProperties.cs | 36 ++++++++++++
LongoMatch.GUI/gtk-gui/gui.stetic | 58 +++++++++++++++++++-
LongoMatch.GUI/gtk-gui/objects.xml | 10 ++--
4 files changed, 114 insertions(+), 7 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
index ddd8ec8..efd5841 100644
--- a/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch.GUI/Gui/Component/CategoryProperties.cs
@@ -44,6 +44,7 @@ namespace LongoMatch.Gui.Component
PenaltyCardButton cardButton;
ScoreButton scoreButton;
TagButton tagButton;
+ TimerButton timerButton;
Time lastLeadTime;
bool edited, ignore;
@@ -66,6 +67,7 @@ namespace LongoMatch.Gui.Component
goalcombobox.Changed += HandlePositionChanged;
shapecombobox.Changed += HandleShapeChanged;
pointsbutton.Changed += HandlePointsChanged;
+ teamcombobox.Changed += HandleTeamChanged;
postable.NoShowAll = true;
cattable.NoShowAll = true;
@@ -80,7 +82,7 @@ namespace LongoMatch.Gui.Component
}
}
}
-
+
sizegroupRight = new SizeGroup (SizeGroupMode.Horizontal);
sizegroupRight.IgnoreHidden = false;
foreach (Widget w in vbox3.Children) {
@@ -134,6 +136,7 @@ namespace LongoMatch.Gui.Component
cardButton = value as PenaltyCardButton;
scoreButton = value as ScoreButton;
tagButton = value as TagButton;
+ timerButton = value as TimerButton;
UpdateGui ();
}
get {
@@ -181,6 +184,7 @@ namespace LongoMatch.Gui.Component
postable.Visible = eventButton != null;
scoretable.Visible = scoreButton != null;
cardtable.Visible = cardButton != null;
+ timertable.Visible = timerButton != null;
if (button != null) {
nameentry.Text = button.Name;
@@ -225,6 +229,9 @@ namespace LongoMatch.Gui.Component
if (cardButton != null) {
shapecombobox.Active = (int)cardButton.PenaltyCard.Shape;
}
+ if (timerButton != null) {
+ teamcombobox.Active = (int)timerButton.Timer.Team;
+ }
ignore = false;
Edited = false;
}
@@ -369,5 +376,13 @@ namespace LongoMatch.Gui.Component
scoreButton.Score.Points = pointsbutton.ValueAsInt;
Edited = true;
}
+
+ void HandleTeamChanged (object sender, EventArgs e)
+ {
+ if (ignore)
+ return;
+ timerButton.Timer.Team = (Team)teamcombobox.Active;
+ Edited = true;
+ }
}
}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
index 372129b..172ba12 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CategoryProperties.cs
@@ -44,6 +44,9 @@ namespace LongoMatch.Gui.Component
private global::Gtk.Table scoretable;
private global::Gtk.Label label17;
private global::Gtk.SpinButton pointsbutton;
+ private global::Gtk.Table timertable;
+ private global::Gtk.Label label18;
+ private global::Gtk.ComboBox teamcombobox;
protected virtual void Build ()
{
@@ -495,6 +498,38 @@ namespace LongoMatch.Gui.Component
global::Gtk.Box.BoxChild w39 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.scoretable]));
w39.Position = 6;
w39.Expand = false;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.timertable = new global::Gtk.Table (((uint)(1)), ((uint)(2)), false);
+ this.timertable.Name = "timertable";
+ this.timertable.RowSpacing = ((uint)(6));
+ this.timertable.ColumnSpacing = ((uint)(6));
+ // Container child timertable.Gtk.Table+TableChild
+ this.label18 = new global::Gtk.Label ();
+ this.label18.Name = "label18";
+ this.label18.Xalign = 1F;
+ this.label18.LabelProp = global::Mono.Unix.Catalog.GetString ("<span
font_desc=\"10\">Team</span>");
+ this.label18.UseMarkup = true;
+ this.timertable.Add (this.label18);
+ global::Gtk.Table.TableChild w40 = ((global::Gtk.Table.TableChild)(this.timertable
[this.label18]));
+ w40.XOptions = ((global::Gtk.AttachOptions)(0));
+ w40.YOptions = ((global::Gtk.AttachOptions)(4));
+ // Container child timertable.Gtk.Table+TableChild
+ this.teamcombobox = global::Gtk.ComboBox.NewText ();
+ this.teamcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("None"));
+ this.teamcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Home"));
+ this.teamcombobox.AppendText (global::Mono.Unix.Catalog.GetString ("Away"));
+ this.teamcombobox.Name = "teamcombobox";
+ this.teamcombobox.Active = 0;
+ this.timertable.Add (this.teamcombobox);
+ global::Gtk.Table.TableChild w41 = ((global::Gtk.Table.TableChild)(this.timertable
[this.teamcombobox]));
+ w41.LeftAttach = ((uint)(1));
+ w41.RightAttach = ((uint)(2));
+ w41.YOptions = ((global::Gtk.AttachOptions)(4));
+ this.vbox3.Add (this.timertable);
+ global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(this.vbox3
[this.timertable]));
+ w42.Position = 7;
+ w42.Expand = false;
+ w42.Fill = false;
this.Add (this.vbox3);
if ((this.Child != null)) {
this.Child.ShowAll ();
@@ -502,6 +537,7 @@ namespace LongoMatch.Gui.Component
this.cattable.Hide ();
this.cardtable.Hide ();
this.scoretable.Hide ();
+ this.timertable.Hide ();
this.Show ();
}
}
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index c851c1c..3fccc25 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -890,7 +890,7 @@
</widget>
</child>
</widget>
- <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.CategoryProperties" design-size="318 545">
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.CategoryProperties" design-size="318 561">
<property name="MemberName" />
<child>
<widget class="Gtk.VBox" id="vbox3">
@@ -1667,6 +1667,62 @@ Circle</property>
<property name="Expand">False</property>
</packing>
</child>
+ <child>
+ <widget class="Gtk.Table" id="timertable">
+ <property name="MemberName" />
+ <property name="Visible">False</property>
+ <property name="NColumns">2</property>
+ <property name="RowSpacing">6</property>
+ <property name="ColumnSpacing">6</property>
+ <child>
+ <widget class="Gtk.Label" id="label18">
+ <property name="MemberName" />
+ <property name="Xalign">1</property>
+ <property name="LabelProp" translatable="yes"><span
font_desc="10">Team</span></property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="AutoSize">False</property>
+ <property name="XOptions">0</property>
+ <property name="YOptions">Fill</property>
+ <property name="XExpand">False</property>
+ <property name="XFill">False</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="teamcombobox">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes">None
+Home
+Away</property>
+ <property name="Active">0</property>
+ </widget>
+ <packing>
+ <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>
+ </widget>
+ <packing>
+ <property name="Position">7</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
diff --git a/LongoMatch.GUI/gtk-gui/objects.xml b/LongoMatch.GUI/gtk-gui/objects.xml
index 015788c..50bb478 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -276,8 +276,8 @@
<object type="LongoMatch.Gui.Component.MediaFileChooser" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups>
<itemgroup label="MediaFileChooser Properties">
- <property name="FilterName" />
<property name="CurrentPath" />
+ <property name="FilterName" />
</itemgroup>
</itemgroups>
<signals>
@@ -307,6 +307,10 @@
</itemgroup>
</signals>
</object>
+ <object type="LongoMatch.Gui.Component.MediaFileSetSelection" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
+ <itemgroups />
+ <signals />
+ </object>
<object type="LongoMatch.Gui.CapturerBin" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups>
<itemgroup label="CapturerBin Properties">
@@ -355,8 +359,4 @@
</itemgroup>
</signals>
</object>
- <object type="LongoMatch.Gui.Component.MediaFileSetSelection" palette-category="General"
allow-children="false" base-type="Gtk.Bin">
- <itemgroups />
- <signals />
- </object>
</objects>
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]