Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
comparison FrmNewArmy.cs @ 85:bfb29a60b802
Re #308: Make GTK# UI translatable
* Translate the bits of FrmNewArmy that can't be translated via cascade
* Set up label names and translations for translating (need to get Stetic to use TranslatableLabel)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 29 Dec 2010 16:56:55 +0000 |
parents | 9db2112b31d7 |
children | 9515b57ba752 |
comparison
equal
deleted
inserted
replaced
84:9db2112b31d7 | 85:bfb29a60b802 |
---|---|
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 ControlTranslator.TranslateWidget(this); | 39 Translate(); |
40 | 40 |
41 if (gameSystem != null) | 41 if (gameSystem != null) |
42 { | 42 { |
43 ComboBoxUtils.SelectItem(systemCombo, gameSystem); | 43 ComboBoxUtils.SelectItem(systemCombo, gameSystem); |
44 } | 44 } |
45 else if (gameSystems.Length == 1) | 45 else if (gameSystems.Length == 1) |
46 { | 46 { |
47 ComboBoxUtils.SelectIndex(systemCombo, 0); | 47 ComboBoxUtils.SelectIndex(systemCombo, 0); |
48 } | 48 } |
49 } | |
50 | |
51 protected override void Translate() | |
52 { | |
53 base.Translate(); | |
54 bttnCreate.Label = Translation.GetTranslation("bttnCreate", "create"); | |
55 bttnCancel.Label = Translation.GetTranslation("bttnCancel", "cancel"); | |
49 } | 56 } |
50 | 57 |
51 protected virtual void OnSelectionChanged(object o, EventArgs e) | 58 protected virtual void OnSelectionChanged(object o, EventArgs e) |
52 { | 59 { |
53 logger.Debug("Race selection changed"); | 60 logger.Debug("Race selection changed"); |