aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--ChangeLog6
-rw-r--r--libempathy-gtk/empathy-preferences.c27
-rw-r--r--libempathy-gtk/empathy-preferences.glade66
3 files changed, 22 insertions, 77 deletions
diff --git a/ChangeLog b/ChangeLog
index 38875da61..69683489d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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).
+
2007-08-08 Xavier Claessens <xclaesse@gmail.com>
* autogen.sh: Requier automake 1.9. Fixes bug #464822 (Cosimo Cecchi).
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,
diff --git a/libempathy-gtk/empathy-preferences.glade b/libempathy-gtk/empathy-preferences.glade
index c5cd51470..73cb66d5f 100644
--- a/libempathy-gtk/empathy-preferences.glade
+++ b/libempathy-gtk/empathy-preferences.glade
@@ -253,6 +253,7 @@
<property name="fill">False</property>
</packing>
</child>
+
<child>
<widget class="GtkFrame" id="frame13">
<property name="visible">True</property>
@@ -745,7 +746,7 @@
<child>
<widget class="GtkLabel" id="label615">
<property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Languages&lt;/b&gt;</property>
+ <property name="label" translatable="yes">&lt;b&gt;Enable spell checking for languages:&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -773,68 +774,7 @@
</child>
<child>
- <widget class="GtkFrame" id="frame8">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment16">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">6</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkCheckButton" id="checkbutton_spell_checker">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Enable spell checking</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label617">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Options&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
+ <placeholder/>
</child>
</widget>
<packing>