From 26362ced6498c43b6718aadf300c6edfd6f2a399 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Tue, 5 May 2009 15:15:46 +0000 Subject: [PATCH] 2009-05-05 Mike Kestner * glib/GType.cs: ensure threading is initialized in cctor. * gtk/Application.cs: ditto. svn path=/trunk/gtk-sharp/; revision=133585 --- ChangeLog | 5 +++++ glib/GType.cs | 3 +++ gtk/Application.cs | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index d0774cc21..8ceef04a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-05-05 Mike Kestner + + * glib/GType.cs: ensure threading is initialized in cctor. + * gtk/Application.cs: ditto. + 2009-05-04 Christian Hoff * generator/ClassField.cs: Derive from StructField. diff --git a/glib/GType.cs b/glib/GType.cs index 48ecf020b..94471e8aa 100755 --- a/glib/GType.cs +++ b/glib/GType.cs @@ -99,6 +99,9 @@ namespace GLib { static GType () { + if (!GLib.Thread.Supported) + GLib.Thread.Init (); + g_type_init (); Register (GType.Char, typeof (sbyte)); diff --git a/gtk/Application.cs b/gtk/Application.cs index 46bb93244..58c31f4b2 100755 --- a/gtk/Application.cs +++ b/gtk/Application.cs @@ -33,6 +33,12 @@ namespace Gtk { { } + static Application () + { + if (!GLib.Thread.Supported) + GLib.Thread.Init (); + } + [DllImport("libgtk-win32-2.0-0.dll")] static extern void gtk_init (ref int argc, ref IntPtr argv);