changeset 24:3da8cf449717

Re #47: Add translatable GTK# widgets * Add "Translate" methods to dialog and window to make them easily translatable without having to remember the required call
author IBBoard <dev@ibboard.co.uk>
date Wed, 29 Dec 2010 16:47:46 +0000
parents ae37467335ae
children f71693260828
files Translatable/TranslatableDialog.cs Translatable/TranslatableWindow.cs
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Translatable/TranslatableDialog.cs	Tue Dec 28 20:18:46 2010 +0000
+++ b/Translatable/TranslatableDialog.cs	Wed Dec 29 16:47:46 2010 +0000
@@ -9,6 +9,11 @@
 {
 	public abstract class TranslatableDialog : Dialog, ITranslatable
 	{
+		protected virtual void Translate()
+		{
+			ControlTranslator.TranslateWidget(this);
+		}
+
 		public string Text
 		{
 			get
--- a/Translatable/TranslatableWindow.cs	Tue Dec 28 20:18:46 2010 +0000
+++ b/Translatable/TranslatableWindow.cs	Wed Dec 29 16:47:46 2010 +0000
@@ -25,6 +25,11 @@
 			//Do nothing extra
 		}
 
+		protected virtual void Translate()
+		{
+			ControlTranslator.TranslateWidget(this);
+		}
+
 		public string Text
 		{
 			get