GNOME Bugzilla – Bug 672158
Correct the Gtk.Window hiearchy
Last modified: 2012-03-16 09:02:00 UTC
Make sure that all Dialog subclasses are also Window subclasses, otherwise isinstance breaks. Avoid calling the constructor twice now when we actually have a Window constructor. The arguments passed to the parent are just GObject properties.
Created attachment 209848 [details] [review] Correct the Gtk.Window hiearchy
Created attachment 209861 [details] [review] Correct the Gtk.Window hiearchy We need to make sure that all Gtk.Dialog subclasses inherit from the overridden Window class. For that to be done automaticly we need to create the Window class before the Dialog class. Now when it's inherited properly we need to avoid calling the Window constructor twice as it passes in a construct-only parameter. So add **kwargs to the Window constructor to allow us to pass in any kind of GObject property to it and refactor the Dialog subclasses to pass in all properties to the same constructor. Also adds a bunch of tests to make sure that the hiearchy is correct.
Review of attachment 209861 [details] [review]: I like this new patch a lot more, not only it fixes the issue and adds tests, but it also removes workarounds for some of the overrides. I'd just suggest to add a comment near Window pointing out that the order of overrides matters
Comment on attachment 209861 [details] [review] Correct the Gtk.Window hiearchy I unfuzzed this to apply to current git head, added the comment suggested by Paolo, and fixed the typo in the changelog. Pushed now, so that make check works again. Thanks for fixing this!