diff gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewArmy.cs @ 86:9515b57ba752

Re #308: Make GTK# UI translatable * Make form buttons translatable using new method * Swap "Create" button to a stock "OK" so that we don't lose the image on translation
author IBBoard <dev@ibboard.co.uk>
date Wed, 29 Dec 2010 19:41:51 +0000
parents bfb29a60b802
children 40857cfb309b
line wrap: on
line diff
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewArmy.cs	Wed Dec 29 16:56:55 2010 +0000
+++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewArmy.cs	Wed Dec 29 19:41:51 2010 +0000
@@ -12,7 +12,7 @@
 		private global::Gtk.Label lblArmyName;
 		private global::Gtk.Label lblArmySize;
 		private global::Gtk.Label lblGameSystem;
-		private global::Gtk.Label lblRace;
+		private global::Gtk.Label lblRaceList;
 		private global::Gtk.ComboBoxEntry systemCombo;
 		private global::Gtk.Entry txtArmyName;
 		private global::Gtk.Button bttnCancel;
@@ -114,11 +114,11 @@
 			w8.XOptions = ((global::Gtk.AttachOptions)(4));
 			w8.YOptions = ((global::Gtk.AttachOptions)(4));
 			// Container child table1.Gtk.Table+TableChild
-			this.lblRace = new global::Gtk.Label();
-			this.lblRace.Name = "lblRace";
-			this.lblRace.LabelProp = global::Mono.Unix.Catalog.GetString("race");
-			this.table1.Add(this.lblRace);
-			global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.lblRace]));
+			this.lblRaceList = new global::Gtk.Label();
+			this.lblRaceList.Name = "lblRaceList";
+			this.lblRaceList.LabelProp = global::Mono.Unix.Catalog.GetString("race");
+			this.table1.Add(this.lblRaceList);
+			global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.lblRaceList]));
 			w9.TopAttach = ((uint)(1));
 			w9.BottomAttach = ((uint)(2));
 			w9.XOptions = ((global::Gtk.AttachOptions)(4));
@@ -176,28 +176,14 @@
 			this.bttnCreate.CanDefault = true;
 			this.bttnCreate.CanFocus = true;
 			this.bttnCreate.Name = "bttnCreate";
+			this.bttnCreate.UseStock = true;
 			this.bttnCreate.UseUnderline = true;
-			// Container child bttnCreate.Gtk.Container+ContainerChild
-			global::Gtk.Alignment w15 = new global::Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
-			// Container child GtkAlignment.Gtk.Container+ContainerChild
-			global::Gtk.HBox w16 = new global::Gtk.HBox();
-			w16.Spacing = 2;
-			// Container child GtkHBox.Gtk.Container+ContainerChild
-			global::Gtk.Image w17 = new global::Gtk.Image();
-			w17.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-ok", global::Gtk.IconSize.Menu);
-			w16.Add(w17);
-			// Container child GtkHBox.Gtk.Container+ContainerChild
-			global::Gtk.Label w19 = new global::Gtk.Label();
-			w19.LabelProp = global::Mono.Unix.Catalog.GetString("C_reate");
-			w19.UseUnderline = true;
-			w16.Add(w19);
-			w15.Add(w16);
-			this.bttnCreate.Add(w15);
+			this.bttnCreate.Label = "gtk-ok";
 			this.AddActionWidget(this.bttnCreate, -5);
-			global::Gtk.ButtonBox.ButtonBoxChild w23 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w13[this.bttnCreate]));
-			w23.Position = 1;
-			w23.Expand = false;
-			w23.Fill = false;
+			global::Gtk.ButtonBox.ButtonBoxChild w15 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w13[this.bttnCreate]));
+			w15.Position = 1;
+			w15.Expand = false;
+			w15.Fill = false;
 			if ((this.Child != null))
 			{
 				this.Child.ShowAll();