add #ifdefs that Melvin forgot in his previous commit
[claws.git] / src / prefs_common.c
index 93678b5fbceb776ceffb22fefc5609425841095a..7603b11b2da1bfac801570687c072d91c6caae08 100644 (file)
@@ -105,7 +105,8 @@ static struct Compose {
        GtkWidget *text_fw_quotefmt;
 
        GtkWidget *checkbtn_autoextedit;
-
+       GtkWidget *spinbtn_undolevel;
+       GtkObject *spinbtn_undolevel_adj;
        GtkWidget *checkbtn_reply_account_autosel;
        GtkWidget *checkbtn_forward_account_autosel;
        GtkWidget *checkbtn_reedit_account_autosel;
@@ -120,17 +121,18 @@ static struct Compose {
        GtkWidget *checkbtn_smart_wrapping;
        GtkWidget *checkbtn_block_cursor;
        GtkWidget *checkbtn_reply_with_quote;
+} compose;
 
        /* spelling */
 #if USE_PSPELL
+static struct Spelling {
        GtkWidget *checkbtn_enable_pspell;
        GtkWidget *entry_pspell_path;
        GtkWidget *btn_pspell_path;
        GtkWidget *optmenu_dictionary;
+} spelling;
 #endif
 
-} compose;
-
 static struct Quote {
        GtkWidget *entry_quotemark;
        GtkWidget *text_quotefmt;
@@ -217,6 +219,7 @@ static struct MessageColorButtons {
        GtkWidget *quote_level3_btn;
        GtkWidget *uri_btn;
        GtkWidget *tgt_folder_btn;
+       GtkWidget *misspelled_btn;
 } color_buttons;
 
 static GtkWidget *quote_desc_win;
@@ -320,7 +323,11 @@ static PrefParam param[] = {
         &compose.checkbtn_autoextedit,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
-       {"linewrap_length", "74", &prefs_common.linewrap_len, P_INT,
+       {"undo_level", "50", &prefs_common.undolevels, P_INT,
+        &compose.spinbtn_undolevel,
+        prefs_set_data_from_spinbtn, prefs_set_spinbtn},
+
+       {"linewrap_length", "72", &prefs_common.linewrap_len, P_INT,
         &compose.spinbtn_linewrap,
         prefs_set_data_from_spinbtn, prefs_set_spinbtn},
        {"linewrap_quotation", "FALSE", &prefs_common.linewrap_quote, P_BOOL,
@@ -341,14 +348,16 @@ static PrefParam param[] = {
         prefs_set_data_from_toggle, prefs_set_toggle},
 #if USE_PSPELL
        {"enable_pspell", "TRUE", &prefs_common.enable_pspell,
-        P_BOOL, &compose.checkbtn_enable_pspell,
+        P_BOOL, &spelling.checkbtn_enable_pspell,
         prefs_set_data_from_toggle, prefs_set_toggle},
        {"pspell_path", "/usr/local/share/pspell/", &prefs_common.pspell_path, 
-        P_STRING, &compose.entry_pspell_path, 
+        P_STRING, &spelling.entry_pspell_path, 
         prefs_set_data_from_entry, prefs_set_entry},
        {"dictionary",  "", &prefs_common.dictionary,
-        P_STRING, &compose.optmenu_dictionary, 
+        P_STRING, &spelling.optmenu_dictionary, 
         prefs_dictionary_set_data_from_optmenu, prefs_dictionary_set_optmenu },
+       {"misspelled_color", "16711680", &prefs_common.misspelled_col, P_INT,
+        NULL, NULL, NULL},
 #endif
        {"reply_with_quote", "TRUE", &prefs_common.reply_with_quote, P_BOOL,
         &compose.checkbtn_reply_with_quote, prefs_set_data_from_toggle, prefs_set_toggle},
@@ -377,13 +386,13 @@ static PrefParam param[] = {
         &prefs_common.quotefmt, P_STRING, &quote.text_quotefmt,
         prefs_set_data_from_text, prefs_set_text},
 
-       {"fw_quote_mark", "> ", &prefs_common.fw_quotemark, P_STRING,
+       {"forward_quote_mark", "> ", &prefs_common.fw_quotemark, P_STRING,
         &quote.entry_fw_quotemark,
         prefs_set_data_from_entry, prefs_set_entry},
-       {"fw_quote_format",
+       {"forward_quote_format",
         "\\n\\nBegin forwarded message:\\n\\n"
-        "?d(Date: %d\\n)?f(From: %f\\n)?t(To: %t\\n)?c(Cc: %c\\n)"
-        "?n(Newsgroups: %n\\n)?s(Subject: %s\\n)\\n\\n%M",
+        "?d{Date: %d\\n}?f{From: %f\\n}?t{To: %t\\n}?c{Cc: %c\\n}"
+        "?n{Newsgroups: %n\\n}?s{Subject: %s\\n}\\n\\n%M",
         &prefs_common.fw_quotefmt, P_STRING, &quote.text_fw_quotefmt,
         prefs_set_data_from_text, prefs_set_text},
 
@@ -712,6 +721,7 @@ static void prefs_common_create             (void);
 static void prefs_receive_create       (void);
 static void prefs_send_create          (void);
 static void prefs_compose_create       (void);
+static void prefs_spelling_create      (void);
 static void prefs_quote_create         (void);
 static void prefs_display_create       (void);
 static void prefs_message_create       (void);
@@ -893,6 +903,10 @@ static void prefs_common_create(void)
        SET_NOTEBOOK_LABEL(dialog.notebook, _("Send"),      page++);
        prefs_compose_create();
        SET_NOTEBOOK_LABEL(dialog.notebook, _("Compose"),   page++);
+#if USE_PSPELL
+       prefs_spelling_create();
+       SET_NOTEBOOK_LABEL(dialog.notebook, _("Spell Checker"),   page++);
+#endif 
        prefs_quote_create();
        SET_NOTEBOOK_LABEL(dialog.notebook, _("Quote"),   page++);
        prefs_display_create();
@@ -1286,19 +1300,19 @@ static void prefs_dictionary_set_optmenu(PrefParam *pparam)
        prefs_dictionary_set_data_from_optmenu(pparam);
 }
 
-static void prefs_compose_checkbtn_enable_pspell_toggle_cb
+static void prefs_spelling_checkbtn_enable_pspell_toggle_cb
        (GtkWidget *widget,
         gpointer data)
 {
        gboolean toggled;
 
        toggled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
-       gtk_widget_set_sensitive(compose.entry_pspell_path, toggled);
-       gtk_widget_set_sensitive(compose.optmenu_dictionary, toggled);
-       gtk_widget_set_sensitive(compose.btn_pspell_path, toggled);
+       gtk_widget_set_sensitive(spelling.entry_pspell_path, toggled);
+       gtk_widget_set_sensitive(spelling.optmenu_dictionary, toggled);
+       gtk_widget_set_sensitive(spelling.btn_pspell_path, toggled);
 }
 
-static void prefs_compose_btn_pspell_path_clicked_cb(GtkWidget *widget,
+static void prefs_spelling_btn_pspell_path_clicked_cb(GtkWidget *widget,
                                                     gpointer data)
 {
        gchar *file_path, *tmp;
@@ -1317,22 +1331,138 @@ static void prefs_compose_btn_pspell_path_clicked_cb(GtkWidget *widget,
                prefs_common.pspell_path = g_strdup_printf("%s%s",tmp,G_DIR_SEPARATOR_S);
 
                new_menu = gtkpspell_dictionary_option_menu_new(prefs_common.pspell_path);
-               gtk_option_menu_set_menu(GTK_OPTION_MENU(compose.optmenu_dictionary),
+               gtk_option_menu_set_menu(GTK_OPTION_MENU(spelling.optmenu_dictionary),
                                         new_menu);
 
-               gtk_entry_set_text(GTK_ENTRY(compose.entry_pspell_path), prefs_common.pspell_path);                                      
+               gtk_entry_set_text(GTK_ENTRY(spelling.entry_pspell_path), prefs_common.pspell_path);                                     
                /* select first one */
-               gtk_option_menu_set_history(GTK_OPTION_MENU(compose.optmenu_dictionary), 0);
+               gtk_option_menu_set_history(GTK_OPTION_MENU(spelling.optmenu_dictionary), 0);
                
                prefs_common.dictionary = gtkpspell_get_dictionary_menu_active_item(
-                               gtk_option_menu_get_menu(GTK_OPTION_MENU(compose.optmenu_dictionary)));
+                               gtk_option_menu_get_menu(GTK_OPTION_MENU(spelling.optmenu_dictionary)));
                g_free(tmp);
        
 
        }
 }
+
+static void prefs_spelling_create()
+{
+       GtkWidget *vbox1;
+       GtkWidget *frame_spell;
+       GtkWidget *hbox_spell;
+       GtkWidget *vbox_spell;
+       GtkWidget *hbox_pspell_path;
+       GtkWidget *checkbtn_enable_pspell;
+       GtkWidget *label_pspell_path;
+       GtkWidget *entry_pspell_path;
+       GtkWidget *btn_pspell_path;
+       GtkWidget *spell_table;
+       GtkWidget *label_dictionary;
+       GtkWidget *optmenu_dictionary;
+       GtkWidget *color_label;
+       GtkWidget *hbox_col;
+       GtkWidget *col_align;
+
+
+       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);
+
+       /* spell checker defaults */                       
+       PACK_FRAME(vbox1, frame_spell, _("Global spelling checker settings"));
+       vbox_spell = gtk_vbox_new(FALSE, VSPACING_NARROW);
+       gtk_widget_show (vbox_spell);
+       gtk_container_add(GTK_CONTAINER(frame_spell), vbox_spell);
+       gtk_container_set_border_width(GTK_CONTAINER(vbox_spell), 8);
+
+       PACK_CHECK_BUTTON(vbox_spell, checkbtn_enable_pspell, 
+                         _("Enable spell checker (EXPERIMENTAL)"));
+
+       gtk_signal_connect(GTK_OBJECT(checkbtn_enable_pspell), "toggled",
+                          GTK_SIGNAL_FUNC(prefs_spelling_checkbtn_enable_pspell_toggle_cb),
+                          NULL);
+
+       spell_table = gtk_table_new(3, 3, FALSE);
+       gtk_container_set_border_width (GTK_CONTAINER (spell_table), 0);
+       gtk_table_set_row_spacings(GTK_TABLE(spell_table), 8);
+       gtk_table_set_col_spacings(GTK_TABLE(spell_table), 8);
+
+       gtk_box_pack_start(GTK_BOX(vbox_spell), spell_table, TRUE, TRUE, 0);
+
+       
+       label_pspell_path = gtk_label_new (_("Dictionaries path:"));
+       gtk_misc_set_alignment(GTK_MISC(label_pspell_path), 1.0, 0.5);
+       gtk_widget_show(label_pspell_path);
+       gtk_table_attach (GTK_TABLE (spell_table), label_pspell_path, 0, 1, 0, 1,
+                         GTK_FILL, (GTK_EXPAND | GTK_FILL), 0, 0);
+       
+       hbox_pspell_path = gtk_hbox_new (FALSE, 8);
+       gtk_table_attach (GTK_TABLE (spell_table), hbox_pspell_path, 1, 2, 0, 1,
+                         GTK_FILL, (GTK_EXPAND | GTK_FILL), 0, 0);
+       gtk_widget_show(hbox_pspell_path);
+
+       entry_pspell_path = gtk_entry_new();
+       gtk_widget_show(entry_pspell_path);
+       gtk_box_pack_start(GTK_BOX(hbox_pspell_path), entry_pspell_path, TRUE, TRUE, 0);        
+       
+       gtk_widget_set_sensitive(entry_pspell_path, prefs_common.enable_pspell);
+
+       btn_pspell_path = gtk_button_new_with_label(_("..."));
+       gtk_widget_show(btn_pspell_path);
+       gtk_box_pack_start(GTK_BOX(hbox_pspell_path), btn_pspell_path, FALSE, FALSE, 0);
+       gtk_widget_set_sensitive(btn_pspell_path, prefs_common.enable_pspell);
+
+       gtk_signal_connect(GTK_OBJECT(btn_pspell_path), "clicked", 
+                          GTK_SIGNAL_FUNC(prefs_spelling_btn_pspell_path_clicked_cb),
+                          NULL);
+
+       label_dictionary = gtk_label_new(_("Default dictionary:"));
+       gtk_misc_set_alignment(GTK_MISC(label_dictionary), 1.0, 0.5);
+       gtk_widget_show(label_dictionary);
+       gtk_table_attach (GTK_TABLE (spell_table), label_dictionary, 0, 1, 1, 2,
+                         GTK_FILL, (GTK_EXPAND | GTK_FILL), 0, 0);
+
+       optmenu_dictionary = gtk_option_menu_new();
+       gtk_widget_show(optmenu_dictionary);
+       gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu_dictionary), 
+                                gtkpspell_dictionary_option_menu_new(prefs_common.pspell_path));
+       gtk_table_attach (GTK_TABLE (spell_table), optmenu_dictionary, 1, 2, 1, 2,
+                         GTK_FILL, (GTK_EXPAND | GTK_FILL), 0, 0);
+       gtk_widget_set_sensitive(optmenu_dictionary, prefs_common.enable_pspell);
+
+       /* Color */
+       color_label = gtk_label_new(_("Misspelled word color:"));
+       gtk_misc_set_alignment(GTK_MISC(color_label), 1.0, 0.5);
+       gtk_table_attach (GTK_TABLE (spell_table), color_label, 0, 1, 2, 3,
+                         GTK_FILL, GTK_SHRINK, 0, 0);
+       gtk_widget_show(color_label);
+       
+       col_align = gtk_alignment_new(0.0, 0.5, 0, 0);
+       gtk_widget_show(col_align);
+       gtk_table_attach (GTK_TABLE (spell_table), col_align, 1, 2, 2, 3,
+                         GTK_FILL, GTK_SHRINK, 0, 0);
+
+       color_buttons.misspelled_btn = gtk_button_new_with_label ("");
+       set_button_bg_color(color_buttons.misspelled_btn,
+                           prefs_common.misspelled_col);
+       gtk_widget_set_usize (color_buttons.misspelled_btn, 30, 20);
+       gtk_widget_set_sensitive(color_buttons.misspelled_btn, prefs_common.enable_pspell);
+       gtk_signal_connect (GTK_OBJECT (color_buttons.misspelled_btn), "clicked",
+                           GTK_SIGNAL_FUNC(quote_color_set_dialog), "Misspelled word");
+       gtk_container_add(GTK_CONTAINER(col_align), color_buttons.misspelled_btn);
+
+
+       spelling.checkbtn_enable_pspell = checkbtn_enable_pspell;
+       spelling.entry_pspell_path      = entry_pspell_path;
+       spelling.btn_pspell_path        = btn_pspell_path;
+       spelling.optmenu_dictionary     = optmenu_dictionary;
+}
+
 #endif
 
+
 static void prefs_compose_create(void)
 {
        GtkWidget *vbox1;
@@ -1359,7 +1489,12 @@ static void prefs_compose_create(void)
        GtkWidget *checkbtn_forward_account_autosel;
        GtkWidget *checkbtn_reedit_account_autosel;
 
-        GtkWidget *vbox_linewrap;
+       GtkWidget *hbox_undolevel;
+       GtkWidget *label_undolevel;
+       GtkObject *spinbtn_undolevel_adj;
+       GtkWidget *spinbtn_undolevel;
+
+       GtkWidget *vbox_linewrap;
 
        GtkWidget *hbox3;
        GtkWidget *hbox4;
@@ -1376,19 +1511,6 @@ static void prefs_compose_create(void)
        GtkWidget *checkbtn_smart_wrapping;
        GtkWidget *checkbtn_block_cursor;
 
-#if USE_PSPELL
-       GtkWidget *frame_spell;
-       GtkWidget *hbox_spell;
-       GtkWidget *vbox_spell;
-       GtkWidget *hbox_pspell_path;
-       GtkWidget *checkbtn_enable_pspell;
-       GtkWidget *label_pspell_path;
-       GtkWidget *entry_pspell_path;
-       GtkWidget *btn_pspell_path;
-       GtkWidget *hbox_dictionary;
-       GtkWidget *label_dictionary;
-       GtkWidget *optmenu_dictionary;
-#endif
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
        gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
@@ -1500,59 +1622,23 @@ static void prefs_compose_create(void)
        PACK_CHECK_BUTTON (vbox1, checkbtn_block_cursor,
                          _("Block cursor"));
 
-#if USE_PSPELL
-       /* spell checker defaults */                       
-       PACK_FRAME(vbox1, frame_spell, _("Global spelling checker settings"));
-       vbox_spell = gtk_vbox_new(FALSE, VSPACING_NARROW);
-       gtk_widget_show (vbox_spell);
-       gtk_container_add(GTK_CONTAINER(frame_spell), vbox_spell);
-       gtk_container_set_border_width(GTK_CONTAINER(vbox_spell), 8);
-
-       PACK_CHECK_BUTTON(vbox_spell, checkbtn_enable_pspell, 
-                         _("Enable spell checker (EXPERIMENTAL)"));
-
-       gtk_signal_connect(GTK_OBJECT(checkbtn_enable_pspell), "toggled",
-                          GTK_SIGNAL_FUNC(prefs_compose_checkbtn_enable_pspell_toggle_cb),
-                          NULL);
-
-       hbox_pspell_path = gtk_hbox_new (FALSE, 8);
-       gtk_widget_show(hbox_pspell_path);
-       gtk_box_pack_start(GTK_BOX(vbox_spell), hbox_pspell_path, TRUE, TRUE, 0);
-
-       label_pspell_path = gtk_label_new (_("Dictionaries path"));
-       gtk_widget_show(label_pspell_path);
-       gtk_box_pack_start(GTK_BOX(hbox_pspell_path), label_pspell_path, FALSE, FALSE, 0);
-       
-       entry_pspell_path = gtk_entry_new();
-       gtk_widget_show(entry_pspell_path);
-       gtk_box_pack_start(GTK_BOX(hbox_pspell_path), entry_pspell_path, FALSE, FALSE, 0);
-       gtk_widget_set_usize(entry_pspell_path, 150, -1);
-       gtk_widget_set_sensitive(entry_pspell_path, prefs_common.enable_pspell);
-
-       btn_pspell_path = gtk_button_new_with_label(_("..."));
-       gtk_widget_show(btn_pspell_path);
-       gtk_box_pack_start(GTK_BOX(hbox_pspell_path), btn_pspell_path, FALSE, FALSE, 0);
-       gtk_widget_set_sensitive(btn_pspell_path, prefs_common.enable_pspell);
-
-       gtk_signal_connect(GTK_OBJECT(btn_pspell_path), "clicked", 
-                          GTK_SIGNAL_FUNC(prefs_compose_btn_pspell_path_clicked_cb),
-                          NULL);
+       PACK_VSPACER (vbox2, vbox3, VSPACING_NARROW_2);
 
-       hbox_dictionary = gtk_hbox_new(FALSE, 8);
-       gtk_widget_show(hbox_dictionary);
-       gtk_box_pack_start(GTK_BOX(vbox_spell), hbox_dictionary, TRUE, TRUE, 0);
+       hbox_undolevel = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox3);
+       gtk_box_pack_start (GTK_BOX (vbox1), hbox_undolevel, FALSE, FALSE, 0);
 
-       label_dictionary = gtk_label_new(_("Dictionary"));
-       gtk_widget_show(label_dictionary);
-       gtk_box_pack_start(GTK_BOX(hbox_dictionary), label_dictionary, FALSE, FALSE, 0);
+       label_undolevel = gtk_label_new (_("Undo level"));
+       gtk_widget_show (label_undolevel);
+       gtk_box_pack_start (GTK_BOX (hbox_undolevel), label_undolevel, FALSE, FALSE, 0);
 
-       optmenu_dictionary = gtk_option_menu_new();
-       gtk_widget_show(optmenu_dictionary);
-       gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu_dictionary), 
-                                gtkpspell_dictionary_option_menu_new(prefs_common.pspell_path));
-       gtk_box_pack_start(GTK_BOX(hbox_dictionary), optmenu_dictionary, FALSE, FALSE, 0);
-       gtk_widget_set_sensitive(optmenu_dictionary, prefs_common.enable_pspell);
-#endif
+       spinbtn_undolevel_adj = gtk_adjustment_new (50, 0, 100, 1, 10, 10);
+       spinbtn_undolevel = gtk_spin_button_new
+               (GTK_ADJUSTMENT (spinbtn_undolevel_adj), 1, 0);
+       gtk_widget_show (spinbtn_undolevel);
+       gtk_box_pack_start (GTK_BOX (hbox_undolevel), spinbtn_undolevel, FALSE, FALSE, 0);
+       gtk_widget_set_usize (spinbtn_undolevel, 64, -1);
+       gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_undolevel), TRUE);
 
        /*
        compose.checkbtn_quote   = checkbtn_quote;
@@ -1568,6 +1654,9 @@ static void prefs_compose_create(void)
        compose.checkbtn_forward_account_autosel = checkbtn_forward_account_autosel;
        compose.checkbtn_reedit_account_autosel  = checkbtn_reedit_account_autosel;
 
+       compose.spinbtn_undolevel     = spinbtn_undolevel;
+       compose.spinbtn_undolevel_adj = spinbtn_undolevel_adj;
+
        compose.spinbtn_linewrap     = spinbtn_linewrap;
        compose.spinbtn_linewrap_adj = spinbtn_linewrap_adj;
        compose.checkbtn_wrapquote   = checkbtn_wrapquote;
@@ -1580,12 +1669,6 @@ static void prefs_compose_create(void)
        compose.checkbtn_block_cursor   =
                checkbtn_block_cursor;
 
-#if USE_PSPELL
-       compose.checkbtn_enable_pspell = checkbtn_enable_pspell;
-       compose.entry_pspell_path      = entry_pspell_path;
-       compose.btn_pspell_path        = btn_pspell_path;
-       compose.optmenu_dictionary     = optmenu_dictionary;
-#endif
 }
 
 static void prefs_quote_create(void)
@@ -2681,8 +2764,7 @@ static GtkWidget *date_format_create(GtkButton *button, void *data)
        datefmt_clist = gtk_clist_new_with_titles(2, titles);
        gtk_widget_show(datefmt_clist);
        gtk_container_add(GTK_CONTAINER(scrolledwindow1), datefmt_clist);
-/*     gtk_clist_set_column_width(GTK_CLIST(datefmt_clist), 0, 80);   */
-
+       /* gtk_clist_set_column_width(GTK_CLIST(datefmt_clist), 0, 80); */
        gtk_clist_set_selection_mode(GTK_CLIST(datefmt_clist),
                                     GTK_SELECTION_BROWSE);
 
@@ -2800,7 +2882,6 @@ static void prefs_quote_colors_dialog_create(void)
        GtkWidget *tgt_folder_label;
        GtkWidget *hbbox;
        GtkWidget *ok_btn;
-       //GtkWidget *cancel_btn;
        GtkWidget *recycle_colors_btn;
        GtkWidget *frame_colors;
 
@@ -2966,6 +3047,11 @@ static void quote_color_set_dialog(GtkWidget *widget, gpointer data)
        } else if(g_strcasecmp(type, "TGTFLD") == 0) {
                title = _("Pick color for target folder");
                rgbvalue = prefs_common.tgt_folder_col;
+#if USE_PSPELL         
+       } else if(g_strcasecmp(type, "Misspelled word") == 0) {
+               title = _("Pick color for misspelled word");
+               rgbvalue = prefs_common.misspelled_col;
+#endif         
        } else {   /* Should never be called */
                g_warning("Unrecognized datatype '%s' in quote_color_set_dialog\n", type);
                return;
@@ -3033,6 +3119,11 @@ static void quote_colors_set_dialog_ok(GtkWidget *widget, gpointer data)
                prefs_common.tgt_folder_col = rgbvalue;
                set_button_bg_color(color_buttons.tgt_folder_btn, rgbvalue);
                folderview_set_target_folder_color(prefs_common.tgt_folder_col);
+#if USE_PSPELL         
+       } else if (g_strcasecmp(type, "Misspelled word") == 0) {
+               prefs_common.misspelled_col = rgbvalue;
+               set_button_bg_color(color_buttons.misspelled_btn, rgbvalue);
+#endif         
        } else
                fprintf( stderr, "Unrecognized datatype '%s' in quote_color_set_dialog_ok\n", type );
 
@@ -3140,7 +3231,7 @@ static void prefs_quote_description_create(void)
        PACK_LABEL();
 
        label = gtk_label_new
-               ("?x(expr)");   /* condition */
+               ("?x{expr}");   /* condition */
        PACK_LABEL();
 
        label = gtk_label_new
@@ -3154,8 +3245,8 @@ static void prefs_quote_description_create(void)
        label = gtk_label_new
                ("\\\\\n"       /* literal backslash */
                 "\\?\n"        /* literal question mark */
-                "\\(\n"        /* literal opening parenthesis */
-                "\\)");        /* literal closing parenthesis */
+                "\\{\n"        /* literal opening curly brace */
+                "\\}");        /* literal closing curly brace */
        PACK_LABEL();
 
        vbox2 = gtk_vbox_new(FALSE, 8);
@@ -3190,8 +3281,8 @@ static void prefs_quote_description_create(void)
        label = gtk_label_new
                (_("Literal backslash\n"
                   "Literal question mark\n"
-                  "Literal opening parenthesis\n"
-                  "Literal closing parenthesis"));
+                  "Literal opening curly brace\n"
+                  "Literal closing curly brace"));
        PACK_LABEL();
 
 #undef PACK_LABEL