Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions glib/Object.cs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ static void AddInterfaces (GType gtype, Type t, ref bool handlers_overridden)

if (!iface.IsAssignableFrom (t.BaseType)) {
GInterfaceInfo info = adapter.Info;
info.Data = gtype.GetClassPtr ();
info.Data = gtype.Val;
//FIXME: overiding prop is done inside the init of interface adapter
// not sure that it is the good solution but
// it is the only one I found without exception or loop
Expand Down Expand Up @@ -460,6 +460,9 @@ protected internal static GType RegisterGType (System.Type t)
GType gtype = GType.RegisterGObjectType (t);
bool is_first_subclass = gtype.GetBaseType () == gtype.GetThresholdType ();

bool handlers_overridden = is_first_subclass;
AddInterfaces (gtype, t, ref handlers_overridden);

if (is_first_subclass) {
IntPtr class_ptr = gtype.GetClassPtr ();
GObjectClass gobject_class = (GObjectClass) Marshal.PtrToStructure (class_ptr, typeof (GObjectClass));
Expand All @@ -469,11 +472,9 @@ protected internal static GType RegisterGType (System.Type t)
Marshal.StructureToPtr (gobject_class, class_ptr, false);
}
idx = 1;
bool handlers_overridden = is_first_subclass;
AddProperties (gtype, t, is_first_subclass, ref handlers_overridden);
ConnectDefaultHandlers (gtype, t);
InvokeTypeInitializers (gtype, t);
AddInterfaces (gtype, t, ref handlers_overridden);
return gtype;
}

Expand Down