mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
2009-05-01 Mike Kestner <mkestner@novell.com>
* glib/Object.cs: get gtype from instance data. * glib/Value.cs: use instance NativeType when initing for props. [Fixes #500157] Patch by Sebastian Dröge. svn path=/trunk/gtk-sharp/; revision=133282
This commit is contained in:
parent
9e3a996ea6
commit
a3bb0c1e31
@ -1,3 +1,9 @@
|
|||||||
|
2009-05-01 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* glib/Object.cs: get gtype from instance data.
|
||||||
|
* glib/Value.cs: use instance NativeType when initing for props.
|
||||||
|
[Fixes #500157] Patch by Sebastian Dröge.
|
||||||
|
|
||||||
2009-04-28 Mike Kestner <mkestner@novell.com>
|
2009-04-28 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* generator/Parameters.cs: ref parameter marshaling fix.
|
* generator/Parameters.cs: ref parameter marshaling fix.
|
||||||
|
@ -186,7 +186,7 @@ namespace GLib {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct GTypeClass {
|
struct GTypeClass {
|
||||||
IntPtr gtype;
|
public IntPtr gtype;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct GObjectClass {
|
struct GObjectClass {
|
||||||
@ -323,7 +323,9 @@ namespace GLib {
|
|||||||
|
|
||||||
protected GType LookupGType ()
|
protected GType LookupGType ()
|
||||||
{
|
{
|
||||||
return LookupGType (GetType ());
|
GTypeInstance obj = (GTypeInstance) Marshal.PtrToStructure (Handle, typeof (GTypeInstance));
|
||||||
|
GTypeClass klass = (GTypeClass) Marshal.PtrToStructure (obj.g_class, typeof (GTypeClass));
|
||||||
|
return new GLib.GType (klass.gtype);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected internal static GType LookupGType (System.Type t)
|
protected internal static GType LookupGType (System.Type t)
|
||||||
|
@ -518,7 +518,7 @@ namespace GLib {
|
|||||||
|
|
||||||
void InitForProperty (Object obj, string name)
|
void InitForProperty (Object obj, string name)
|
||||||
{
|
{
|
||||||
GType gtype = Object.LookupGType (obj.GetType ());
|
GType gtype = obj.NativeType;
|
||||||
InitForProperty (gtype, name);
|
InitForProperty (gtype, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user