diff gtk-gui/IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget.cs @ 96:b4416ca69153

Fixes #309: Add initial preference dialog with language support * Hook up events so that everything translates itself when languages change Re #308: Make GTK# UI translatable * Update English and French translations (using Google Translate) * Begin to standardise on WinForms names for widgets for maximum reusability of translation files * Make some preference and credit buttons translatable
author IBBoard <dev@ibboard.co.uk>
date Sun, 02 Jan 2011 15:12:31 +0000
parents e40d892a2298
children 560eb34acd17
line wrap: on
line diff
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget.cs	Sat Jan 01 20:55:07 2011 +0000
+++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget.cs	Sun Jan 02 15:12:31 2011 +0000
@@ -13,7 +13,6 @@
 		private global::Gtk.HSeparator hseparator1;
 		private global::Gtk.HBox hbox2;
 		private global::Gtk.Table table1;
-		private global::IBBoard.GtkSharp.Translatable.TranslatableLabel equipmentLabel;
 		private global::Gtk.ScrolledWindow GtkScrolledWindow2;
 		private global::Gtk.NodeView equipmentList;
 		private global::Gtk.ScrolledWindow GtkScrolledWindow3;
@@ -21,12 +20,13 @@
 		private global::Gtk.ScrolledWindow GtkScrolledWindow4;
 		private global::Gtk.NodeView abilitiesList;
 		private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblAbilities;
+		private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblEquip;
 		private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblNotes;
 		private global::Gtk.VBox vbox3;
-		private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnAddEquipment;
-		private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnEditEquipment;
-		private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnReplaceEquipment;
-		private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnRemoveEquipment;
+		private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnAddWeapon;
+		private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnEditWeapon;
+		private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnReplaceWeapon;
+		private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnRemoveWeapon;
 
 		protected virtual void Build()
 		{
@@ -103,14 +103,6 @@
 			this.table1.RowSpacing = ((uint)(6));
 			this.table1.ColumnSpacing = ((uint)(6));
 			// Container child table1.Gtk.Table+TableChild
-			this.equipmentLabel = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel();
-			this.equipmentLabel.Name = "equipmentLabel";
-			this.equipmentLabel.LabelProp = global::Mono.Unix.Catalog.GetString("equipment:");
-			this.table1.Add(this.equipmentLabel);
-			global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.equipmentLabel]));
-			w9.XOptions = ((global::Gtk.AttachOptions)(4));
-			w9.YOptions = ((global::Gtk.AttachOptions)(4));
-			// Container child table1.Gtk.Table+TableChild
 			this.GtkScrolledWindow2 = new global::Gtk.ScrolledWindow();
 			this.GtkScrolledWindow2.Name = "GtkScrolledWindow2";
 			this.GtkScrolledWindow2.ShadowType = ((global::Gtk.ShadowType)(1));
@@ -121,10 +113,10 @@
 			this.equipmentList.HeadersVisible = false;
 			this.GtkScrolledWindow2.Add(this.equipmentList);
 			this.table1.Add(this.GtkScrolledWindow2);
-			global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow2]));
-			w11.LeftAttach = ((uint)(1));
-			w11.RightAttach = ((uint)(2));
-			w11.YOptions = ((global::Gtk.AttachOptions)(4));
+			global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow2]));
+			w10.LeftAttach = ((uint)(1));
+			w10.RightAttach = ((uint)(2));
+			w10.YOptions = ((global::Gtk.AttachOptions)(4));
 			// Container child table1.Gtk.Table+TableChild
 			this.GtkScrolledWindow3 = new global::Gtk.ScrolledWindow();
 			this.GtkScrolledWindow3.Name = "GtkScrolledWindow3";
@@ -136,12 +128,12 @@
 			this.notesView.Editable = false;
 			this.GtkScrolledWindow3.Add(this.notesView);
 			this.table1.Add(this.GtkScrolledWindow3);
-			global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow3]));
-			w13.TopAttach = ((uint)(2));
-			w13.BottomAttach = ((uint)(3));
-			w13.LeftAttach = ((uint)(1));
-			w13.RightAttach = ((uint)(2));
-			w13.YOptions = ((global::Gtk.AttachOptions)(4));
+			global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow3]));
+			w12.TopAttach = ((uint)(2));
+			w12.BottomAttach = ((uint)(3));
+			w12.LeftAttach = ((uint)(1));
+			w12.RightAttach = ((uint)(2));
+			w12.YOptions = ((global::Gtk.AttachOptions)(4));
 			// Container child table1.Gtk.Table+TableChild
 			this.GtkScrolledWindow4 = new global::Gtk.ScrolledWindow();
 			this.GtkScrolledWindow4.Name = "GtkScrolledWindow4";
@@ -153,20 +145,28 @@
 			this.abilitiesList.HeadersVisible = false;
 			this.GtkScrolledWindow4.Add(this.abilitiesList);
 			this.table1.Add(this.GtkScrolledWindow4);
-			global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow4]));
-			w15.TopAttach = ((uint)(1));
-			w15.BottomAttach = ((uint)(2));
-			w15.LeftAttach = ((uint)(1));
-			w15.RightAttach = ((uint)(2));
-			w15.YOptions = ((global::Gtk.AttachOptions)(4));
+			global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow4]));
+			w14.TopAttach = ((uint)(1));
+			w14.BottomAttach = ((uint)(2));
+			w14.LeftAttach = ((uint)(1));
+			w14.RightAttach = ((uint)(2));
+			w14.YOptions = ((global::Gtk.AttachOptions)(4));
 			// Container child table1.Gtk.Table+TableChild
 			this.lblAbilities = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel();
 			this.lblAbilities.Name = "lblAbilities";
 			this.lblAbilities.LabelProp = global::Mono.Unix.Catalog.GetString("abilities:");
 			this.table1.Add(this.lblAbilities);
-			global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.lblAbilities]));
-			w16.TopAttach = ((uint)(1));
-			w16.BottomAttach = ((uint)(2));
+			global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.lblAbilities]));
+			w15.TopAttach = ((uint)(1));
+			w15.BottomAttach = ((uint)(2));
+			w15.XOptions = ((global::Gtk.AttachOptions)(4));
+			w15.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table1.Gtk.Table+TableChild
+			this.lblEquip = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel();
+			this.lblEquip.Name = "lblEquip";
+			this.lblEquip.LabelProp = global::Mono.Unix.Catalog.GetString("equipment:");
+			this.table1.Add(this.lblEquip);
+			global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.lblEquip]));
 			w16.XOptions = ((global::Gtk.AttachOptions)(4));
 			w16.YOptions = ((global::Gtk.AttachOptions)(4));
 			// Container child table1.Gtk.Table+TableChild
@@ -187,49 +187,49 @@
 			this.vbox3.Name = "vbox3";
 			this.vbox3.Spacing = 6;
 			// Container child vbox3.Gtk.Box+BoxChild
-			this.bttnAddEquipment = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
-			this.bttnAddEquipment.CanFocus = true;
-			this.bttnAddEquipment.Name = "bttnAddEquipment";
-			this.bttnAddEquipment.UseUnderline = true;
-			this.bttnAddEquipment.Label = global::Mono.Unix.Catalog.GetString("add");
-			this.vbox3.Add(this.bttnAddEquipment);
-			global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnAddEquipment]));
+			this.bttnAddWeapon = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
+			this.bttnAddWeapon.CanFocus = true;
+			this.bttnAddWeapon.Name = "bttnAddWeapon";
+			this.bttnAddWeapon.UseUnderline = true;
+			this.bttnAddWeapon.Label = global::Mono.Unix.Catalog.GetString("add");
+			this.vbox3.Add(this.bttnAddWeapon);
+			global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnAddWeapon]));
 			w19.Position = 0;
 			w19.Expand = false;
 			w19.Fill = false;
 			// Container child vbox3.Gtk.Box+BoxChild
-			this.bttnEditEquipment = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
-			this.bttnEditEquipment.Sensitive = false;
-			this.bttnEditEquipment.CanFocus = true;
-			this.bttnEditEquipment.Name = "bttnEditEquipment";
-			this.bttnEditEquipment.UseUnderline = true;
-			this.bttnEditEquipment.Label = global::Mono.Unix.Catalog.GetString("edit");
-			this.vbox3.Add(this.bttnEditEquipment);
-			global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnEditEquipment]));
+			this.bttnEditWeapon = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
+			this.bttnEditWeapon.Sensitive = false;
+			this.bttnEditWeapon.CanFocus = true;
+			this.bttnEditWeapon.Name = "bttnEditWeapon";
+			this.bttnEditWeapon.UseUnderline = true;
+			this.bttnEditWeapon.Label = global::Mono.Unix.Catalog.GetString("edit");
+			this.vbox3.Add(this.bttnEditWeapon);
+			global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnEditWeapon]));
 			w20.Position = 1;
 			w20.Expand = false;
 			w20.Fill = false;
 			// Container child vbox3.Gtk.Box+BoxChild
-			this.bttnReplaceEquipment = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
-			this.bttnReplaceEquipment.Sensitive = false;
-			this.bttnReplaceEquipment.CanFocus = true;
-			this.bttnReplaceEquipment.Name = "bttnReplaceEquipment";
-			this.bttnReplaceEquipment.UseUnderline = true;
-			this.bttnReplaceEquipment.Label = global::Mono.Unix.Catalog.GetString("replace");
-			this.vbox3.Add(this.bttnReplaceEquipment);
-			global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnReplaceEquipment]));
+			this.bttnReplaceWeapon = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
+			this.bttnReplaceWeapon.Sensitive = false;
+			this.bttnReplaceWeapon.CanFocus = true;
+			this.bttnReplaceWeapon.Name = "bttnReplaceWeapon";
+			this.bttnReplaceWeapon.UseUnderline = true;
+			this.bttnReplaceWeapon.Label = global::Mono.Unix.Catalog.GetString("replace");
+			this.vbox3.Add(this.bttnReplaceWeapon);
+			global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnReplaceWeapon]));
 			w21.Position = 2;
 			w21.Expand = false;
 			w21.Fill = false;
 			// Container child vbox3.Gtk.Box+BoxChild
-			this.bttnRemoveEquipment = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
-			this.bttnRemoveEquipment.Sensitive = false;
-			this.bttnRemoveEquipment.CanFocus = true;
-			this.bttnRemoveEquipment.Name = "bttnRemoveEquipment";
-			this.bttnRemoveEquipment.UseUnderline = true;
-			this.bttnRemoveEquipment.Label = global::Mono.Unix.Catalog.GetString("remove");
-			this.vbox3.Add(this.bttnRemoveEquipment);
-			global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnRemoveEquipment]));
+			this.bttnRemoveWeapon = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
+			this.bttnRemoveWeapon.Sensitive = false;
+			this.bttnRemoveWeapon.CanFocus = true;
+			this.bttnRemoveWeapon.Name = "bttnRemoveWeapon";
+			this.bttnRemoveWeapon.UseUnderline = true;
+			this.bttnRemoveWeapon.Label = global::Mono.Unix.Catalog.GetString("remove");
+			this.vbox3.Add(this.bttnRemoveWeapon);
+			global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnRemoveWeapon]));
 			w22.Position = 3;
 			w22.Expand = false;
 			w22.Fill = false;
@@ -253,10 +253,10 @@
 			this.unitName.KeyPressEvent += new global::Gtk.KeyPressEventHandler(this.OnUnitNameKeyPress);
 			this.unitSize.FocusOutEvent += new global::Gtk.FocusOutEventHandler(this.OnUnitSizeFocusOut);
 			this.unitSize.KeyPressEvent += new global::Gtk.KeyPressEventHandler(this.OnUnitSizeKeyPress);
-			this.bttnAddEquipment.Clicked += new global::System.EventHandler(this.OnBttnAddEquipmentClicked);
-			this.bttnEditEquipment.Clicked += new global::System.EventHandler(this.HandleEditButtonClicked);
-			this.bttnReplaceEquipment.Clicked += new global::System.EventHandler(this.HandleReplaceButtonClicked);
-			this.bttnRemoveEquipment.Clicked += new global::System.EventHandler(this.HandleRemoveButtonActivated);
+			this.bttnAddWeapon.Clicked += new global::System.EventHandler(this.OnBttnAddEquipmentClicked);
+			this.bttnEditWeapon.Clicked += new global::System.EventHandler(this.HandleEditButtonClicked);
+			this.bttnReplaceWeapon.Clicked += new global::System.EventHandler(this.HandleReplaceButtonClicked);
+			this.bttnRemoveWeapon.Clicked += new global::System.EventHandler(this.HandleRemoveButtonActivated);
 		}
 	}
 }