Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
changeset 52:4bad8cb3f889
Re #60: Add UI to add/remove/edit weapons in GTK
* Remove "not implemented" exceptions and add first implementation of setting equipment list
* Add widgets to add equipment form
* Subscribe to Clicked instead of Activated to hook on to correct event
* Extract tree rendering method into helper class
Also:
* Improve exception handling of unhandled exceptions (print full stack trace with "caused by" hierarchy)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 22 Aug 2010 14:32:16 +0000 |
parents | dafbd432ca23 |
children | 28b242612ad7 |
files | FrmAddEquipment.cs FrmMainWindow.cs FrmNewArmy.cs IBBoard.WarFoundry.GUI.GTK.csproj Util/GtkWarFoundryUtil.cs Widgets/UnitDisplayWidget.cs gtk-gui/IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.cs gtk-gui/gui.stetic |
diffstat | 9 files changed, 532 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/FrmAddEquipment.cs Sat Aug 21 20:00:03 2010 +0000 +++ b/FrmAddEquipment.cs Sun Aug 22 14:32:16 2010 +0000 @@ -4,6 +4,8 @@ using System; using IBBoard.WarFoundry.GUI.GTK.UIControl.Interfaces; using IBBoard.WarFoundry.API.Objects; +using Gtk; +using IBBoard.WarFoundry.GUI.GTK.Util; namespace IBBoard.WarFoundry.GUI.GTK { public partial class FrmAddEquipment : Gtk.Dialog, IAddEquipmentUI @@ -11,28 +13,42 @@ public FrmAddEquipment() { this.Build(); + + TreeViewColumn equipColumn = new TreeViewColumn(); + equipColumn.Title = "Equipment"; + CellRendererText equipCell = new CellRendererText(); + equipColumn.PackStart(equipCell, true); + equipColumn.SetCellDataFunc(equipCell, GtkWarFoundryUtil.RenderWarFoundryObjectName); + lstEquipment.AppendColumn(equipColumn); } public event SingleArgMethodInvoker<UnitEquipmentItem> UnitEquipmentItemChoiceChanged; public void SetUnitEquipmentItems(UnitEquipmentItem[] items) { - throw new NotImplementedException(); + ListStore store = new ListStore(typeof(UnitEquipmentItem)); + + foreach (UnitEquipmentItem equipItem in items) + { + store.AppendValues(equipItem); + } + + lstEquipment.Model = store; } public void SetUnitEquipmentLimits(bool isRatioLimit, double minPercent, double maxPercent, int minNumber, int maxNumber) { - throw new NotImplementedException(); + } public void SetUnitEquipmentLimitsEnabled(bool isEnabled) { - throw new NotImplementedException(); + } public void ShowControl() { - throw new NotImplementedException(); + } } }
--- a/FrmMainWindow.cs Sat Aug 21 20:00:03 2010 +0000 +++ b/FrmMainWindow.cs Sun Aug 22 14:32:16 2010 +0000 @@ -90,10 +90,22 @@ private static void HandleUnhandledException(Exception ex) { - LogManager.GetLogger(typeof(FrmMainWindow)).Fatal("(" + ex.GetType().Name + ") " + ex.Message + Environment.NewLine + ex.StackTrace); + LogManager.GetLogger(typeof(FrmMainWindow)).FatalFormat("({0}) {1} {2} {3}", ex.GetType().FullName, ex.Message, Environment.NewLine, GetStackTrace(ex)); MessageDialog dialog = new MessageDialog(null, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, false, "An unhandled exception occurred. Please check the log for more details."); dialog.Show(); } + + private static string GetStackTrace(Exception ex) + { + string message = ""; + + if (ex != null) + { + message = "Caused by: " + ex.GetType().FullName + Environment.NewLine + ex.StackTrace + Environment.NewLine + GetStackTrace(ex.InnerException); + } + + return message; + } public FrmMainWindow() : this(new string[0]) {
--- a/FrmNewArmy.cs Sat Aug 21 20:00:03 2010 +0000 +++ b/FrmNewArmy.cs Sun Aug 22 14:32:16 2010 +0000 @@ -9,6 +9,7 @@ using IBBoard.WarFoundry.API.Objects; using IBBoard.GtkSharp; using log4net; +using IBBoard.WarFoundry.GUI.GTK.Util; namespace IBBoard.WarFoundry.GTK { @@ -42,7 +43,7 @@ CellRendererText raceCell = new CellRendererText (); raceColumn.PackStart (raceCell, true); lstRaces.AppendColumn(raceColumn); - raceColumn.SetCellDataFunc(raceCell, new TreeCellDataFunc(RenderRaceName)); + raceColumn.SetCellDataFunc(raceCell, GtkWarFoundryUtil.RenderWarFoundryObjectName); if (gameSystem!=null) @@ -56,12 +57,6 @@ get { return Title; } set { Title = value; } } - - private void RenderRaceName(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) - { - Race r = (Race)model.GetValue(iter, 0); - (cell as CellRendererText).Text = r.Name; - } protected virtual void OnSelectionChanged(object o, EventArgs e) {
--- a/IBBoard.WarFoundry.GUI.GTK.csproj Sat Aug 21 20:00:03 2010 +0000 +++ b/IBBoard.WarFoundry.GUI.GTK.csproj Sun Aug 22 14:32:16 2010 +0000 @@ -54,6 +54,7 @@ <Compile Include="UIControl\Interfaces\IAddEquipmentUI.cs" /> <Compile Include="FrmAddEquipment.cs" /> <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.cs" /> + <Compile Include="Util\GtkWarFoundryUtil.cs" /> </ItemGroup> <ItemGroup> <Content Include="App.png" /> @@ -110,5 +111,6 @@ <ItemGroup> <Folder Include="UIControl\" /> <Folder Include="UIControl\Interfaces\" /> + <Folder Include="Util\" /> </ItemGroup> </Project> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Util/GtkWarFoundryUtil.cs Sun Aug 22 14:32:16 2010 +0000 @@ -0,0 +1,18 @@ +// This file (GtkWarFoundryUtil.cs) is a part of the IBBoard.WarFoundry.GUI.GTK project and is copyright 2010 IBBoard +// +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. +using System; +using IBBoard.WarFoundry.API.Objects; +using Gtk; +namespace IBBoard.WarFoundry.GUI.GTK.Util +{ + public class GtkWarFoundryUtil + { + public static void RenderWarFoundryObjectName(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) + { + WarFoundryObject equip = (WarFoundryObject)model.GetValue(iter, 0); + (cell as CellRendererText).Text = equip.Name; + } + } +} +
--- a/Widgets/UnitDisplayWidget.cs Sat Aug 21 20:00:03 2010 +0000 +++ b/Widgets/UnitDisplayWidget.cs Sun Aug 22 14:32:16 2010 +0000 @@ -146,9 +146,8 @@ } } - private void OnBttnAddEquipmentActivated(object sender, System.EventArgs e) + private void OnBttnAddEquipmentClicked(object sender, System.EventArgs e) { - Console.WriteLine("Add button clicked"); AddEquipment(); }
--- a/gtk-gui/IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs Sat Aug 21 20:00:03 2010 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs Sun Aug 22 14:32:16 2010 +0000 @@ -226,7 +226,7 @@ this.unitName.KeyPressEvent += new global::Gtk.KeyPressEventHandler(this.OnUnitNameKeyPress); this.unitSize.FocusOutEvent += new global::Gtk.FocusOutEventHandler(this.OnUnitSizeFocusOut); this.unitSize.KeyPressEvent += new global::Gtk.KeyPressEventHandler(this.OnUnitSizeKeyPress); - this.bttnAddEquipment.Activated += new global::System.EventHandler(this.OnBttnAddEquipmentActivated); + this.bttnAddEquipment.Clicked += new global::System.EventHandler(this.OnBttnAddEquipmentClicked); } } }
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.cs Sat Aug 21 20:00:03 2010 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.cs Sun Aug 22 14:32:16 2010 +0000 @@ -4,6 +4,34 @@ { public partial class FrmAddEquipment { + private global::Gtk.Table table1; + + private global::Gtk.ScrolledWindow GtkScrolledWindow; + + private global::Gtk.TreeView lstEquipment; + + private global::Gtk.HBox hbox2; + + private global::Gtk.Table table2; + + private global::Gtk.Label lblEquipAll; + + private global::Gtk.Label lblPercent; + + private global::Gtk.RadioButton rbEquipAll; + + private global::Gtk.RadioButton rbEquipNumeric; + + private global::Gtk.RadioButton rbEquipPercent; + + private global::Gtk.SpinButton spinbutton1; + + private global::Gtk.SpinButton spinbutton2; + + private global::Gtk.Label lblEquipAmount; + + private global::Gtk.Label lblEquipment; + private global::Gtk.Button buttonCancel; private global::Gtk.Button buttonOk; @@ -18,12 +46,164 @@ global::Gtk.VBox w1 = this.VBox; w1.Name = "dialog1_VBox"; w1.BorderWidth = ((uint)(2)); + // Container child dialog1_VBox.Gtk.Box+BoxChild + this.table1 = new global::Gtk.Table(((uint)(2)), ((uint)(2)), false); + this.table1.Name = "table1"; + this.table1.RowSpacing = ((uint)(6)); + this.table1.ColumnSpacing = ((uint)(6)); + // Container child table1.Gtk.Table+TableChild + this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); + this.GtkScrolledWindow.Name = "GtkScrolledWindow"; + this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child GtkScrolledWindow.Gtk.Container+ContainerChild + this.lstEquipment = new global::Gtk.TreeView(); + this.lstEquipment.CanFocus = true; + this.lstEquipment.Name = "lstEquipment"; + this.GtkScrolledWindow.Add(this.lstEquipment); + this.table1.Add(this.GtkScrolledWindow); + global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow])); + w3.LeftAttach = ((uint)(1)); + w3.RightAttach = ((uint)(2)); + w3.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.hbox2 = new global::Gtk.HBox(); + this.hbox2.Name = "hbox2"; + this.hbox2.Spacing = 6; + // Container child hbox2.Gtk.Box+BoxChild + this.table2 = new global::Gtk.Table(((uint)(3)), ((uint)(3)), false); + this.table2.Name = "table2"; + this.table2.RowSpacing = ((uint)(6)); + this.table2.ColumnSpacing = ((uint)(6)); + // Container child table2.Gtk.Table+TableChild + this.lblEquipAll = new global::Gtk.Label(); + this.lblEquipAll.Name = "lblEquipAll"; + this.lblEquipAll.LabelProp = global::Mono.Unix.Catalog.GetString("equip all"); + this.table2.Add(this.lblEquipAll); + global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table2[this.lblEquipAll])); + w4.TopAttach = ((uint)(2)); + w4.BottomAttach = ((uint)(3)); + w4.LeftAttach = ((uint)(1)); + w4.RightAttach = ((uint)(2)); + w4.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table2.Gtk.Table+TableChild + this.lblPercent = new global::Gtk.Label(); + this.lblPercent.Name = "lblPercent"; + this.lblPercent.LabelProp = global::Mono.Unix.Catalog.GetString("%"); + this.table2.Add(this.lblPercent); + global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table2[this.lblPercent])); + w5.TopAttach = ((uint)(1)); + w5.BottomAttach = ((uint)(2)); + w5.LeftAttach = ((uint)(2)); + w5.RightAttach = ((uint)(3)); + w5.XOptions = ((global::Gtk.AttachOptions)(4)); + w5.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table2.Gtk.Table+TableChild + this.rbEquipAll = new global::Gtk.RadioButton(""); + this.rbEquipAll.CanFocus = true; + this.rbEquipAll.Name = "rbEquipAll"; + this.rbEquipAll.DrawIndicator = true; + this.rbEquipAll.UseUnderline = true; + this.rbEquipAll.Group = new global::GLib.SList(global::System.IntPtr.Zero); + this.table2.Add(this.rbEquipAll); + global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table2[this.rbEquipAll])); + w6.TopAttach = ((uint)(2)); + w6.BottomAttach = ((uint)(3)); + w6.XOptions = ((global::Gtk.AttachOptions)(4)); + w6.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table2.Gtk.Table+TableChild + this.rbEquipNumeric = new global::Gtk.RadioButton(""); + this.rbEquipNumeric.CanFocus = true; + this.rbEquipNumeric.Name = "rbEquipNumeric"; + this.rbEquipNumeric.DrawIndicator = true; + this.rbEquipNumeric.UseUnderline = true; + this.rbEquipNumeric.Group = this.rbEquipAll.Group; + this.table2.Add(this.rbEquipNumeric); + global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table2[this.rbEquipNumeric])); + w7.XOptions = ((global::Gtk.AttachOptions)(4)); + w7.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table2.Gtk.Table+TableChild + this.rbEquipPercent = new global::Gtk.RadioButton(""); + this.rbEquipPercent.CanFocus = true; + this.rbEquipPercent.Name = "rbEquipPercent"; + this.rbEquipPercent.DrawIndicator = true; + this.rbEquipPercent.UseUnderline = true; + this.rbEquipPercent.Group = this.rbEquipAll.Group; + this.table2.Add(this.rbEquipPercent); + global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table2[this.rbEquipPercent])); + w8.TopAttach = ((uint)(1)); + w8.BottomAttach = ((uint)(2)); + w8.XOptions = ((global::Gtk.AttachOptions)(4)); + w8.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table2.Gtk.Table+TableChild + this.spinbutton1 = new global::Gtk.SpinButton(0, 100, 1); + this.spinbutton1.CanFocus = true; + this.spinbutton1.Name = "spinbutton1"; + this.spinbutton1.Adjustment.PageIncrement = 10; + this.spinbutton1.ClimbRate = 1; + this.spinbutton1.Numeric = true; + this.table2.Add(this.spinbutton1); + global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table2[this.spinbutton1])); + w9.LeftAttach = ((uint)(1)); + w9.RightAttach = ((uint)(2)); + w9.XOptions = ((global::Gtk.AttachOptions)(0)); + w9.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table2.Gtk.Table+TableChild + this.spinbutton2 = new global::Gtk.SpinButton(0, 100, 1); + this.spinbutton2.CanFocus = true; + this.spinbutton2.Name = "spinbutton2"; + this.spinbutton2.Adjustment.PageIncrement = 10; + this.spinbutton2.ClimbRate = 1; + this.spinbutton2.Digits = ((uint)(1)); + this.spinbutton2.Numeric = true; + this.table2.Add(this.spinbutton2); + global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table2[this.spinbutton2])); + w10.TopAttach = ((uint)(1)); + w10.BottomAttach = ((uint)(2)); + w10.LeftAttach = ((uint)(1)); + w10.RightAttach = ((uint)(2)); + w10.XOptions = ((global::Gtk.AttachOptions)(0)); + w10.YOptions = ((global::Gtk.AttachOptions)(4)); + this.hbox2.Add(this.table2); + global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.table2])); + w11.Position = 0; + w11.Expand = false; + w11.Fill = false; + this.table1.Add(this.hbox2); + global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.hbox2])); + w12.TopAttach = ((uint)(1)); + w12.BottomAttach = ((uint)(2)); + w12.LeftAttach = ((uint)(1)); + w12.RightAttach = ((uint)(2)); + w12.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.lblEquipAmount = new global::Gtk.Label(); + this.lblEquipAmount.Name = "lblEquipAmount"; + this.lblEquipAmount.LabelProp = global::Mono.Unix.Catalog.GetString("amount:"); + this.table1.Add(this.lblEquipAmount); + global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.lblEquipAmount])); + w13.TopAttach = ((uint)(1)); + w13.BottomAttach = ((uint)(2)); + w13.XOptions = ((global::Gtk.AttachOptions)(4)); + w13.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.lblEquipment = new global::Gtk.Label(); + this.lblEquipment.Name = "lblEquipment"; + this.lblEquipment.LabelProp = global::Mono.Unix.Catalog.GetString("equipment"); + this.table1.Add(this.lblEquipment); + global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.lblEquipment])); + w14.XOptions = ((global::Gtk.AttachOptions)(4)); + w14.YOptions = ((global::Gtk.AttachOptions)(4)); + w1.Add(this.table1); + global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(w1[this.table1])); + w15.Position = 0; + w15.Expand = false; + w15.Fill = false; // Internal child IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.ActionArea - global::Gtk.HButtonBox w2 = this.ActionArea; - w2.Name = "dialog1_ActionArea"; - w2.Spacing = 10; - w2.BorderWidth = ((uint)(5)); - w2.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); + global::Gtk.HButtonBox w16 = this.ActionArea; + w16.Name = "dialog1_ActionArea"; + w16.Spacing = 10; + w16.BorderWidth = ((uint)(5)); + w16.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild this.buttonCancel = new global::Gtk.Button(); this.buttonCancel.CanDefault = true; @@ -33,9 +213,9 @@ this.buttonCancel.UseUnderline = true; this.buttonCancel.Label = "gtk-cancel"; this.AddActionWidget(this.buttonCancel, -6); - global::Gtk.ButtonBox.ButtonBoxChild w3 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w2[this.buttonCancel])); - w3.Expand = false; - w3.Fill = false; + global::Gtk.ButtonBox.ButtonBoxChild w17 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w16[this.buttonCancel])); + w17.Expand = false; + w17.Fill = false; // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild this.buttonOk = new global::Gtk.Button(); this.buttonOk.CanDefault = true; @@ -45,10 +225,10 @@ this.buttonOk.UseUnderline = true; this.buttonOk.Label = "gtk-ok"; this.AddActionWidget(this.buttonOk, -5); - global::Gtk.ButtonBox.ButtonBoxChild w4 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w2[this.buttonOk])); - w4.Position = 1; - w4.Expand = false; - w4.Fill = false; + global::Gtk.ButtonBox.ButtonBoxChild w18 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w16[this.buttonOk])); + w18.Position = 1; + w18.Expand = false; + w18.Fill = false; if ((this.Child != null)) { this.Child.ShowAll();
--- a/gtk-gui/gui.stetic Sat Aug 21 20:00:03 2010 +0000 +++ b/gtk-gui/gui.stetic Sun Aug 22 14:32:16 2010 +0000 @@ -874,7 +874,7 @@ <property name="Type">TextOnly</property> <property name="Label" translatable="yes">Add</property> <property name="UseUnderline">True</property> - <signal name="Activated" handler="OnBttnAddEquipmentActivated" /> + <signal name="Clicked" handler="OnBttnAddEquipmentClicked" /> </widget> <packing> <property name="Position">0</property> @@ -967,7 +967,288 @@ <property name="MemberName" /> <property name="BorderWidth">2</property> <child> - <placeholder /> + <widget class="Gtk.Table" id="table1"> + <property name="MemberName" /> + <property name="NRows">2</property> + <property name="NColumns">2</property> + <property name="RowSpacing">6</property> + <property name="ColumnSpacing">6</property> + <child> + <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow"> + <property name="MemberName" /> + <property name="ShadowType">In</property> + <child> + <widget class="Gtk.TreeView" id="lstEquipment"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="ShowScrollbars">True</property> + <property name="HeadersVisible">False</property> + </widget> + </child> + </widget> + <packing> + <property name="LeftAttach">1</property> + <property name="RightAttach">2</property> + <property name="AutoSize">True</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.HBox" id="hbox2"> + <property name="MemberName" /> + <property name="Spacing">6</property> + <child> + <widget class="Gtk.Table" id="table2"> + <property name="MemberName" /> + <property name="NRows">3</property> + <property name="NColumns">3</property> + <property name="RowSpacing">6</property> + <property name="ColumnSpacing">6</property> + <child> + <placeholder /> + </child> + <child> + <placeholder /> + </child> + <child> + <widget class="Gtk.Label" id="lblEquipAll"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">equip all</property> + </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="lblPercent"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">%</property> + </widget> + <packing> + <property name="TopAttach">1</property> + <property name="BottomAttach">2</property> + <property name="LeftAttach">2</property> + <property name="RightAttach">3</property> + <property name="AutoSize">True</property> + <property name="XOptions">Fill</property> + <property name="YOptions">Fill</property> + <property name="XExpand">False</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.RadioButton" id="rbEquipAll"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="Label" translatable="yes" /> + <property name="Active">True</property> + <property name="DrawIndicator">True</property> + <property name="HasLabel">True</property> + <property name="UseUnderline">True</property> + <property name="Group">group1</property> + </widget> + <packing> + <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> + <property name="XExpand">False</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.RadioButton" id="rbEquipNumeric"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="Label" translatable="yes" /> + <property name="DrawIndicator">True</property> + <property name="HasLabel">True</property> + <property name="UseUnderline">True</property> + <property name="Group">group1</property> + </widget> + <packing> + <property name="AutoSize">False</property> + <property name="XOptions">Fill</property> + <property name="YOptions">Fill</property> + <property name="XExpand">False</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.RadioButton" id="rbEquipPercent"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="Label" translatable="yes" /> + <property name="DrawIndicator">True</property> + <property name="HasLabel">True</property> + <property name="UseUnderline">True</property> + <property name="Group">group1</property> + </widget> + <packing> + <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> + <property name="XExpand">False</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.SpinButton" id="spinbutton1"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="Upper">100</property> + <property name="PageIncrement">10</property> + <property name="StepIncrement">1</property> + <property name="ClimbRate">1</property> + <property name="Numeric">True</property> + </widget> + <packing> + <property name="LeftAttach">1</property> + <property name="RightAttach">2</property> + <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.SpinButton" id="spinbutton2"> + <property name="MemberName" /> + <property name="CanFocus">True</property> + <property name="Upper">100</property> + <property name="PageIncrement">10</property> + <property name="StepIncrement">1</property> + <property name="ClimbRate">1</property> + <property name="Digits">1</property> + <property name="Numeric">True</property> + </widget> + <packing> + <property name="TopAttach">1</property> + <property name="BottomAttach">2</property> + <property name="LeftAttach">1</property> + <property name="RightAttach">2</property> + <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> + </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> + <placeholder /> + </child> + </widget> + <packing> + <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> + <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="lblEquipAmount"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">amount:</property> + </widget> + <packing> + <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> + <property name="XExpand">False</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="lblEquipment"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">equipment</property> + </widget> + <packing> + <property name="AutoSize">True</property> + <property name="XOptions">Fill</property> + <property name="YOptions">Fill</property> + <property name="XExpand">False</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">0</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> </child> </widget> </child>