aboutsummaryrefslogtreecommitdiff
path: root/src/prefs_common_dialog.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-11-17 07:12:59 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-11-17 07:12:59 +0000
commitcb0f123ef7a2d83796a648baa14e93ed00c639d6 (patch)
treeb13de4e2b471f7ec086d88f7b7ce51d5d126dbff /src/prefs_common_dialog.c
parentc21b3e1d1c8635bdeb9ead64d5616621cd2fa451 (diff)
implemented spell checking.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@754 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/prefs_common_dialog.c')
-rw-r--r--src/prefs_common_dialog.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/prefs_common_dialog.c b/src/prefs_common_dialog.c
index 46c061b5..2918ef07 100644
--- a/src/prefs_common_dialog.c
+++ b/src/prefs_common_dialog.c
@@ -207,6 +207,13 @@ static struct Other {
GtkWidget *checkbtn_warnqueued;
} other;
+#if USE_GTKSPELL
+static struct Spell {
+ GtkWidget *chkbtn_enable_spell;
+ GtkWidget *entry_spell_lang;
+} spell;
+#endif
+
static struct Advanced {
GtkWidget *checkbtn_strict_cache_check;
@@ -476,6 +483,14 @@ static PrefsUIData ui_data[] = {
/* {"logwindow_line_limit", NULL, NULL, NULL}, */
+#if USE_GTKSPELL
+ /* Spelling */
+ {"check_spell", &spell.chkbtn_enable_spell,
+ prefs_set_data_from_toggle, prefs_set_toggle},
+ {"spell_lang", &spell.entry_spell_lang,
+ prefs_set_data_from_entry, prefs_set_entry},
+#endif
+
/* Advanced */
{"strict_cache_check", &advanced.checkbtn_strict_cache_check,
prefs_set_data_from_toggle, prefs_set_toggle},
@@ -499,6 +514,9 @@ static void prefs_privacy_create (void);
#endif
static void prefs_interface_create (void);
static void prefs_other_create (void);
+#if USE_GTKSPELL
+static void prefs_spell_create (void);
+#endif
static void prefs_advanced_create (void);
static void prefs_common_set_encoding_optmenu (GtkOptionMenu *optmenu,
@@ -645,6 +663,10 @@ static void prefs_common_create(void)
SET_NOTEBOOK_LABEL(dialog.notebook, _("Interface"), page++);
prefs_other_create();
SET_NOTEBOOK_LABEL(dialog.notebook, _("Other"), page++);
+#if USE_GTKSPELL
+ prefs_spell_create();
+ SET_NOTEBOOK_LABEL(dialog.notebook, _("Spell"), page++);
+#endif
prefs_advanced_create();
SET_NOTEBOOK_LABEL(dialog.notebook, _("Advanced"), page++);
@@ -2247,6 +2269,47 @@ static void prefs_other_create(void)
other.checkbtn_warnqueued = checkbtn_warnqueued;
}
+#if USE_GTKSPELL
+static void prefs_spell_create(void)
+{
+ GtkWidget *vbox1, *vbox2;
+ GtkWidget *frame;
+ GtkWidget *hbox;
+ GtkWidget *chkbtn_enable_spell;
+ GtkWidget *label;
+ GtkWidget *entry_spell_lang;
+
+ vbox1 = gtk_vbox_new (FALSE, VSPACING);
+ gtk_widget_show (vbox1);
+ gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
+
+ PACK_FRAME_WITH_CHECK_BUTTON(vbox1, frame, chkbtn_enable_spell,
+ _("Enable Spell checking"));
+
+ vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW);
+ gtk_widget_show (vbox2);
+ gtk_container_add (GTK_CONTAINER (frame), vbox2);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
+ SET_TOGGLE_SENSITIVITY (chkbtn_enable_spell, vbox2);
+
+ hbox = gtk_hbox_new (FALSE, 8);
+ gtk_widget_show (hbox);
+ gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
+
+ label = gtk_label_new (_("Default language:"));
+ gtk_widget_show (label);
+ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+
+ entry_spell_lang = gtk_entry_new ();
+ gtk_widget_show (entry_spell_lang);
+ gtk_box_pack_start (GTK_BOX (hbox), entry_spell_lang, TRUE, TRUE, 0);
+
+ spell.chkbtn_enable_spell = chkbtn_enable_spell;
+ spell.entry_spell_lang = entry_spell_lang;
+}
+#endif /* USE_GTKSPELL */
+
static void prefs_advanced_create(void)
{
GtkWidget *vbox1;