[webkit-gtk] API for spell check dictionary detection
Carlos Garcia Campos
cgarcia at igalia.com
Tue Jan 20 02:05:59 PST 2015
El lun, 19-01-2015 a las 18:58 -0600, Michael Catanzaro escribió:
> On Mon, Jan 19, 2015 at 4:27 PM, Martin Robinson
> <mrobinson at webkit.org> wrote:
> > I think in this case, it makes sense for Epiphany to simply use
> > Enchant to look for missing dictionaries. Installation of spelling
> > dictionaries just seems out of scope for WebKit itself. --Martin
>
> I'm not sure I agree that it's out of scope for WebKit. Installation
> of dictionaries is required to use the spell check feature, which is
> already exposed in the API, so I think a desktop application would be
> wrong to enable spell checking without providing some way to install
> dictionaries (preferably automatically). In GNOME world, this is a
> problem for Epiphany, Empathy, and Evolution, so I'm inclined to push
> as much of this into WebKit as possible, so that other apps can make
> use of it too, and leave just the UI to applications.
I think applications should only allow to set languages that are
supported, and I agree that enchant is an implementation detail, so
having a method to return the list of available languages, would allow
applications to build a languages dialog with only the supported
languages. The apps are free to allow the user to install new
dictionaries to make more languages available.
>
> But if this is out of scope for WebKit, then I don't mind implementing
> it in Epiphany instead. It's awkward for apps to use Enchant directly,
> since that should be an implementation detail of WebKit, but
> dictionaries are also supposed to be an implementation detail, so
> using Enchant is not any worse than
> webkit_web_context_get_available_spell_checking_languages() would be.
> In this case, I would just want to add documentation to
> webkit_web_context_set_spell_checking_languages() to explain that the
> app is responsible for dictionary installation.
I prefer if the applications do the installation thing, but I see the
point of making that available for all apps for free by doing it in
WebKit. And I guess it wouldn't add any dependency because we would use
DBus to talk to PackageKit. But if we end up doing in in WebKit, I
wonder if we really need new API for that. Couldn't we check the
languages when they are set and talk to PackageKit for the ones not
available?
>
> (You have definitely convinced me that my original proposal,
> webkit_web_context_get_available_spell_checking_languages(), is not a
> good idea -- at least not on its own.)
Why?
>
> Cheers,
>
>
> Michael
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-gtk
--
Carlos Garcia Campos
http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20150120/22c22a6a/attachment.sig>
More information about the webkit-gtk
mailing list