changeset 19:2ddde7f1730e

Re #47: Add translatable GTK# widgets * Add translatable window * Remove debug WriteLine
author IBBoard <dev@ibboard.co.uk>
date Mon, 27 Dec 2010 20:19:36 +0000
parents 9b3c4fd0b191
children 06715f517af6
files IBBoard.GtkSharp.csproj Translatable/ControlTranslator.cs Translatable/TranslatableWindow.cs
diffstat 3 files changed, 42 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/IBBoard.GtkSharp.csproj	Sat Dec 18 15:53:01 2010 +0000
+++ b/IBBoard.GtkSharp.csproj	Mon Dec 27 20:19:36 2010 +0000
@@ -35,6 +35,7 @@
     <Compile Include="ComboBoxUtils.cs" />
     <Compile Include="Translatable\TranslatableDialog.cs" />
     <Compile Include="Translatable\ControlTranslator.cs" />
+    <Compile Include="Translatable\TranslatableWindow.cs" />
   </ItemGroup>
   <ItemGroup>
     <None Include="COPYING.GPL" />
--- a/Translatable/ControlTranslator.cs	Sat Dec 18 15:53:01 2010 +0000
+++ b/Translatable/ControlTranslator.cs	Mon Dec 27 20:19:36 2010 +0000
@@ -36,7 +36,6 @@
 		{
 			foreach (Widget childWidget in container.AllChildren)
 			{
-				//System.Console.WriteLine(childWidget);
 				TranslateWidget(childWidget, cascade);
 			}
 		}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Translatable/TranslatableWindow.cs	Mon Dec 27 20:19:36 2010 +0000
@@ -0,0 +1,41 @@
+//  This file (TranslatableWindow.cs) is a part of the IBBoard.GtkSharp project and is copyright 2010 IBBoard
+// 
+// // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL 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 Gtk;
+using IBBoard.Lang;
+
+namespace IBBoard.GtkSharp.Translatable
+{
+	public abstract class TranslatableWindow : Window, ITranslatable
+	{
+		public TranslatableWindow(IntPtr ptr) : base(ptr)
+		{
+			//Do nothing extra
+		}
+
+		public TranslatableWindow(Gtk.WindowType windowType) : base(windowType)
+		{
+			//Do nothing extra
+		}
+
+		public TranslatableWindow(string windowTitle) : base(windowTitle)
+		{
+			//Do nothing extra
+		}
+
+		public string Text
+		{
+			get
+			{
+				return Title;
+			}
+			set
+			{
+				Title = value;
+			}
+		}
+	}
+}
+