After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626220 - Migrate from PyGTK to PyGObject introspection-based bindings
Migrate from PyGTK to PyGObject introspection-based bindings
Status: RESOLVED FIXED
Product: alacarte
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Alacarte Maintainer(s)
Alacarte Maintainer(s)
: 657512 (view as bug list)
Depends on: 649979
Blocks: 626218
 
 
Reported: 2010-08-06 16:23 UTC by André Klapper
Modified: 2012-05-23 19:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.31/2.32


Attachments
Basic patch (13.23 KB, patch)
2011-07-24 22:17 UTC, Alex Anthony
committed Details | Review
Patch to change configure a little (2.17 KB, patch)
2011-09-07 21:02 UTC, Alex Anthony
none Details | Review
port to latest gmenu / introspection (28.06 KB, patch)
2011-11-29 22:47 UTC, Ray Strode [halfline]
needs-work Details | Review

Description André Klapper 2010-08-06 16:23:07 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')
Comment 1 André Klapper 2011-01-17 21:03:46 UTC
[Removing 3.0 target as this is not a hard blocker, but a nice to have]
Comment 2 Alex Anthony 2011-07-24 22:17:50 UTC
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.
Comment 3 Olav Vitters 2011-08-21 16:08:44 UTC
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.
Comment 4 Olav Vitters 2011-08-21 19:15:15 UTC
gmenu now also has gobject introspection. Additional patch appreciated :)
Comment 5 Olav Vitters 2011-08-23 21:20:59 UTC
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.
Comment 6 Alex Anthony 2011-09-07 21:02:04 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.
Comment 7 Alex Anthony 2011-09-12 22:36:27 UTC
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.
Comment 8 Ray Strode [halfline] 2011-11-29 22:46:48 UTC
i started on this a while back but never finished, i'll post my in progress patch.
Comment 9 Ray Strode [halfline] 2011-11-29 22:47:41 UTC
Created attachment 202408 [details] [review]
port to latest gmenu / introspection
Comment 10 Ray Strode [halfline] 2011-11-29 22:48:56 UTC
*** Bug 657512 has been marked as a duplicate of this bug. ***
Comment 11 Ray Strode [halfline] 2011-11-29 22:50:25 UTC
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.
Comment 12 Pavel Roskin 2011-12-28 02:41:14 UTC
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 13 Ray Strode [halfline] 2012-01-04 14:45:35 UTC
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.
Comment 14 Jasper St. Pierre (not reading bugmail) 2012-05-23 19:06:04 UTC
Pushed. There will be bugs with the new alacarte. Report them as new bugs.