Bug 675504

Summary: Need Gtk-3-aware GtkSpell lib
Product: [Fedora] Fedora Reporter: Peter Bloomfield <peterbloomfield>
Component: gtkspellAssignee: Matthew Barnes <mbarnes>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: ajacoutot, dwayne, jbicha, kalevlember, manisandro, mbarnes, otsaloma, pawsa, pf.rhlists, pkovar, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://sourceforge.net/tracker/index.php?func=detail&aid=3298132&group_id=7896&atid=107896
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-09 20:01:28 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
Patch to use GtkSpell with Gtk-3
patch none

Description Peter Bloomfield 2011-02-05 21:55:23 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

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

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?
Comment 1 Peter Bloomfield 2011-04-18 19:28:57 EDT
Comment 2 Paul Franklin (RHlists) 2011-04-29 15:24:40 EDT
I also would like to see this.

An application I like can't convert to GTK-3
without this or something like this happening.

Comment 3 Pawel Salek 2011-06-13 16:09:55 EDT
The patch is trivial - what blocks it?? Any good reason not to use gtkspell against gtk3?
Comment 4 Peter Bloomfield 2011-06-13 21:47:41 EDT
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.
Comment 5 Tom "spot" Callaway 2011-07-26 15:22:56 EDT
Gwibber is going to need this too in F-16.
Comment 6 Peter Bloomfield 2011-07-26 18:54:41 EDT
The upstream bug has a couple of solutions.  A mailing list thread [1] has some discussion that suggests some interest on the part of the developers in providing an appropriate tarball, but no action at this point.

[1] https://sourceforge.net/mailarchive/forum.php?thread_name=1311641482.15585.2%40t43.bellsouth.net&forum_name=gtkspell-devel
Comment 7 Jeremy Bicha 2011-07-30 03:34:30 EDT
Can we get GObject Introspection for this too? I'd like to use this with Python.
Comment 8 Peter Bloomfield 2011-12-06 18:32:26 EST
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...
Comment 9 Sandro Mani 2012-01-01 16:46:57 EST
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
Comment 10 Peter Bloomfield 2012-01-02 10:13:32 EST
(In reply to comment #9)
> Any feedback welcome, I've also notified the upstream maintainer here:
> https://sourceforge.net/tracker/?func=detail&aid=3298132&group_id=7896&atid=107896

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!
Comment 11 Sandro Mani 2012-01-02 11:17:58 EST
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.
Comment 12 Kalev Lember 2012-11-15 08:50:29 EST
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!
Comment 13 Sandro Mani 2013-02-09 20:01:28 EST
Guess we can finally close this one.