Add constructor dispatching based on keyword arguments
Submitted by Thierry Vignaud
Link to original bug (#721226)
Description
Created attachment 265016 python-gi regression reproducer
There's a regression when going from pygtk to gobject: creating a Gtk.Plug no longer works:
$ python /tmp/reproducer.py
File "/tmp/reproducer.py", line 2, in <module>
p = Gtk.Plug(123)
File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line
442, in init
traceback.print_stack()
/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py:447: Warning:
value "((GtkWindowType) 123)" of type 'GtkWindowType' is invalid or
out of range for property 'type' of type 'GtkWindowType'
Gtk.Window.init(self, type=type, **kwds)
See https://bugs.mageia.org/show_bug.cgi?id=11546
This breaks Mageia Linux: we patched years ago system-config-printer to use a Gtk.Plug instead of a Gtk.Window when embedded in our Control Center. This no longer works since it has been ported to gtk3
/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py:445: Warning: value "((GtkWindowType) 56640845)" of type 'GtkWindowType' is invalid or out of range for property 'type' of type 'GtkWindowType' Gtk.Window.init(self, type=type, **kwds)
See https://bugs.mageia.org/show_bug.cgi?id=11541
I've workarounded this by explicitely calling the .new() method but this isn't pythonish... See http://svnweb.mageia.org/packages/cauldron/system-config-printer/current/SOURCES/system-config-printer-1.4.2-mga_custom-embedded_window.patch?r1=547330&r2=547337&sortby=date
Can you add an override for Plug in gobject?
Thanks
Attachment 265016, "python-gi regression reproducer":
reproducer.py