Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
comparison FrmNewArmy.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 | 9515b57ba752 |
children | 3b4863c61db8 |
comparison
equal
deleted
inserted
replaced
95:ea4069bbe6e9 | 96:b4416ca69153 |
---|---|
34 raceColumn.Title = Translation.GetTranslation("frmNewArmyRaceColumn", "race"); | 34 raceColumn.Title = Translation.GetTranslation("frmNewArmyRaceColumn", "race"); |
35 CellRendererText raceCell = new CellRendererText(); | 35 CellRendererText raceCell = new CellRendererText(); |
36 raceColumn.PackStart(raceCell, true); | 36 raceColumn.PackStart(raceCell, true); |
37 lstRaces.AppendColumn(raceColumn); | 37 lstRaces.AppendColumn(raceColumn); |
38 raceColumn.SetCellDataFunc(raceCell, GtkWarFoundryUtil.RenderWarFoundryObjectName); | 38 raceColumn.SetCellDataFunc(raceCell, GtkWarFoundryUtil.RenderWarFoundryObjectName); |
39 Translate(); | |
40 | 39 |
41 if (gameSystem != null) | 40 if (gameSystem != null) |
42 { | 41 { |
43 ComboBoxUtils.SelectItem(systemCombo, gameSystem); | 42 ComboBoxUtils.SelectItem(systemCombo, gameSystem); |
44 } | 43 } |
45 else if (gameSystems.Length == 1) | 44 else if (gameSystems.Length == 1) |
46 { | 45 { |
47 ComboBoxUtils.SelectIndex(systemCombo, 0); | 46 ComboBoxUtils.SelectIndex(systemCombo, 0); |
48 } | 47 } |
48 | |
49 Translation.TranslationChanged += Retranslate; | |
50 Translate(); | |
51 } | |
52 | |
53 private void Retranslate() | |
54 { | |
55 Translate(); | |
56 } | |
57 | |
58 public override void Dispose() | |
59 { | |
60 Translation.TranslationChanged -= Retranslate; | |
61 base.Dispose(); | |
49 } | 62 } |
50 | 63 |
51 protected override void Translate() | 64 protected override void Translate() |
52 { | 65 { |
53 base.Translate(); | 66 base.Translate(); |