-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
glib: install interfaces earlier, override properties in class_init
GObject upstream has started disabling support for installing interfaces in GTypes after they have already been initialized (class_init) [1], so we need to add GInterfaces a bit earlier (*before* class_init starts). As GLib.Object.OverrideProperty() cannot to be called before class_init (because it receives a GObjectClass, not a GType) or after (because otherwise class_init would complain about properties of an interface not being defined), then we need to call it during class_init. [1] http://bugzilla.gnome.org/687659 A good side-effect of this fix is that we no longer use the hacky uint field 'idx' to track the properties count for each class; now it gets moved to the ClassInitializer class, and thus can be non-static, which makes a bit more sense (we leave the old OverrideProperty overload for backwards compatibility). Simplest way to test this is launching the sample/treemodeldemo.exe and sample/custom-scrollable.exe in Ubuntu 13.04 beta (which has GLib 2.36). Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=11510
- Loading branch information
Showing
3 changed files
with
142 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters