diff gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs @ 142:f23e5b40ca9d

Re #344: Show unit requirement failures * Add new widget for displaying failures nicely * Use widget for displaying failures in main window * Use widget for displaying failures in new unit dialog
author IBBoard <dev@ibboard.co.uk>
date Tue, 18 Oct 2011 21:03:35 +0100
parents 5b92d2be69d8
children aca4623b7bdf
line wrap: on
line diff
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs	Mon Oct 17 20:53:07 2011 +0100
+++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs	Tue Oct 18 21:03:35 2011 +0100
@@ -9,7 +9,7 @@
 		private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblUnitList;
 		private global::Gtk.ScrolledWindow GtkScrolledWindow;
 		private global::Gtk.TreeView lstUnitTypes;
-		private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblNewUnitWarning;
+		private global::IBBoard.WarFoundry.GUI.GTK.ValidationFailureWidget validationWidget;
 		private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnCancel;
 		private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnCreate;
 		
@@ -65,12 +65,14 @@
 			w5.Expand = false;
 			w5.Fill = false;
 			// Container child vbox2.Gtk.Box+BoxChild
-			this.lblNewUnitWarning = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel ();
-			this.lblNewUnitWarning.Name = "lblNewUnitWarning";
-			this.lblNewUnitWarning.Xalign = 0F;
-			this.vbox2.Add (this.lblNewUnitWarning);
-			global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.lblNewUnitWarning]));
+			this.validationWidget = new global::IBBoard.WarFoundry.GUI.GTK.ValidationFailureWidget ();
+			this.validationWidget.Events = ((global::Gdk.EventMask)(256));
+			this.validationWidget.Name = "validationWidget";
+			this.vbox2.Add (this.validationWidget);
+			global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.validationWidget]));
 			w6.Position = 1;
+			w6.Expand = false;
+			w6.Fill = false;
 			w1.Add (this.vbox2);
 			global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox2]));
 			w7.Position = 0;
@@ -109,8 +111,7 @@
 				this.Child.ShowAll ();
 			}
 			this.DefaultWidth = 403;
-			this.DefaultHeight = 259;
-			this.lblNewUnitWarning.Hide ();
+			this.DefaultHeight = 311;
 			this.Show ();
 			this.lstUnitTypes.RowActivated += new global::Gtk.RowActivatedHandler (this.OnRowActivated);
 			this.bttnCancel.Clicked += new global::System.EventHandler (this.OnButtonCancelActivated);