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 743068 - embed-prefs: properly update spell check langs when changed
embed-prefs: properly update spell check langs when changed
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-17 00:03 UTC by Michael Catanzaro
Modified: 2015-02-03 15:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
embed-prefs: properly update spell check langs when changed (3.55 KB, patch)
2015-01-17 00:03 UTC, Michael Catanzaro
committed Details | Review
embed-prefs: properly update spell check langs when changed (3.83 KB, patch)
2015-02-03 15:37 UTC, Michael Catanzaro
none Details | Review

Description Michael Catanzaro 2015-01-17 00:03:53 UTC
When the list of languages is changed, don't forget to update the list
of languages for which spell checking is enabled. Otherwise, spell
checking for the newly-selected language(s) won't work until the browser
is restarted.
Comment 1 Michael Catanzaro 2015-01-17 00:03:55 UTC
Created attachment 294716 [details] [review]
embed-prefs: properly update spell check langs when changed

When the list of languages is changed, don't forget to update the list
of languages for which spell checking is enabled. Otherwise, spell
checking for the newly-selected language(s) won't work until the browser
is restarted.
Comment 2 Carlos Garcia Campos 2015-02-03 12:13:04 UTC
Review of attachment 294716 [details] [review]:

Cool!

::: embed/ephy-embed-prefs.c
@@ +367,3 @@
+
+  if (g_settings_get_boolean (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_ENABLE_SPELL_CHECKING))
+  {

Please, move this { to the previous line.

@@ +370,3 @@
+    char **normalized = normalize_languages ((char **)array->data);
+    webkit_web_context_set_spell_checking_languages (web_context, (const char * const *)normalized);
+    g_strfreev (normalized);

We could probably add a helper function set_spell_checking_languages, that receives the not normalized languages.
Comment 3 Michael Catanzaro 2015-02-03 15:37:42 UTC
Created attachment 296033 [details] [review]
embed-prefs: properly update spell check langs when changed

When the list of languages is changed, don't forget to update the list
of languages for which spell checking is enabled. Otherwise, spell
checking for the newly-selected language(s) won't work until the browser
is restarted.
Comment 4 Michael Catanzaro 2015-02-03 15:51:37 UTC
Comment on attachment 296033 [details] [review]
embed-prefs: properly update spell check langs when changed

Actually having read your comment in bug #743069 regarding putting the normalize helper in ephy-langs, I will commit the original patch with just the brace fixed.
Comment 5 Michael Catanzaro 2015-02-03 15:53:16 UTC
Attachment 294716 [details] pushed as 970d984 - embed-prefs: properly update spell check langs when changed