GNOME Bugzilla – Bug 626220
Migrate from PyGTK to PyGObject introspection-based bindings
Last modified: 2012-05-23 19:06:04 UTC
Grep'ing for pygtk-2.0 it seems that this module uses the stable bindings provided by PyGTK. As it is unlikely that anybody will continue maintaining these stable bindings, applications using PyGTK should be ported to using the dynamic Python bindings provided by PyGObject (now that PyGI has been merged into PyGObject). The feedback on migration provided by application maintainers will also help PyGObject to improve its dynamic bindings. Please see http://live.gnome.org/GnomeGoals/PythonIntrospectionPorting for more information and guidelines. For help there is a mailing list at http://www.daa.com.au/mailman/listinfo/pygtk . For getting involved in the development of pygobject there is a mailing list at http://mail.gnome.org/mailman/listinfo/python-hackers-list . There is also the #python IRC channel on irc.gimp.net. ./alacarte/configure.ac: import pygtk; pygtk.require('2.0')
[Removing 3.0 target as this is not a hard blocker, but a nice to have]
Created attachment 192588 [details] [review] Basic patch Alacarte runs with gtk3/pygi. configure needs a load of changes (it currently fails on libgnome-menu) for looking for pygobject. And I had to break drag and drop. (it complains about a function having 4 arguments and requiring 5, add a 5th and it complains about having 5 and wanting 4...). But its a start.
Treeview arguments problem was fixed in bug 649979. drag_source should have Gdk.ModifierType.BUTTON1_MASK as first argument. I've committed your initial patch and a fix for the arguments.
gmenu now also has gobject introspection. Additional patch appreciated :)
Ok, with the introspection change and all the patches I applied, Alacarte is really buggy atm. Help needed :) I'd like to make a release before the next GNOME. Scheduled for next Monday 23:59 UTC.
Created attachment 195935 [details] [review] Patch to change configure a little At the moment in git it still looks for pygtk and pygobject2. This patch sort of fixes it, but probably needs cleaning up. I've never tried to use autotools before. I went away for the summer just after sending the first patch, I'm back and vaguely trying to work on this now.
gmenu introspection port is rather tricky. a lot of api that is used in alacarte has been removed (get_type, get_contents etc). Might require a lot of logic being rewritten.
i started on this a while back but never finished, i'll post my in progress patch.
Created attachment 202408 [details] [review] port to latest gmenu / introspection
*** Bug 657512 has been marked as a duplicate of this bug. ***
I don't remember exactly where i left it. I think it was either a bit crashy happy or maybe certain features didn't work entirely.
The get_separator() function introduced by the patch is missing on Fedora 16. I had to replace it with a hack (returning the string 'separator'). With that hack, alacarte starts, but the problems are more than obvious. Icons for existing items are not loaded. No new items can be created. There are many warnings on the console. Second attempt to create a "New Menu" crashes the program.
Comment on attachment 202408 [details] [review] port to latest gmenu / introspection marking needs-work to make it clear the patch isn't ready as-is.
Pushed. There will be bugs with the new alacarte. Report them as new bugs.