mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-24 00:35:36 +00:00
2009-05-12 Mike Kestner <mkestner@novell.com>
* glib/Value.cs: explicit exception for unknown props. [Fixes #502043] Patch by Sebastian Dröge. svn path=/trunk/gtk-sharp/; revision=134021
This commit is contained in:
parent
bb08d67c7a
commit
bccd244a70
|
@ -1,3 +1,8 @@
|
||||||
|
2009-05-12 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* glib/Value.cs: explicit exception for unknown props.
|
||||||
|
[Fixes #502043] Patch by Sebastian Dröge.
|
||||||
|
|
||||||
2009-05-12 Mike Kestner <mkestner@novell.com>
|
2009-05-12 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* glib/ValueArray.cs: make ctor(IntPtr) public for binding usage.
|
* glib/ValueArray.cs: make ctor(IntPtr) public for binding usage.
|
||||||
|
|
|
@ -525,8 +525,13 @@ namespace GLib {
|
||||||
void InitForProperty (GType gtype, string name)
|
void InitForProperty (GType gtype, string name)
|
||||||
{
|
{
|
||||||
IntPtr p_name = Marshaller.StringToPtrGStrdup (name);
|
IntPtr p_name = Marshaller.StringToPtrGStrdup (name);
|
||||||
ParamSpec spec = new ParamSpec (g_object_class_find_property (gtype.ClassPtr, p_name));
|
IntPtr spec_ptr = g_object_class_find_property (gtype.ClassPtr, p_name);
|
||||||
Marshaller.Free (p_name);
|
Marshaller.Free (p_name);
|
||||||
|
|
||||||
|
if (spec_ptr == IntPtr.Zero)
|
||||||
|
throw new Exception (String.Format ("No property with name '{0}' in type '{1}'", name, gtype.ToString()));
|
||||||
|
|
||||||
|
ParamSpec spec = new ParamSpec (spec_ptr);
|
||||||
g_value_init (ref this, spec.ValueType.Val);
|
g_value_init (ref this, spec.ValueType.Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue