Mercurial > repos > IBBoard.WarFoundry.GUI.GTK
changeset 90:a754a2d1881c
Re #308: Make GTK# UI translatable
* Move FrmNewArmy to using translatable buttons
* Re-link lost button click methods in FrmNewUnit
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 31 Dec 2010 10:54:42 +0000 |
parents | 31d54f67d50d |
children | 986fc923c0fa |
files | gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewArmy.cs gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs gtk-gui/gui.stetic |
diffstat | 3 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewArmy.cs Thu Dec 30 21:00:00 2010 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewArmy.cs Fri Dec 31 10:54:42 2010 +0000 @@ -15,8 +15,8 @@ private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblRaceList; private global::Gtk.ComboBoxEntry systemCombo; private global::Gtk.Entry txtArmyName; - private global::Gtk.Button bttnCancel; - private global::Gtk.Button bttnCreate; + private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnCancel; + private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnCreate; protected virtual void Build() { @@ -160,7 +160,7 @@ w13.BorderWidth = ((uint)(5)); w13.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); // Container child WarFoundrySharp.FrmNewArmy_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.bttnCancel = new global::Gtk.Button(); + this.bttnCancel = new global::IBBoard.GtkSharp.Translatable.TranslatableButton(); this.bttnCancel.CanFocus = true; this.bttnCancel.Name = "bttnCancel"; this.bttnCancel.UseStock = true; @@ -171,7 +171,7 @@ w14.Expand = false; w14.Fill = false; // Container child WarFoundrySharp.FrmNewArmy_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.bttnCreate = new global::Gtk.Button(); + this.bttnCreate = new global::IBBoard.GtkSharp.Translatable.TranslatableButton(); this.bttnCreate.Sensitive = false; this.bttnCreate.CanDefault = true; this.bttnCreate.CanFocus = true;
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs Thu Dec 30 21:00:00 2010 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs Fri Dec 31 10:54:42 2010 +0000 @@ -116,6 +116,8 @@ this.DefaultHeight = 259; this.Show(); this.lstUnitTypes.RowActivated += new global::Gtk.RowActivatedHandler(this.OnRowActivated); + this.bttnCancel.Clicked += new global::System.EventHandler(this.OnButtonCancelActivated); + this.bttnCreate.Clicked += new global::System.EventHandler(this.OnButtonOkClicked); } } }
--- a/gtk-gui/gui.stetic Thu Dec 30 21:00:00 2010 +0000 +++ b/gtk-gui/gui.stetic Fri Dec 31 10:54:42 2010 +0000 @@ -515,7 +515,7 @@ <property name="Size">2</property> <property name="LayoutStyle">End</property> <child> - <widget class="Gtk.Button" id="bttnCancel"> + <widget class="IBBoard.GtkSharp.Translatable.TranslatableButton" id="bttnCancel"> <property name="MemberName" /> <property name="CanFocus">True</property> <property name="UseStock">True</property> @@ -531,7 +531,7 @@ </packing> </child> <child> - <widget class="Gtk.Button" id="bttnCreate"> + <widget class="IBBoard.GtkSharp.Translatable.TranslatableButton" id="bttnCreate"> <property name="MemberName" /> <property name="Sensitive">False</property> <property name="CanDefault">True</property> @@ -652,6 +652,7 @@ <property name="Type">StockItem</property> <property name="StockId">gtk-cancel</property> <property name="ResponseId">-6</property> + <signal name="Clicked" handler="OnButtonCancelActivated" /> <property name="label">gtk-cancel</property> </widget> <packing> @@ -667,6 +668,7 @@ <property name="Type">StockItem</property> <property name="StockId">gtk-ok</property> <property name="ResponseId">-5</property> + <signal name="Clicked" handler="OnButtonOkClicked" /> <property name="label">gtk-ok</property> </widget> <packing>