From 91dda7f5be5de101437ca0c44bad4d8df21caffe Mon Sep 17 00:00:00 2001 From: Bertrand Lorentz Date: Sat, 3 Dec 2011 16:18:24 +0100 Subject: [PATCH] Object: Fix registration of inherited interface properties We need to add inherited interface properties in the Properties hash, so we remove the DeclaredOnly flag when looking for interface properties in the type. We also need to use the type itself as the hash key, and not the adapter type. --- glib/Object.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/glib/Object.cs b/glib/Object.cs index 0efdcc432..7750d06d4 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -422,16 +422,15 @@ namespace GLib { if (attrs.Length == 0) continue; PropertyAttribute property_attr = attrs [0]; - PropertyInfo declared_prop = t.GetProperty (p.Name, BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance); + PropertyInfo declared_prop = t.GetProperty (p.Name, BindingFlags.Public | BindingFlags.Instance); if (declared_prop == null) continue; IntPtr param_spec = FindInterfaceProperty (adapter.GType, property_attr.Name); - Type type = (Type)adapter.GType; Dictionary props; - if (!Properties.TryGetValue (type, out props)) { + if (!Properties.TryGetValue (t, out props)) { props = new Dictionary (); - Properties [type] = props; + Properties [t] = props; } props [param_spec] = declared_prop; }