# HG changeset patch # User IBBoard # Date 1293981151 0 # Node ID b4416ca69153d337994995d720d5a1dae0a6e0cb # Parent ea4069bbe6e934e2feb10595132d142e410647ff 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 diff -r ea4069bbe6e9 -r b4416ca69153 FrmAbout.cs --- a/FrmAbout.cs Sat Jan 01 20:55:07 2011 +0000 +++ b/FrmAbout.cs Sun Jan 02 15:12:31 2011 +0000 @@ -5,6 +5,7 @@ using System; using Gtk; using IBBoard.GtkSharp.Translatable; +using IBBoard.Lang; namespace IBBoard.WarFoundry.GUI.GTK { @@ -25,9 +26,21 @@ private FrmAbout() { this.Build(); + Translation.TranslationChanged += Retranslate; Translate(); } + private void Retranslate() + { + Translate(); + } + + public override void Dispose() + { + Translation.TranslationChanged -= Retranslate; + base.Dispose(); + } + protected virtual void CloseClicked(object sender, System.EventArgs e) { Respond(ResponseType.Close); diff -r ea4069bbe6e9 -r b4416ca69153 FrmAboutCredits.cs --- a/FrmAboutCredits.cs Sat Jan 01 20:55:07 2011 +0000 +++ b/FrmAboutCredits.cs Sun Jan 02 15:12:31 2011 +0000 @@ -2,8 +2,8 @@ // // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. -using System; using IBBoard.GtkSharp.Translatable; +using IBBoard.Lang; namespace IBBoard.WarFoundry.GUI.GTK { @@ -12,8 +12,20 @@ public FrmAboutCredits() { this.Build(); + Translation.TranslationChanged += Retranslate; Translate(); } + + private void Retranslate() + { + Translate(); + } + + public override void Dispose() + { + Translation.TranslationChanged -= Retranslate; + base.Dispose(); + } } } diff -r ea4069bbe6e9 -r b4416ca69153 FrmAddEquipment.cs --- a/FrmAddEquipment.cs Sat Jan 01 20:55:07 2011 +0000 +++ b/FrmAddEquipment.cs Sun Jan 02 15:12:31 2011 +0000 @@ -33,9 +33,21 @@ equipColumn.PackStart(equipCell, true); equipColumn.SetCellDataFunc(equipCell, GtkWarFoundryUtil.RenderWarFoundryObjectName); lstEquipment.AppendColumn(equipColumn); + Translation.TranslationChanged += Retranslate; Translate(); } + private void Retranslate() + { + Translate(); + } + + public override void Dispose() + { + Translation.TranslationChanged -= Retranslate; + base.Dispose(); + } + protected override void Translate() { base.Translate(); diff -r ea4069bbe6e9 -r b4416ca69153 FrmEditEquipment.cs --- a/FrmEditEquipment.cs Sat Jan 01 20:55:07 2011 +0000 +++ b/FrmEditEquipment.cs Sun Jan 02 15:12:31 2011 +0000 @@ -28,9 +28,21 @@ public FrmEditEquipment() { this.Build(); + Translation.TranslationChanged += Retranslate; Translate(); } + private void Retranslate() + { + Translate(); + } + + public override void Dispose() + { + Translation.TranslationChanged -= Retranslate; + base.Dispose(); + } + public void ListenToWidgets() { rbEquipAll.Clicked += RadioButtonClicked; diff -r ea4069bbe6e9 -r b4416ca69153 FrmMainWindow.cs --- a/FrmMainWindow.cs Sat Jan 01 20:55:07 2011 +0000 +++ b/FrmMainWindow.cs Sun Jan 02 15:12:31 2011 +0000 @@ -148,7 +148,8 @@ WarFoundryCore.GameSystemChanged += new GameSystemChangedDelegate(OnGameSystemChanged); WarFoundryCore.ArmyChanged += new ArmyChangedDelegate(OnArmyChanged); Destroyed += new EventHandler(OnWindowDestroyed); - TranslateWindow(); + Translation.TranslationChanged += Retranslate; + Translate(); UnitAddedMethod = new ObjectAddDelegate(OnUnitAdded); UnitRemovedMethod = new ObjectRemoveDelegate(OnUnitRemoved); PointsValueChangedMethod = new DoubleValChangedDelegate(OnPointsValueChanged); @@ -219,13 +220,24 @@ } } - private void TranslateWindow() + protected override void Translate() { - ControlTranslator.TranslateWidget(this); + base.Translate(); SetAppTitle(); treeUnits.GetColumn(0).Title = Translation.GetTranslation("armyCategoryColumnTitle", "categories"); } + private void Retranslate() + { + Translate(); + } + + public override void Dispose() + { + Translation.TranslationChanged -= Retranslate; + base.Dispose(); + } + private void FileLoadingFinished(List failures) { foreach (FileLoadFailure failure in failures) diff -r ea4069bbe6e9 -r b4416ca69153 FrmNewArmy.cs --- a/FrmNewArmy.cs Sat Jan 01 20:55:07 2011 +0000 +++ b/FrmNewArmy.cs Sun Jan 02 15:12:31 2011 +0000 @@ -36,7 +36,6 @@ raceColumn.PackStart(raceCell, true); lstRaces.AppendColumn(raceColumn); raceColumn.SetCellDataFunc(raceCell, GtkWarFoundryUtil.RenderWarFoundryObjectName); - Translate(); if (gameSystem != null) { @@ -46,6 +45,20 @@ { ComboBoxUtils.SelectIndex(systemCombo, 0); } + + Translation.TranslationChanged += Retranslate; + Translate(); + } + + private void Retranslate() + { + Translate(); + } + + public override void Dispose() + { + Translation.TranslationChanged -= Retranslate; + base.Dispose(); } protected override void Translate() diff -r ea4069bbe6e9 -r b4416ca69153 FrmNewUnit.cs --- a/FrmNewUnit.cs Sat Jan 01 20:55:07 2011 +0000 +++ b/FrmNewUnit.cs Sun Jan 02 15:12:31 2011 +0000 @@ -43,9 +43,22 @@ lstUnitTypes.Model = store; lstUnitTypes.Selection.Changed += new EventHandler(OnSelectionChanged); + + Translation.TranslationChanged += Retranslate; Translate(); } + private void Retranslate() + { + Translate(); + } + + public override void Dispose() + { + Translation.TranslationChanged -= Retranslate; + base.Dispose(); + } + protected override void Translate() { base.Translate(); diff -r ea4069bbe6e9 -r b4416ca69153 FrmPreferences.cs --- a/FrmPreferences.cs Sat Jan 01 20:55:07 2011 +0000 +++ b/FrmPreferences.cs Sun Jan 02 15:12:31 2011 +0000 @@ -26,14 +26,30 @@ this.Build(); BuildPreferenceCategoryTree(); BuildLanguageList(); + + Translation.TranslationChanged += Retranslate; Translate(); } + private void Retranslate() + { + Translate(); + } + + public override void Dispose() + { + Translation.TranslationChanged -= Retranslate; + base.Dispose(); + } + protected override void Translate() { base.Translate(); frameLabel.Text = Translation.GetTranslation("languagesGroup", "languages"); - + TreeStore model = ((TreeStore)preferencesTree.Model); + TreeIter iter; + model.GetIterFirst(out iter); + model.SetValue(iter, 0, Translation.GetTranslation("languagePrefSection", "Language")); } private void RenderPreference(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) diff -r ea4069bbe6e9 -r b4416ca69153 FrmReplaceEquipment.cs --- a/FrmReplaceEquipment.cs Sat Jan 01 20:55:07 2011 +0000 +++ b/FrmReplaceEquipment.cs Sun Jan 02 15:12:31 2011 +0000 @@ -6,6 +6,7 @@ using Gtk; using IBBoard.GtkSharp; using IBBoard.GtkSharp.Translatable; +using IBBoard.Lang; using IBBoard.WarFoundry.API.Objects; using IBBoard.WarFoundry.GUI.GTK.UIControl.Interfaces; using IBBoard.WarFoundry.GUI.GTK.Util; @@ -16,12 +17,13 @@ public partial class FrmReplaceEquipment : TranslatableDialog, IReplaceEquipmentUI { private static ILog log = LogManager.GetLogger(typeof(FrmReplaceEquipment)); + public event SingleArgMethodInvoker UnitEquipmentItemChoiceChanged; public event MethodInvoker UnitEquipmentAmountTypeChanged; public event MethodInvoker UnitEquipmentAmountChanged; private bool isRatioLimited; - + public FrmReplaceEquipment() { this.Build(); @@ -32,8 +34,22 @@ equipColumn.PackStart(equipCell, true); equipColumn.SetCellDataFunc(equipCell, GtkWarFoundryUtil.RenderWarFoundryObjectName); lstEquipment.AppendColumn(equipColumn); + + Translation.TranslationChanged += Retranslate; + Translate(); } - + + private void Retranslate() + { + Translate(); + } + + public override void Dispose() + { + Translation.TranslationChanged -= Retranslate; + base.Dispose(); + } + public void ListenToWidgets() { rbEquipAll.Clicked += RadioButtonClicked; @@ -43,7 +59,7 @@ percentageAmount.ValueChanged += SpinButtonValueChanged; lstEquipment.Selection.Changed += OnSelectionChanged; } - + public void IgnoreWidgets() { rbEquipAll.Clicked -= RadioButtonClicked; @@ -53,7 +69,7 @@ percentageAmount.ValueChanged -= SpinButtonValueChanged; lstEquipment.Selection.Changed -= OnSelectionChanged; } - + private void OnUnitEquipmentAmountChanged() { if (UnitEquipmentAmountChanged != null) @@ -61,7 +77,7 @@ UnitEquipmentAmountChanged(); } } - + private void OnUnitEquipmentAmountTypeChanged() { if (UnitEquipmentAmountChanged != null) @@ -69,7 +85,7 @@ UnitEquipmentAmountTypeChanged(); } } - + protected void OnSelectionChanged(object o, EventArgs e) { if (UnitEquipmentItemChoiceChanged != null) @@ -127,41 +143,41 @@ this.Hide(); return okayClicked; } - + protected virtual void CancelButtonClicked(object sender, System.EventArgs e) { log.Debug("Cancel clicked"); Respond(ResponseType.Cancel); } - + protected virtual void OkayButtonClicked(object sender, System.EventArgs e) { log.Debug("Okay clicked"); Respond(ResponseType.Ok); } - + public void SetOkayEnabledState(bool enabled) { buttonOk.Sensitive = enabled; } - + protected virtual void SpinButtonValueChanged(object sender, System.EventArgs e) { OnUnitEquipmentAmountChanged(); } - + protected virtual void RadioButtonClicked(object sender, System.EventArgs e) { OnUnitEquipmentAmountTypeChanged(); } - + public void SetNumericAmountEnabledState(bool enabled) { double minPercent = GetMinPercentage(); rbEquipNumeric.Sensitive = enabled && !(isRatioLimited && minPercent == 100); numericAmount.Sensitive = rbEquipNumeric.Sensitive; } - + public void SetPercentageAmountEnabledState(bool enabled) { if (enabled) @@ -195,7 +211,7 @@ percentageAmount.GetRange(out min, out max); return min; } - + public UnitEquipmentItem SelectedUnitEquipmentItem { get @@ -203,7 +219,7 @@ return (UnitEquipmentItem)TreeUtils.GetSelectedItem(lstEquipment); } } - + public bool IsRatioEquipmentAmount { get @@ -211,7 +227,7 @@ return !rbEquipNumeric.Active; } } - + public int EquipmentNumericAmount { get @@ -224,7 +240,7 @@ numericAmount.Value = value; } } - + public double EquipmentPercentageAmount { get diff -r ea4069bbe6e9 -r b4416ca69153 Widgets/UnitDisplayWidget.cs --- a/Widgets/UnitDisplayWidget.cs Sat Jan 01 20:55:07 2011 +0000 +++ b/Widgets/UnitDisplayWidget.cs Sun Jan 02 15:12:31 2011 +0000 @@ -59,14 +59,14 @@ private void SetButtonsEnabledState() { UnitEquipmentItem equipItem = GetSelectedEquipmentItem(); - bttnReplaceEquipment.Sensitive = (equipItem != null && equipItem.HasAlternatives()); - bttnEditEquipment.Sensitive = (UnitEquipmentUtil.CanEditEquipmentAmount(unit, equipItem)); - bttnRemoveEquipment.Sensitive = (equipItem != null && !equipItem.IsRequired); + bttnReplaceWeapon.Sensitive = (equipItem != null && equipItem.HasAlternatives()); + bttnEditWeapon.Sensitive = (UnitEquipmentUtil.CanEditEquipmentAmount(unit, equipItem)); + bttnRemoveWeapon.Sensitive = (equipItem != null && !equipItem.IsRequired); } private void SetAddButtonEnabledState() { - bttnAddEquipment.Sensitive = AddEquipmentUIControl.HasEquipmentToAdd(unit); + bttnAddWeapon.Sensitive = AddEquipmentUIControl.HasEquipmentToAdd(unit); } private UnitEquipmentItem GetSelectedEquipmentItem() diff -r ea4069bbe6e9 -r b4416ca69153 gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAboutCredits.cs --- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAboutCredits.cs Sat Jan 01 20:55:07 2011 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAboutCredits.cs Sun Jan 02 15:12:31 2011 +0000 @@ -11,7 +11,7 @@ private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblDevelopers; private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblTestersCommon; private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblTestersGtk; - private global::Gtk.Button bttnClose; + private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnClose; protected virtual void Build() { @@ -129,7 +129,7 @@ w9.BorderWidth = ((uint)(5)); w9.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.bttnClose = new global::Gtk.Button(); + this.bttnClose = new global::IBBoard.GtkSharp.Translatable.TranslatableButton(); this.bttnClose.CanDefault = true; this.bttnClose.CanFocus = true; this.bttnClose.Name = "bttnClose"; diff -r ea4069bbe6e9 -r b4416ca69153 gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmPreferences.cs --- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmPreferences.cs Sat Jan 01 20:55:07 2011 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmPreferences.cs Sun Jan 02 15:12:31 2011 +0000 @@ -13,15 +13,18 @@ private global::Gtk.ComboBox languageList; private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblLanguage; private global::Gtk.Label frameLabel; - private global::Gtk.Button bttnCancel; - private global::Gtk.Button bttnOkay; + private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnCancel; + private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnOkay; protected virtual void Build() { global::Stetic.Gui.Initialize(this); // Widget IBBoard.WarFoundry.GUI.GTK.FrmPreferences this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmPreferences"; + this.TypeHint = ((global::Gdk.WindowTypeHint)(1)); this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + this.SkipPagerHint = true; + this.SkipTaskbarHint = true; // Internal child IBBoard.WarFoundry.GUI.GTK.FrmPreferences.VBox global::Gtk.VBox w1 = this.VBox; w1.Name = "dialog1_VBox"; @@ -93,7 +96,7 @@ w10.BorderWidth = ((uint)(5)); w10.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.bttnCancel = new global::Gtk.Button(); + this.bttnCancel = new global::IBBoard.GtkSharp.Translatable.TranslatableButton(); this.bttnCancel.CanDefault = true; this.bttnCancel.CanFocus = true; this.bttnCancel.Name = "bttnCancel"; @@ -105,7 +108,7 @@ w11.Expand = false; w11.Fill = false; // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.bttnOkay = new global::Gtk.Button(); + this.bttnOkay = new global::IBBoard.GtkSharp.Translatable.TranslatableButton(); this.bttnOkay.CanDefault = true; this.bttnOkay.CanFocus = true; this.bttnOkay.Name = "bttnOkay"; diff -r ea4069bbe6e9 -r b4416ca69153 gtk-gui/IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget.cs --- 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); } } } diff -r ea4069bbe6e9 -r b4416ca69153 gtk-gui/gui.stetic --- a/gtk-gui/gui.stetic Sat Jan 01 20:55:07 2011 +0000 +++ b/gtk-gui/gui.stetic Sun Jan 02 15:12:31 2011 +0000 @@ -788,23 +788,6 @@ 6 6 - - - equipment: - - - True - Fill - Fill - False - True - False - False - True - False - - - In @@ -907,6 +890,23 @@ + + + equipment: + + + True + Fill + Fill + False + True + False + False + True + False + + + notes: @@ -936,7 +936,7 @@ 6 - + True TextOnly @@ -952,7 +952,7 @@ - + False True @@ -969,7 +969,7 @@ - + False True @@ -986,7 +986,7 @@ - + False True @@ -2328,7 +2328,7 @@ 1 End - + True True @@ -2348,7 +2348,10 @@ + Dialog CenterOnParent + True + True 2 False @@ -2477,7 +2480,7 @@ 2 End - + True True @@ -2494,7 +2497,7 @@ - + True True diff -r ea4069bbe6e9 -r b4416ca69153 translations/en.translation --- a/translations/en.translation Sat Jan 01 20:55:07 2011 +0000 +++ b/translations/en.translation Sun Jan 02 15:12:31 2011 +0000 @@ -28,15 +28,16 @@ Cancel Cancel OK +OK Select system Save army Unit of {0} {1} {0} pts / {1} pts -Add -Edit -Remove -Replace -Equipment: +Add +Edit +Remove +Replace +Equipment: Abilities: Notes: Create Army @@ -65,6 +66,7 @@ Equipment: Edit Equipment Equipment +Replace Equipment About WarFoundry Close Credits diff -r ea4069bbe6e9 -r b4416ca69153 translations/fr.translation --- a/translations/fr.translation Sat Jan 01 20:55:07 2011 +0000 +++ b/translations/fr.translation Sun Jan 02 15:12:31 2011 +0000 @@ -1,5 +1,6 @@ + _Fichier _Édition _Aide @@ -108,10 +109,19 @@ {1} {0} {0}, {1} {0} peut être sélectionné seulement si l'objet suivant est sélectionné : {1} - -Preferences -Language -Language: -Language -_Preferences + +Préférences +Langue +Langue: +Langue +_Préférences +Crédits +© 2007-2011, IBBoard et d'autres +WarFoundry est un outil open-source de création de l'armée qui vous permet de créer des listes pour les systèmes de jeu multiples. +Crédits +Testeurs (WarFoundry général): +Testeurs (interface utilisateur): +Fermer +Catégories de l'armée +Remplacer l'équipement pour unité