Red Hat Bugzilla – Bug 675504
Need Gtk-3-aware GtkSpell lib
Last modified: 2013-02-09 20:01:28 EST
Created attachment 477263 [details]
Patch to use GtkSpell with Gtk-3
Description of problem: Current GtkSpell lib drags in Gtk-2 symbols, so a Gtk-3 app cannot link to it.
Version-Release number of selected component (if applicable): 2.0.16
Steps to Reproduce:
Additional info: I've built a custom lib using the following 2-line patch. Can we provide a Gtk-3-aware lib in a new package?
I also would like to see this.
An application I like can't convert to GTK-3
without this or something like this happening.
The patch is trivial - what blocks it?? Any good reason not to use gtkspell against gtk3?
Created attachment 504577 [details]
Here's a slightly less intrusive patch.
It adds a --enable-gtk3 configure option, instead of taking over the whole tree for Gtk3.
Gwibber is going to need this too in F-16.
The upstream bug has a couple of solutions. A mailing list thread  has some discussion that suggests some interest on the part of the developers in providing an appropriate tarball, but no action at this point.
Can we get GObject Introspection for this too? I'd like to use this with Python.
So, a test gtkspell 3.0.0+dev tarball has been available at http://pidgin.im/~datallah/gtkspell-3.0.0+dev.tar.gz since August, and seems to be impeccable. The dev shows no sign of making the promised release. What's the next step? This is getting old...
So, needing gtkspell3 to finish porting my PyGtk to Gtk3, I've worked on adding introspection annotations to the test tarball. Result is here:
Note: From what I could tell, in the previous version, Gtkspell was not actually a GObject type. For this reason, I had to perform a number of modifications to the source code, leading also to API changes. The most prominent changes are
- All functions now start with gtkspell_spell_*** instead of gtkspell_***. This is because gtkspell is now the namespace and spell the class (i.e. GtkspellSpell).
- The gtkspell_spell_new_attach function is gone, replaced by gtkspell_spell_new and gtkspell_spell_attach (which were actually deprecated functions). This is because the API allows to detach a GtkspellSpell object from a TextView without actually destroying the spell object, so it made more sense to also separate creation and attachment.
Any feedback welcome, I've also notified the upstream maintainer here: https://sourceforge.net/tracker/?func=detail&aid=3298132&group_id=7896&atid=107896
(In reply to comment #9)
> Any feedback welcome, I've also notified the upstream maintainer here:
Looks good! A couple of points:
- set_buffer should be declared static;
- I noticed that you've stripped a leading 'gtkspell' off some local symbols, but not all; having all static symbols begin with "_" might be nice;
- while you're changing things: g_signal_connect* doesn't need the instance cast to GObject.
I hope this leads to an early release!
Thanks for the feedback. I've now created a github repo here https://github.com/manisandro/gtkspell3 as was requested by the maintainer(?) in the sourceforce tracker discussion, hope a new release will pop up soon.
I have submitted a parallel installable gtkspell3 package for review at https://bugzilla.redhat.com/show_bug.cgi?id=876995
Thanks Sandro for the release!
Guess we can finally close this one.