labyrinth-team / labyrinth

Labyrinth is a lightweight mind-mapping tool (and looking for maintainers)
GNU General Public License v2.0
97 stars 32 forks source link

Migrate to python-gi #1

Open takluyver opened 11 years ago

takluyver commented 11 years ago

This issue is to track the migration to the gobject-introspect bindings, which replace the deprecated pygtk bindings.

The current state of the effort is in a gtk3 branch: https://github.com/labyrinth-team/labyrinth/tree/gtk3

takluyver commented 11 years ago

My first attempt at porting got stuck on some parts of pango that aren't yet exposed through the bindings - specifically, the means to create and combine Pango 'attributes', which represent a font style option (such as bold) together with the span of text to which it should be applied.

This code in Pitivi works around something similar, and I exchanged emails with the author of that bit, Matas Brazdeikis. But I couldn't get it working within Labyrinth.

Potential ways out:

takluyver commented 4 years ago

The GObject introspection interface to Pango has improved somewhat, and I was able to get a bit further. I also started making it Python 3 compatible, because that was easier than getting the bindings set up on Python 2 again.

However, I'm stuck - for now - on another limitation of the Pango introspection API: https://gitlab.gnome.org/GNOME/pango/-/issues/476 . Specifically, it fails on a line like this:

https://github.com/labyrinth-team/labyrinth/blob/e27b1527127846ac96f87562a1217b282aa7e8d9/labyrinth/TextThought.py#L194