comparison FrmAbout.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 26e4525b49cf
children
comparison
equal deleted inserted replaced
95:ea4069bbe6e9 96:b4416ca69153
3 // 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. 3 // 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.
4 4
5 using System; 5 using System;
6 using Gtk; 6 using Gtk;
7 using IBBoard.GtkSharp.Translatable; 7 using IBBoard.GtkSharp.Translatable;
8 using IBBoard.Lang;
8 9
9 namespace IBBoard.WarFoundry.GUI.GTK 10 namespace IBBoard.WarFoundry.GUI.GTK
10 { 11 {
11 public partial class FrmAbout : TranslatableDialog 12 public partial class FrmAbout : TranslatableDialog
12 { 13 {
23 } 24 }
24 25
25 private FrmAbout() 26 private FrmAbout()
26 { 27 {
27 this.Build(); 28 this.Build();
29 Translation.TranslationChanged += Retranslate;
28 Translate(); 30 Translate();
31 }
32
33 private void Retranslate()
34 {
35 Translate();
36 }
37
38 public override void Dispose()
39 {
40 Translation.TranslationChanged -= Retranslate;
41 base.Dispose();
29 } 42 }
30 43
31 protected virtual void CloseClicked(object sender, System.EventArgs e) 44 protected virtual void CloseClicked(object sender, System.EventArgs e)
32 { 45 {
33 Respond(ResponseType.Close); 46 Respond(ResponseType.Close);