From bf6b4299e51763ee2682389a38a2be3e7589077b Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Tue, 12 May 2009 23:05:37 +0000 Subject: [PATCH] 2009-05-12 Mike Kestner * gtk/Application.cs: add the theme initialization workaround for windows. Hopefully we can find a better solution that doesn't involve loading SWF. [Fixes #471682] svn path=/trunk/gtk-sharp/; revision=134008 --- ChangeLog | 6 ++++++ gtk/Application.cs | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index f867de3c2..552cb15f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-05-12 Mike Kestner + + * gtk/Application.cs: add the theme initialization workaround for + windows. Hopefully we can find a better solution that doesn't + involve loading SWF. [Fixes #471682] + 2009-05-06 Mike Kestner * gtk/RadioMenuItem.custom: implement subclassing for group/label diff --git a/gtk/Application.cs b/gtk/Application.cs index 58c31f4b2..495ce64ec 100755 --- a/gtk/Application.cs +++ b/gtk/Application.cs @@ -21,6 +21,7 @@ namespace Gtk { using System; + using System.Reflection; using System.Runtime.InteropServices; using Gdk; @@ -37,6 +38,20 @@ namespace Gtk { { if (!GLib.Thread.Supported) GLib.Thread.Init (); + + switch (Environment.OSVersion.Platform) { + case PlatformID.Win32NT: + case PlatformID.Win32S: + case PlatformID.Win32Windows: + case PlatformID.WinCE: + Assembly assm = Assembly.Load ("System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); + Type swfapp = assm.GetType ("System.Windows.Forms.Application"); + MethodInfo method = swfapp.GetMethod ("DoEvents", BindingFlags.Public | BindingFlags.Static); + method.Invoke (null, null); + break; + default: + break; + } } [DllImport("libgtk-win32-2.0-0.dll")]