aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-preferences.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-08-09 17:10:10 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-08-09 17:10:10 +0800
commit19be685ee72af7024847e6db5eb503a42bab9093 (patch)
tree39a2934c2876777a8d705dcd902a19558207d9f6 /libempathy-gtk/empathy-preferences.c
parentf3e2223b3f21016a97ccef01fbb8ccdacf39ff8f (diff)
downloadgsoc2013-empathy-19be685ee72af7024847e6db5eb503a42bab9093.tar
gsoc2013-empathy-19be685ee72af7024847e6db5eb503a42bab9093.tar.gz
gsoc2013-empathy-19be685ee72af7024847e6db5eb503a42bab9093.tar.bz2
gsoc2013-empathy-19be685ee72af7024847e6db5eb503a42bab9093.tar.lz
gsoc2013-empathy-19be685ee72af7024847e6db5eb503a42bab9093.tar.xz
gsoc2013-empathy-19be685ee72af7024847e6db5eb503a42bab9093.tar.zst
gsoc2013-empathy-19be685ee72af7024847e6db5eb503a42bab9093.zip
Useless spell checker option. Fixes bug #459164 (Cosimo Cecchi).
2007-08-09 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/empathy-preferences.c: * libempathy-gtk/empathy-preferences.glade: Useless spell checker option. Fixes bug #459164 (Cosimo Cecchi). svn path=/trunk/; revision=238
Diffstat (limited to 'libempathy-gtk/empathy-preferences.c')
-rw-r--r--libempathy-gtk/empathy-preferences.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/libempathy-gtk/empathy-preferences.c b/libempathy-gtk/empathy-preferences.c
index 024d5137d..a8b52954d 100644
--- a/libempathy-gtk/empathy-preferences.c
+++ b/libempathy-gtk/empathy-preferences.c
@@ -59,7 +59,6 @@ typedef struct {
GtkWidget *checkbutton_popups_when_available;
GtkWidget *treeview_spell_checker;
- GtkWidget *checkbutton_spell_checker;
GList *notify_ids;
} EmpathyPreferences;
@@ -198,13 +197,6 @@ preferences_setup_widgets (EmpathyPreferences *preferences)
EMPATHY_PREFS_CHAT_THEME_CHAT_ROOM,
preferences->checkbutton_theme_chat_room);
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_CHAT_SPELL_CHECKER_ENABLED,
- preferences->checkbutton_spell_checker);
- preferences_hookup_sensitivity (preferences,
- EMPATHY_PREFS_CHAT_SPELL_CHECKER_ENABLED,
- preferences->treeview_spell_checker);
-
preferences_hookup_radio_button (preferences,
EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM,
preferences->radiobutton_contact_list_sort_by_name);
@@ -275,6 +267,14 @@ preferences_languages_add (EmpathyPreferences *preferences)
store = GTK_LIST_STORE (gtk_tree_view_get_model (view));
codes = empathy_spell_get_language_codes ();
+
+ empathy_conf_set_bool (empathy_conf_get(),
+ EMPATHY_PREFS_CHAT_SPELL_CHECKER_ENABLED,
+ codes != NULL);
+ if (!codes) {
+ gtk_widget_set_sensitive (preferences->treeview_spell_checker, FALSE);
+ }
+
for (l = codes; l; l = l->next) {
GtkTreeIter iter;
const gchar *code;
@@ -311,14 +311,14 @@ preferences_languages_save (EmpathyPreferences *preferences)
(GtkTreeModelForeachFunc) preferences_languages_save_foreach,
&languages);
- if (!languages) {
- /* Default to english */
- languages = g_strdup ("en");
- }
+ /* if user selects no languages, we don't want spell check */
+ empathy_conf_set_bool (empathy_conf_get (),
+ EMPATHY_PREFS_CHAT_SPELL_CHECKER_ENABLED,
+ languages != NULL);
empathy_conf_set_string (empathy_conf_get (),
EMPATHY_PREFS_CHAT_SPELL_CHECKER_LANGUAGES,
- languages);
+ languages ? languages : "");
g_free (languages);
}
@@ -946,7 +946,6 @@ empathy_preferences_show (GtkWindow *parent)
"checkbutton_sounds_when_away", &preferences->checkbutton_sounds_when_away,
"checkbutton_popups_when_available", &preferences->checkbutton_popups_when_available,
"treeview_spell_checker", &preferences->treeview_spell_checker,
- "checkbutton_spell_checker", &preferences->checkbutton_spell_checker,
NULL);
empathy_glade_connect (glade,