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 wrap: on
line diff
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs	Sat Nov 12 19:53:26 2011 +0000
+++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs	Fri Nov 25 20:37:59 2011 +0000
@@ -97,6 +97,7 @@
 			w9.Fill = false;
 			// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
 			this.bttnCreate = new global::IBBoard.GtkSharp.Translatable.TranslatableButton ();
+			this.bttnCreate.Sensitive = false;
 			this.bttnCreate.CanFocus = true;
 			this.bttnCreate.Name = "bttnCreate";
 			this.bttnCreate.UseStock = true;
@@ -111,7 +112,7 @@
 				this.Child.ShowAll ();
 			}
 			this.DefaultWidth = 403;
-			this.DefaultHeight = 234;
+			this.DefaultHeight = 262;
 			this.validationWidget.Hide ();
 			this.Show ();
 			this.lstUnitTypes.RowActivated += new global::Gtk.RowActivatedHandler (this.OnRowActivated);
--- a/gtk-gui/gui.stetic	Sat Nov 12 19:53:26 2011 +0000
+++ b/gtk-gui/gui.stetic	Fri Nov 25 20:37:59 2011 +0000
@@ -595,7 +595,7 @@
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GUI.GTK.FrmNewUnit" design-size="403 234">
+  <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GUI.GTK.FrmNewUnit" design-size="403 262">
     <property name="MemberName" />
     <property name="Title" translatable="yes">Add new unit</property>
     <property name="Icon">stock:gtk-new Menu</property>
@@ -706,6 +706,7 @@
         <child>
           <widget class="IBBoard.GtkSharp.Translatable.TranslatableButton" id="bttnCreate">
             <property name="MemberName" />
+            <property name="Sensitive">False</property>
             <property name="CanFocus">True</property>
             <property name="UseStock">True</property>
             <property name="Type">StockItem</property>