summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
authorDiogo Sousa <diogogsousa@gmail.com>2013-05-24 00:01:25 +0100
committerDiogo Sousa <diogogsousa@gmail.com>2013-05-24 00:01:25 +0100
commitfaa53a5335d2536afc33c1082bf7a946061740e1 (patch)
treed4a9b2b9a3185fbe9c5c3dc4b2c264ec8a59806f /src/fe-gtk
parent44a88fc1ab604de35f5319eedac73c7211db992f (diff)
Spell check dictionaries were not being updated when changed.
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/setup.c1
-rw-r--r--src/fe-gtk/sexy-spell-entry.c13
-rw-r--r--src/fe-gtk/sexy-spell-entry.h1
3 files changed, 15 insertions, 0 deletions
diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c
index a47fce12..19d2ee5a 100644
--- a/src/fe-gtk/setup.c
+++ b/src/fe-gtk/setup.c
@@ -2013,6 +2013,7 @@ setup_apply_to_sess (session_gui *gui)
 #endif
 
 #ifdef USE_LIBSEXY
+	sexy_spell_entry_update_languages ((SexySpellEntry *)gui->input_box);
 	sexy_spell_entry_set_checked ((SexySpellEntry *)gui->input_box, prefs.hex_gui_input_spell);
 #endif
 }
diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c
index 2d83fb86..b1b1cbb7 100644
--- a/src/fe-gtk/sexy-spell-entry.c
+++ b/src/fe-gtk/sexy-spell-entry.c
@@ -943,6 +943,19 @@ enchant_has_lang(const gchar *lang, GSList *langs) {
 #endif
 
 /**
+ * sexy_spell_entry_update_languages:
+ * @entry: A #SexySpellEntry.
+ *
+ * Update active languages.
+ */
+void
+sexy_spell_entry_update_languages (SexySpellEntry *entry)
+{
+	sexy_spell_entry_deactivate_language(entry,NULL);
+	sexy_spell_entry_activate_default_languages(entry);
+}
+
+/**
  * sexy_spell_entry_activate_default_languages:
  * @entry: A #SexySpellEntry.
  *
diff --git a/src/fe-gtk/sexy-spell-entry.h b/src/fe-gtk/sexy-spell-entry.h
index 1c761235..1c38efa4 100644
--- a/src/fe-gtk/sexy-spell-entry.h
+++ b/src/fe-gtk/sexy-spell-entry.h
@@ -78,6 +78,7 @@ GSList    *sexy_spell_entry_get_active_languages(SexySpellEntry *entry);
 gboolean   sexy_spell_entry_is_checked(SexySpellEntry *entry);
 void       sexy_spell_entry_set_checked(SexySpellEntry *entry, gboolean checked);
 void       sexy_spell_entry_activate_default_languages(SexySpellEntry *entry);
+void       sexy_spell_entry_update_languages(SexySpellEntry *entry);
 
 G_END_DECLS