comparison gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs @ 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 7b091ea86819
comparison
equal deleted inserted replaced
145:135491fd1830 146:f3453f3e4591
95 global::Gtk.ButtonBox.ButtonBoxChild w9 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w8 [this.bttnCancel])); 95 global::Gtk.ButtonBox.ButtonBoxChild w9 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w8 [this.bttnCancel]));
96 w9.Expand = false; 96 w9.Expand = false;
97 w9.Fill = false; 97 w9.Fill = false;
98 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild 98 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
99 this.bttnCreate = new global::IBBoard.GtkSharp.Translatable.TranslatableButton (); 99 this.bttnCreate = new global::IBBoard.GtkSharp.Translatable.TranslatableButton ();
100 this.bttnCreate.Sensitive = false;
100 this.bttnCreate.CanFocus = true; 101 this.bttnCreate.CanFocus = true;
101 this.bttnCreate.Name = "bttnCreate"; 102 this.bttnCreate.Name = "bttnCreate";
102 this.bttnCreate.UseStock = true; 103 this.bttnCreate.UseStock = true;
103 this.bttnCreate.UseUnderline = true; 104 this.bttnCreate.UseUnderline = true;
104 this.bttnCreate.Label = "gtk-ok"; 105 this.bttnCreate.Label = "gtk-ok";
109 w10.Fill = false; 110 w10.Fill = false;
110 if ((this.Child != null)) { 111 if ((this.Child != null)) {
111 this.Child.ShowAll (); 112 this.Child.ShowAll ();
112 } 113 }
113 this.DefaultWidth = 403; 114 this.DefaultWidth = 403;
114 this.DefaultHeight = 234; 115 this.DefaultHeight = 262;
115 this.validationWidget.Hide (); 116 this.validationWidget.Hide ();
116 this.Show (); 117 this.Show ();
117 this.lstUnitTypes.RowActivated += new global::Gtk.RowActivatedHandler (this.OnRowActivated); 118 this.lstUnitTypes.RowActivated += new global::Gtk.RowActivatedHandler (this.OnRowActivated);
118 this.bttnCancel.Clicked += new global::System.EventHandler (this.OnButtonCancelActivated); 119 this.bttnCancel.Clicked += new global::System.EventHandler (this.OnButtonCancelActivated);
119 this.bttnCreate.Clicked += new global::System.EventHandler (this.OnButtonOkClicked); 120 this.bttnCreate.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);