2009-05-03 Mike Kestner <mkestner@novell.com>

* glib/Object.cs: revert to old LookupType behavior when Handle is
	not set.  [Fixes #500417]

svn path=/trunk/gtk-sharp/; revision=133451
This commit is contained in:
Mike Kestner 2009-05-03 22:49:12 +00:00
parent 983fb81a96
commit f11bd79000
2 changed files with 13 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2009-05-03 Mike Kestner <mkestner@novell.com>
* glib/Object.cs: revert to old LookupType behavior when Handle is
not set. [Fixes #500417]
2009-05-03 Stephane Delcroix <sdelcroix@novell.com>
* glib/Idle.cs:
@ -32,7 +37,7 @@
* gtk/Widget.custom: Implement signal registration for the
Activate, SettScrollAdjustments and key binding signals
in managed code.
in managed code.
2009-04-25 Mike Kestner <mkestner@novell.com>

View file

@ -323,9 +323,13 @@ namespace GLib {
protected GType LookupGType ()
{
GTypeInstance obj = (GTypeInstance) Marshal.PtrToStructure (Handle, typeof (GTypeInstance));
GTypeClass klass = (GTypeClass) Marshal.PtrToStructure (obj.g_class, typeof (GTypeClass));
return new GLib.GType (klass.gtype);
if (Handle != IntPtr.Zero) {
GTypeInstance obj = (GTypeInstance) Marshal.PtrToStructure (Handle, typeof (GTypeInstance));
GTypeClass klass = (GTypeClass) Marshal.PtrToStructure (obj.g_class, typeof (GTypeClass));
return new GLib.GType (klass.gtype);
} else {
return LookupGType (GetType ());
}
}
protected internal static GType LookupGType (System.Type t)