changeset 146:f3453f3e4591

Fixes #369: Clicking "Create" without unit selected causes errors * Disable the button from the start
author IBBoard <dev@ibboard.co.uk>
date Fri, 25 Nov 2011 20:37:59 +0000
parents 135491fd1830
children 18c7b0b4bc30
files gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs gtk-gui/gui.stetic
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs	Sat Nov 12 19:53:26 2011 +0000
     1.2 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs	Fri Nov 25 20:37:59 2011 +0000
     1.3 @@ -97,6 +97,7 @@
     1.4  			w9.Fill = false;
     1.5  			// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     1.6  			this.bttnCreate = new global::IBBoard.GtkSharp.Translatable.TranslatableButton ();
     1.7 +			this.bttnCreate.Sensitive = false;
     1.8  			this.bttnCreate.CanFocus = true;
     1.9  			this.bttnCreate.Name = "bttnCreate";
    1.10  			this.bttnCreate.UseStock = true;
    1.11 @@ -111,7 +112,7 @@
    1.12  				this.Child.ShowAll ();
    1.13  			}
    1.14  			this.DefaultWidth = 403;
    1.15 -			this.DefaultHeight = 234;
    1.16 +			this.DefaultHeight = 262;
    1.17  			this.validationWidget.Hide ();
    1.18  			this.Show ();
    1.19  			this.lstUnitTypes.RowActivated += new global::Gtk.RowActivatedHandler (this.OnRowActivated);
     2.1 --- a/gtk-gui/gui.stetic	Sat Nov 12 19:53:26 2011 +0000
     2.2 +++ b/gtk-gui/gui.stetic	Fri Nov 25 20:37:59 2011 +0000
     2.3 @@ -595,7 +595,7 @@
     2.4        </widget>
     2.5      </child>
     2.6    </widget>
     2.7 -  <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GUI.GTK.FrmNewUnit" design-size="403 234">
     2.8 +  <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GUI.GTK.FrmNewUnit" design-size="403 262">
     2.9      <property name="MemberName" />
    2.10      <property name="Title" translatable="yes">Add new unit</property>
    2.11      <property name="Icon">stock:gtk-new Menu</property>
    2.12 @@ -706,6 +706,7 @@
    2.13          <child>
    2.14            <widget class="IBBoard.GtkSharp.Translatable.TranslatableButton" id="bttnCreate">
    2.15              <property name="MemberName" />
    2.16 +            <property name="Sensitive">False</property>
    2.17              <property name="CanFocus">True</property>
    2.18              <property name="UseStock">True</property>
    2.19              <property name="Type">StockItem</property>