Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
diff gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.cs @ 55:eb7db8495bb5
Re #60: Add UI to add/remove/edit weapons in GTK
* Make some manual changes to the Steic-generated file until MonoDevelop bug 634447 is resolved
* Add logging to UI
* Make control close once we're done with it
* Set values for equipment controls
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 25 Aug 2010 19:51:23 +0000 |
parents | 4bad8cb3f889 |
children | e7ad676a7344 |
line wrap: on
line diff
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.cs Wed Aug 25 16:01:12 2010 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.cs Wed Aug 25 19:51:23 2010 +0000 @@ -24,9 +24,9 @@ private global::Gtk.RadioButton rbEquipPercent; - private global::Gtk.SpinButton spinbutton1; + private global::Gtk.SpinButton numericAmount; - private global::Gtk.SpinButton spinbutton2; + private global::Gtk.SpinButton percentageAmount; private global::Gtk.Label lblEquipAmount; @@ -59,6 +59,7 @@ this.lstEquipment = new global::Gtk.TreeView(); this.lstEquipment.CanFocus = true; this.lstEquipment.Name = "lstEquipment"; + this.lstEquipment.HeadersVisible = false; this.GtkScrolledWindow.Add(this.lstEquipment); this.table1.Add(this.GtkScrolledWindow); global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow])); @@ -135,28 +136,28 @@ 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])); + this.numericAmount = new global::Gtk.SpinButton(0, 100, 1); + this.numericAmount.CanFocus = true; + this.numericAmount.Name = "numericAmount"; + this.numericAmount.Adjustment.PageIncrement = 10; + this.numericAmount.ClimbRate = 1; + this.numericAmount.Numeric = true; + this.table2.Add(this.numericAmount); + global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table2[this.numericAmount])); 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])); + this.percentageAmount = new global::Gtk.SpinButton(0, 100, 1); + this.percentageAmount.CanFocus = true; + this.percentageAmount.Name = "percentageAmount"; + this.percentageAmount.Adjustment.PageIncrement = 10; + this.percentageAmount.ClimbRate = 1; + this.percentageAmount.Digits = ((uint)(1)); + this.percentageAmount.Numeric = true; + this.table2.Add(this.percentageAmount); + global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table2[this.percentageAmount])); w10.TopAttach = ((uint)(1)); w10.BottomAttach = ((uint)(2)); w10.LeftAttach = ((uint)(1)); @@ -212,6 +213,7 @@ this.buttonCancel.UseStock = true; this.buttonCancel.UseUnderline = true; this.buttonCancel.Label = "gtk-cancel"; + this.buttonCancel.Clicked+= CancelButtonClicked; this.AddActionWidget(this.buttonCancel, -6); global::Gtk.ButtonBox.ButtonBoxChild w17 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w16[this.buttonCancel])); w17.Expand = false;