gboolean cooperative_instances;
gboolean enable_console_to_stdout;
gboolean javascript_disabled;
+ gboolean spellcheck_disabled;
gchar *download_dir;
gchar *fifo_suffix;
gchar *history_file;
gchar *home_uri;
gchar *search_engine;
+ gchar *spellcheck_language;
gchar *user_agent;
gdouble global_zoom;
gint tab_width_chars;
cfg.tab_width_chars = (cfg.tab_width_chars) ? cfg.tab_width_chars : 20;
cfg.global_zoom = g_key_file_get_double(config, "ui", "zoom_level", NULL);
cfg.global_zoom = (cfg.global_zoom) ? cfg.global_zoom : 1.0;
- cfg.search_engine = g_key_file_get_string(config, "ui", "search_engine", NULL);
+ cfg.search_engine = g_key_file_get_string(config, "ui", "search_engine",
+ NULL);
cfg.search_engine = (cfg.search_engine) ? cfg.search_engine :
"https://duckduckgo.com?q=";
+ cfg.spellcheck_disabled = g_key_file_get_boolean(config, "ui",
+ "spellcheck_disabled", NULL);
+ cfg.spellcheck_language = g_key_file_get_string(config, "ui",
+ "spellcheck_language",
+ NULL);
+ cfg.spellcheck_language = (cfg.spellcheck_language) ? cfg.spellcheck_language
+ : "en_US";
}
void
"cookies.db",
NULL),
WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE);
+
+ const gchar * const languages[2] = {(const gchar *)cfg.spellcheck_language,
+ NULL};
+ webkit_web_context_set_spell_checking_languages(wc, languages);
+ webkit_web_context_set_spell_checking_enabled(wc, !cfg.spellcheck_disabled);
}
void