diff gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAbout.cs @ 93:e40d892a2298

Fixes #308: Make GTK# UI translatable * Move all remaining buttons to translatable buttons * Make the About dialog translatable (where appropriate) * Move to UTF-8 encoding in the XML to correctly handle copyright symbol * Switch About dialog to using Close button as per other apps
author IBBoard <dev@ibboard.co.uk>
date Fri, 31 Dec 2010 13:53:18 +0000
parents 9c9af2ce8c43
children 26e4525b49cf
line wrap: on
line diff
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAbout.cs	Fri Dec 31 12:01:18 2010 +0000
+++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAbout.cs	Fri Dec 31 13:53:18 2010 +0000
@@ -4,12 +4,12 @@
 {
 	public partial class FrmAbout
 	{
-		private global::Gtk.Image image1;
+		private global::Gtk.Image logoImage;
 		private global::Gtk.Label label1;
-		private global::Gtk.Label label4;
-		private global::Gtk.Label label2;
-		private global::Gtk.Label label3;
-		private global::Gtk.Button buttonOk;
+		private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblWarFoundryDesc;
+		private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblWarFoundryCopyright;
+		private global::Gtk.Label lblWarFoundryLink;
+		private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnClose;
 
 		protected virtual void Build()
 		{
@@ -26,11 +26,11 @@
 			w1.Name = "dialog1_VBox";
 			w1.BorderWidth = ((uint)(2));
 			// Container child dialog1_VBox.Gtk.Box+BoxChild
-			this.image1 = new global::Gtk.Image();
-			this.image1.Name = "image1";
-			this.image1.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("IBBoard.WarFoundry.GUI.GTK.App-lrg.png");
-			w1.Add(this.image1);
-			global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(w1[this.image1]));
+			this.logoImage = new global::Gtk.Image();
+			this.logoImage.Name = "logoImage";
+			this.logoImage.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("IBBoard.WarFoundry.GUI.GTK.App-lrg.png");
+			w1.Add(this.logoImage);
+			global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(w1[this.logoImage]));
 			w2.Position = 0;
 			w2.Expand = false;
 			w2.Fill = false;
@@ -45,32 +45,32 @@
 			w3.Expand = false;
 			w3.Fill = false;
 			// Container child dialog1_VBox.Gtk.Box+BoxChild
-			this.label4 = new global::Gtk.Label();
-			this.label4.Name = "label4";
-			this.label4.LabelProp = global::Mono.Unix.Catalog.GetString("WarFoundry is an open-source army creation tool that lets you create rosters for multiple game systems.");
-			this.label4.Wrap = true;
-			this.label4.Justify = ((global::Gtk.Justification)(2));
-			w1.Add(this.label4);
-			global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(w1[this.label4]));
+			this.lblWarFoundryDesc = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel();
+			this.lblWarFoundryDesc.Name = "lblWarFoundryDesc";
+			this.lblWarFoundryDesc.LabelProp = global::Mono.Unix.Catalog.GetString("WarFoundry is an open-source army creation tool that lets you create rosters for multiple game systems.");
+			this.lblWarFoundryDesc.Wrap = true;
+			this.lblWarFoundryDesc.Justify = ((global::Gtk.Justification)(2));
+			w1.Add(this.lblWarFoundryDesc);
+			global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(w1[this.lblWarFoundryDesc]));
 			w4.Position = 2;
 			w4.Expand = false;
 			w4.Fill = false;
 			// Container child dialog1_VBox.Gtk.Box+BoxChild
-			this.label2 = new global::Gtk.Label();
-			this.label2.Name = "label2";
-			this.label2.LabelProp = global::Mono.Unix.Catalog.GetString("© 2007-2010, IBBoard and others");
-			w1.Add(this.label2);
-			global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(w1[this.label2]));
+			this.lblWarFoundryCopyright = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel();
+			this.lblWarFoundryCopyright.Name = "lblWarFoundryCopyright";
+			this.lblWarFoundryCopyright.LabelProp = global::Mono.Unix.Catalog.GetString("© 2007-2010, IBBoard and others");
+			w1.Add(this.lblWarFoundryCopyright);
+			global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(w1[this.lblWarFoundryCopyright]));
 			w5.Position = 3;
 			w5.Expand = false;
 			w5.Fill = false;
 			// Container child dialog1_VBox.Gtk.Box+BoxChild
-			this.label3 = new global::Gtk.Label();
-			this.label3.Name = "label3";
-			this.label3.LabelProp = global::Mono.Unix.Catalog.GetString("<a href=\"http://warfoundry.co.uk\">http://warfoundry.co.uk</a>");
-			this.label3.UseMarkup = true;
-			w1.Add(this.label3);
-			global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w1[this.label3]));
+			this.lblWarFoundryLink = new global::Gtk.Label();
+			this.lblWarFoundryLink.Name = "lblWarFoundryLink";
+			this.lblWarFoundryLink.LabelProp = global::Mono.Unix.Catalog.GetString("<a href=\"http://warfoundry.co.uk\">http://warfoundry.co.uk</a>");
+			this.lblWarFoundryLink.UseMarkup = true;
+			w1.Add(this.lblWarFoundryLink);
+			global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w1[this.lblWarFoundryLink]));
 			w6.Position = 4;
 			w6.Expand = false;
 			w6.Fill = false;
@@ -81,15 +81,15 @@
 			w7.BorderWidth = ((uint)(5));
 			w7.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
 			// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
-			this.buttonOk = new global::Gtk.Button();
-			this.buttonOk.CanDefault = true;
-			this.buttonOk.CanFocus = true;
-			this.buttonOk.Name = "buttonOk";
-			this.buttonOk.UseStock = true;
-			this.buttonOk.UseUnderline = true;
-			this.buttonOk.Label = "gtk-ok";
-			this.AddActionWidget(this.buttonOk, -5);
-			global::Gtk.ButtonBox.ButtonBoxChild w8 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w7[this.buttonOk]));
+			this.bttnClose = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
+			this.bttnClose.CanDefault = true;
+			this.bttnClose.CanFocus = true;
+			this.bttnClose.Name = "bttnClose";
+			this.bttnClose.UseStock = true;
+			this.bttnClose.UseUnderline = true;
+			this.bttnClose.Label = "gtk-close";
+			this.AddActionWidget(this.bttnClose, -7);
+			global::Gtk.ButtonBox.ButtonBoxChild w8 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w7[this.bttnClose]));
 			w8.Expand = false;
 			w8.Fill = false;
 			if ((this.Child != null))
@@ -99,7 +99,6 @@
 			this.DefaultWidth = 305;
 			this.DefaultHeight = 300;
 			this.Show();
-			this.buttonOk.Activated += new global::System.EventHandler(this.OkayClicked);
 		}
 	}
 }