sync with sylpheed 0.6.0cvs4
[claws.git] / src / prefs_common.c
index 37555103a9c6ddba630751a43d5c4c8fafe37a44..1b3f48bd4fbdd890604c895d930dbf07c00efc80 100644 (file)
@@ -49,6 +49,8 @@
 #include "gtkutils.h"
 #include "alertpanel.h"
 #include "folder.h"
+#include "gtkspell.h"
+#include "filesel.h"
 #include "folderview.h"
 
 PrefsCommon prefs_common;
@@ -70,15 +72,17 @@ static struct Receive {
 
        GtkWidget *checkbtn_chkonstartup;
        GtkWidget *checkbtn_noerrorpanel;
+       GtkWidget *checkbtn_scan_after_inc;
+
 
        GtkWidget *spinbtn_maxarticle;
        GtkObject *spinbtn_maxarticle_adj;
 } receive;
 
 static struct Send {
-       GtkWidget *checkbtn_sendext;
-       GtkWidget *entry_sendext;
-       GtkWidget *button_sendext;
+       GtkWidget *checkbtn_extsend;
+       GtkWidget *entry_extsend;
+       GtkWidget *button_extsend;
 
        GtkWidget *checkbtn_savemsg;
        GtkWidget *checkbtn_queuemsg;
@@ -95,10 +99,13 @@ static struct Compose {
        GtkWidget *checkbtn_autosig;
        GtkWidget *entry_sigsep;
 
-       GtkWidget *checkbtn_reply_account_autosel;
        GtkWidget *entry_fw_quotemark;
        GtkWidget *text_fw_quotefmt;
 
+       GtkWidget *checkbtn_reply_account_autosel;
+       GtkWidget *checkbtn_forward_account_autosel;
+       GtkWidget *checkbtn_reedit_account_autosel;
+
        GtkWidget *spinbtn_linewrap;
        GtkObject *spinbtn_linewrap_adj;
        GtkWidget *checkbtn_wrapquote;
@@ -106,6 +113,12 @@ static struct Compose {
 
        GtkWidget * checkbtn_forward_as_attachment;
        GtkWidget * checkbtn_smart_wrapping;
+
+       /* spelling */
+       GtkWidget *checkbtn_enable_ispell;
+       GtkWidget *entry_ispell_path;
+       GtkWidget *btn_ispell_path;
+       GtkWidget *optmenu_dictionary_path;
 } compose;
 
 static struct Display {
@@ -123,6 +136,8 @@ static struct Display {
        GtkWidget *chkbtn_swapfrom;
        GtkWidget *chkbtn_hscrollbar;
        GtkWidget *chkbtn_useaddrbook;
+       GtkWidget *chkbtn_expand_thread;
+       GtkWidget *chkbtn_bold_unread;
 
        GtkWidget *entry_datefmt;
 } display;
@@ -156,7 +171,7 @@ static struct Privacy {
 #endif
 
 static struct Interface {
-       GtkWidget *checkbtn_emacs;
+       /* GtkWidget *checkbtn_emacs; */
        GtkWidget *checkbtn_openunread;
        GtkWidget *checkbtn_openinbox;
        GtkWidget *checkbtn_immedexec;
@@ -165,7 +180,7 @@ static struct Interface {
        GtkWidget *checkbtn_askonclean;
        GtkWidget *checkbtn_warnqueued;
        GtkWidget *checkbtn_addaddrbyclick;
-       GtkWidget *recvdialog_optmenu;
+       GtkWidget *optmenu_recvdialog;
 } interface;
 
 static struct Other {
@@ -197,8 +212,12 @@ static void prefs_common_default_signkey_set_data_from_optmenu
                                                        (PrefParam *pparam);
 static void prefs_common_default_signkey_set_optmenu   (PrefParam *pparam);
 #endif
-static void prefs_recvdialog_set_data_from_optmenu(PrefParam *pparam);
-static void prefs_recvdialog_set_optmenu(PrefParam *pparam);
+static void prefs_common_recv_dialog_set_data_from_optmenu(PrefParam *pparam);
+static void prefs_common_recv_dialog_set_optmenu(PrefParam *pparam);
+
+static void prefs_dictionary_set_data_from_optmenu(PrefParam *param);
+static void prefs_dictionary_set_optmenu(PrefParam *pparam);
+
 
 /*
    parameter name, default value, pointer to the prefs variable, data type,
@@ -238,17 +257,20 @@ static PrefParam param[] = {
        {"noerrorpanel", "FALSE", &prefs_common.noerrorpanel, P_BOOL,
         &receive.checkbtn_noerrorpanel,
         prefs_set_data_from_toggle, prefs_set_toggle},
-
+       {"scan_all_after_inc", "FALSE", &prefs_common.scan_all_after_inc,
+        P_BOOL, &receive.checkbtn_scan_after_inc,
+        prefs_set_data_from_toggle, prefs_set_toggle},
        {"max_news_articles", "300", &prefs_common.max_articles, P_INT,
         &receive.spinbtn_maxarticle,
         prefs_set_data_from_spinbtn, prefs_set_spinbtn},
 
        /* Send */
-       {"use_ext_send", "FALSE", &prefs_common.use_extsend, P_BOOL,
-        &send.checkbtn_sendext,
+       {"use_ext_sendmail", "FALSE", &prefs_common.use_extsend, P_BOOL,
+        &send.checkbtn_extsend,
         prefs_set_data_from_toggle, prefs_set_toggle},
-       {"ext_send_path", NULL, &prefs_common.extsend_path, P_STRING,
-        &send.entry_sendext, prefs_set_data_from_entry, prefs_set_entry},
+       {"ext_sendmail_cmd", DEFAULT_SENDMAIL_CMD,
+        &prefs_common.extsend_cmd, P_STRING,
+        &send.entry_extsend, prefs_set_data_from_entry, prefs_set_entry},
        {"save_message", "TRUE", &prefs_common.savemsg, P_BOOL,
         &send.checkbtn_savemsg,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -268,6 +290,7 @@ static PrefParam param[] = {
        {"quote_mark", "> ", &prefs_common.quotemark, P_STRING,
         &compose.entry_quotemark, prefs_set_data_from_entry, prefs_set_entry},
        {"quote_format", "On %d\\n%f wrote:\\n\\n%Q",
+
         &prefs_common.quotefmt, P_STRING, &compose.text_quotefmt,
         prefs_set_data_from_text, prefs_set_text},
        {"fw_quote_mark", "> ", &prefs_common.fw_quotemark, P_STRING,
@@ -282,10 +305,18 @@ static PrefParam param[] = {
        {"signature_separator", "-- ", &prefs_common.sig_sep, P_STRING,
         &compose.entry_sigsep, prefs_set_data_from_entry, prefs_set_entry},
 
-       {"reply_account_autoselect", "TRUE",
+        {"reply_account_autoselect", "TRUE",
         &prefs_common.reply_account_autosel, P_BOOL,
         &compose.checkbtn_reply_account_autosel,
         prefs_set_data_from_toggle, prefs_set_toggle},
+       {"forward_account_autoselect", "TRUE",
+        &prefs_common.forward_account_autosel, P_BOOL,
+        &compose.checkbtn_forward_account_autosel,
+        prefs_set_data_from_toggle, prefs_set_toggle},
+       {"reedit_account_autoselect", "TRUE",
+        &prefs_common.reedit_account_autosel, P_BOOL,
+        &compose.checkbtn_reedit_account_autosel,
+        prefs_set_data_from_toggle, prefs_set_toggle},
 
        {"linewrap_length", "74", &prefs_common.linewrap_len, P_INT,
         &compose.spinbtn_linewrap,
@@ -303,6 +334,15 @@ static PrefParam param[] = {
         {"smart_wrapping", "TRUE", &prefs_common.smart_wrapping,
         P_BOOL, &compose.checkbtn_smart_wrapping,
         prefs_set_data_from_toggle, prefs_set_toggle},
+       {"enable_ispell", "TRUE", &prefs_common.enable_ispell,
+        P_BOOL, &compose.checkbtn_enable_ispell,
+        prefs_set_data_from_toggle, prefs_set_toggle},
+       {"ispell_path", ISPELL_PATH, &prefs_common.ispell_path, 
+        P_STRING, &compose.entry_ispell_path, 
+        prefs_set_data_from_entry, prefs_set_entry},
+       {"dictionary_path",  "", &prefs_common.dictionary_path,
+        P_STRING, &compose.optmenu_dictionary_path, 
+        prefs_dictionary_set_data_from_optmenu, prefs_dictionary_set_optmenu },
 
        {"show_ruler", "TRUE", &prefs_common.show_ruler, P_BOOL,
         NULL, NULL, NULL},
@@ -327,6 +367,7 @@ static PrefParam param[] = {
         &display.entry_normalfont, 
         prefs_set_data_from_entry, prefs_set_entry},
 
+
        {"display_folder_unread_num", "TRUE",
         &prefs_common.display_folder_unread, P_BOOL,
         &display.chkbtn_folder_unread,
@@ -349,11 +390,16 @@ static PrefParam param[] = {
        {"date_format", "%y/%m/%d(%a) %H:%M", &prefs_common.date_format,
         P_STRING, &display.entry_datefmt,
         prefs_set_data_from_entry, prefs_set_entry},
+       {"expand_thread", "TRUE", &prefs_common.expand_thread, P_BOOL,
+        &display.chkbtn_expand_thread,
+        prefs_set_data_from_toggle, prefs_set_toggle},
+       {"bold_unread", "TRUE", &prefs_common.bold_unread, P_BOOL,
+        &display.chkbtn_bold_unread,
+        prefs_set_data_from_toggle, prefs_set_toggle},
 
-       /*
        {"enable_thread", "TRUE", &prefs_common.enable_thread, P_BOOL,
         NULL, NULL, NULL},
-       */
+       
        {"toolbar_style", "3", &prefs_common.toolbar_style, P_ENUM,
         NULL, NULL, NULL},
        {"show_statusbar", "TRUE", &prefs_common.show_statusbar, P_BOOL,
@@ -530,9 +576,9 @@ static PrefParam param[] = {
        {"separate_message", "FALSE", &prefs_common.sep_msg, P_BOOL,
         NULL, NULL, NULL},
 
-       {"emulate_emacs", "FALSE", &prefs_common.emulate_emacs, P_BOOL,
-        &interface.checkbtn_emacs,
-        prefs_set_data_from_toggle, prefs_set_toggle},
+       /* {"emulate_emacs", "FALSE", &prefs_common.emulate_emacs, P_BOOL,
+        NULL, NULL, NULL}, */
+
        {"open_unread_on_enter", "FALSE", &prefs_common.open_unread_on_enter,
         P_BOOL, &interface.checkbtn_openunread,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -542,14 +588,14 @@ static PrefParam param[] = {
        {"immediate_execution", "TRUE", &prefs_common.immediate_exec, P_BOOL,
         &interface.checkbtn_immedexec,
         prefs_set_data_from_toggle, prefs_set_toggle},
+       {"receive_dialog_mode", "1", &prefs_common.recv_dialog_mode, P_ENUM,
+        &interface.optmenu_recvdialog,
+        prefs_common_recv_dialog_set_data_from_optmenu,
+        prefs_common_recv_dialog_set_optmenu},
+
        {"add_address_by_click", "FALSE", &prefs_common.add_address_by_click,
         P_BOOL, &interface.checkbtn_addaddrbyclick,
         prefs_set_data_from_toggle, prefs_set_toggle},
-       {"receive_dialog", NULL, &prefs_common.receive_dialog, P_ENUM,
-        &interface.recvdialog_optmenu,
-        prefs_recvdialog_set_data_from_optmenu,
-        prefs_recvdialog_set_optmenu},
-
        {"confirm_on_exit", "TRUE", &prefs_common.confirm_on_exit, P_BOOL,
         &interface.checkbtn_confonexit,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -585,7 +631,8 @@ static PrefParam param[] = {
 };
 
 #define VSPACING               12
-#define VSPACING_NARROW                4
+#define VSPACING_NARROW                3
+
 #define VBOX_BORDER            16
 #define DEFAULT_ENTRY_WIDTH    80
 #define PREFSBUFSIZE           1024
@@ -659,6 +706,7 @@ static void display_item_key_pressed        (GtkWidget      *widget,
                                         gboolean       *cancelled);
 
 static void prefs_font_select  (GtkButton *button, GtkEntry *entry);
+
 static void prefs_font_selection_key_pressed   (GtkWidget      *widget,
                                                 GdkEventKey    *event,
                                                 gpointer        data);
@@ -692,7 +740,7 @@ void prefs_common_open(void)
        if (prefs_rc_is_readonly(COMMON_RC))
                return;
 
-       inc_autocheck_timer_remove();
+       inc_lock();
 
        if (!dialog.window) {
                prefs_common_create();
@@ -766,7 +814,7 @@ static void prefs_receive_create(void)
        GtkWidget *hbox;
        GtkWidget *label_incext;
        GtkWidget *entry_incext;
-       GtkWidget *button_incext;
+       /* GtkWidget *button_incext; */
 
        GtkWidget *frame_spool;
        GtkWidget *checkbtn_local;
@@ -782,6 +830,8 @@ static void prefs_receive_create(void)
        GtkWidget *label_autochk2;
        GtkWidget *checkbtn_chkonstartup;
        GtkWidget *checkbtn_noerrorpanel;
+       GtkWidget *checkbtn_scan_after_inc;
+
 
        GtkWidget *frame_news;
        GtkWidget *label_maxarticle;
@@ -816,11 +866,11 @@ static void prefs_receive_create(void)
        entry_incext = gtk_entry_new ();
        gtk_widget_show (entry_incext);
        gtk_box_pack_start (GTK_BOX (hbox), entry_incext, TRUE, TRUE, 0);
-
-       button_incext = gtk_button_new_with_label (" ... ");
+#if 0
+       button_incext = gtk_button_new_with_label ("... ");
        gtk_widget_show (button_incext);
        gtk_box_pack_start (GTK_BOX (hbox), button_incext, FALSE, FALSE, 0);
-
+#endif
        PACK_FRAME(vbox1, frame_spool, _("Local spool"));
 
        vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW);
@@ -887,6 +937,9 @@ static void prefs_receive_create(void)
 
        PACK_CHECK_BUTTON (vbox2, checkbtn_noerrorpanel,
                           _("No error popup on receive error"));
+       PACK_CHECK_BUTTON (vbox2, checkbtn_scan_after_inc,
+                          _("Update all local folders after incorporation"));
+
 
        PACK_FRAME(vbox1, frame_news, _("News"));
 
@@ -915,7 +968,7 @@ static void prefs_receive_create(void)
 
        receive.checkbtn_incext = checkbtn_incext;
        receive.entry_incext    = entry_incext;
-       receive.button_incext   = button_incext;
+       /* receive.button_incext   = button_incext; */
 
        receive.checkbtn_local         = checkbtn_local;
        receive.checkbtn_filter_on_inc = checkbtn_filter_on_inc;
@@ -927,6 +980,8 @@ static void prefs_receive_create(void)
 
        receive.checkbtn_chkonstartup = checkbtn_chkonstartup;
        receive.checkbtn_noerrorpanel = checkbtn_noerrorpanel;
+       receive.checkbtn_scan_after_inc = checkbtn_scan_after_inc;
+
 
        receive.spinbtn_maxarticle     = spinbtn_maxarticle;
        receive.spinbtn_maxarticle_adj = spinbtn_maxarticle_adj;
@@ -936,13 +991,13 @@ static void prefs_send_create(void)
 {
        GtkWidget *vbox1;
        GtkWidget *vbox2;
-       GtkWidget *frame_sendext;
-       GtkWidget *vbox_sendext;
-       GtkWidget *checkbtn_sendext;
+       GtkWidget *frame_extsend;
+       GtkWidget *vbox_extsend;
+       GtkWidget *checkbtn_extsend;
        GtkWidget *hbox1;
-       GtkWidget *label_sendext;
-       GtkWidget *entry_sendext;
-       GtkWidget *button_sendext;
+       GtkWidget *label_extsend;
+       GtkWidget *entry_extsend;
+       /* GtkWidget *button_extsend; */
        GtkWidget *checkbtn_savemsg;
        GtkWidget *checkbtn_queuemsg;
        GtkWidget *label_outcharset;
@@ -956,34 +1011,34 @@ static void prefs_send_create(void)
        gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
        gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
 
-       PACK_FRAME(vbox1, frame_sendext, _("External program"));
+       PACK_FRAME(vbox1, frame_extsend, _("External program"));
 
-       gtk_widget_set_sensitive(frame_sendext, FALSE);
+       vbox_extsend = gtk_vbox_new (FALSE, VSPACING_NARROW);
+       gtk_widget_show (vbox_extsend);
+       gtk_container_add (GTK_CONTAINER (frame_extsend), vbox_extsend);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox_extsend), 8);
 
-       vbox_sendext = gtk_vbox_new (FALSE, VSPACING_NARROW);
-       gtk_widget_show (vbox_sendext);
-       gtk_container_add (GTK_CONTAINER (frame_sendext), vbox_sendext);
-       gtk_container_set_border_width (GTK_CONTAINER (vbox_sendext), 8);
-
-       PACK_CHECK_BUTTON (vbox_sendext, checkbtn_sendext,
+       PACK_CHECK_BUTTON (vbox_extsend, checkbtn_extsend,
                           _("Use external program for sending"));
 
        hbox1 = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox1);
-       gtk_box_pack_start (GTK_BOX (vbox_sendext), hbox1, FALSE, FALSE, 0);
-       SET_TOGGLE_SENSITIVITY(checkbtn_sendext, hbox1);
+       gtk_box_pack_start (GTK_BOX (vbox_extsend), hbox1, FALSE, FALSE, 0);
+       SET_TOGGLE_SENSITIVITY(checkbtn_extsend, hbox1);
 
-       label_sendext = gtk_label_new (_("Program path"));
-       gtk_widget_show (label_sendext);
-       gtk_box_pack_start (GTK_BOX (hbox1), label_sendext, FALSE, FALSE, 0);
+       label_extsend = gtk_label_new (_("Program path"));
+       gtk_widget_show (label_extsend);
+       gtk_box_pack_start (GTK_BOX (hbox1), label_extsend, FALSE, FALSE, 0);
 
-       entry_sendext = gtk_entry_new ();
-       gtk_widget_show (entry_sendext);
-       gtk_box_pack_start (GTK_BOX (hbox1), entry_sendext, TRUE, TRUE, 0);
+       entry_extsend = gtk_entry_new ();
+       gtk_widget_show (entry_extsend);
+       gtk_box_pack_start (GTK_BOX (hbox1), entry_extsend, TRUE, TRUE, 0);
 
-       button_sendext = gtk_button_new_with_label ("... ");
-       gtk_widget_show (button_sendext);
-       gtk_box_pack_start (GTK_BOX (hbox1), button_sendext, FALSE, FALSE, 0);
+#if 0
+       button_extsend = gtk_button_new_with_label ("... ");
+       gtk_widget_show (button_extsend);
+       gtk_box_pack_start (GTK_BOX (hbox1), button_extsend, FALSE, FALSE, 0);
+#endif
 
        vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW);
        gtk_widget_show (vbox2);
@@ -1049,9 +1104,9 @@ static void prefs_send_create(void)
 
        gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu), optmenu_menu);
 
-       send.checkbtn_sendext = checkbtn_sendext;
-       send.entry_sendext    = entry_sendext;
-       send.button_sendext   = button_sendext;
+       send.checkbtn_extsend = checkbtn_extsend;
+       send.entry_extsend    = entry_extsend;
+       /* send.button_extsend   = button_extsend; */
 
        send.checkbtn_savemsg  = checkbtn_savemsg;
        send.checkbtn_queuemsg = checkbtn_queuemsg;
@@ -1060,6 +1115,96 @@ static void prefs_send_create(void)
        send.optmenu_charset = optmenu;
 }
 
+static void prefs_dictionary_set_data_from_optmenu(PrefParam *param)
+{
+       gchar *str;
+       gchar *dict_path;
+       
+       g_return_if_fail(param);
+       g_return_if_fail(param->data);
+       g_return_if_fail(param->widget);
+       g_return_if_fail(*(param->widget));
+
+       dict_path = gtkspell_get_dictionary_menu_active_item
+               (gtk_option_menu_get_menu(GTK_OPTION_MENU(*(param->widget))));
+       str = *((gchar **) param->data);
+       if (str)
+               g_free(str);
+       *((gchar **) param->data) = dict_path;
+}
+
+static void prefs_dictionary_set_optmenu(PrefParam *pparam)
+{
+       GList *cur;
+       GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
+       GtkWidget *menu;
+       GtkWidget *menuitem;
+       gchar *dict_path;
+       gint n = 0;
+
+       g_return_if_fail(optmenu != NULL);
+       g_return_if_fail(pparam->data != NULL);
+
+       if (*(gchar **) pparam->data) {
+               menu = gtk_option_menu_get_menu(optmenu);
+               for (cur = GTK_MENU_SHELL(menu)->children;
+                    cur != NULL; cur = cur->next) {
+                       menuitem = GTK_WIDGET(cur->data);
+                       dict_path = gtk_object_get_data(GTK_OBJECT(menuitem), "full_path");
+                       if (!strcmp(dict_path, *((gchar **)pparam->data))) {
+                               gtk_option_menu_set_history(optmenu, n);
+                               return;
+                       }
+                       n++;
+               }
+       }               
+
+       gtk_option_menu_set_history(optmenu, 0);
+       prefs_dictionary_set_data_from_optmenu(pparam);
+}
+
+static void prefs_compose_checkbtn_enable_ispell_toggle_cb
+       (GtkWidget *widget,
+        gpointer data)
+{
+       gboolean toggled;
+
+       toggled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+       gtk_widget_set_sensitive(compose.entry_ispell_path, toggled);
+       gtk_widget_set_sensitive(compose.optmenu_dictionary_path, toggled);
+       gtk_widget_set_sensitive(compose.btn_ispell_path, toggled);
+}
+
+static void prefs_compose_btn_ispell_path_clicked_cb(GtkWidget *widget,
+                                                    gpointer data)
+{
+       gchar *file_path;
+       GtkWidget *new_menu;
+
+       file_path = filesel_select_file(_("Select spelling checker location"),
+                                       prefs_common.ispell_path);
+       if (file_path == NULL) {
+               /* don't change */      
+       }
+       else {
+               if (prefs_common.ispell_path)
+                       g_free(prefs_common.ispell_path);
+               prefs_common.ispell_path = file_path;                   
+
+               new_menu = gtkspell_dictionary_option_menu_new(file_path);
+               gtk_option_menu_set_menu(GTK_OPTION_MENU(compose.optmenu_dictionary_path),
+                                        new_menu);
+
+               gtk_entry_set_text(GTK_ENTRY(compose.entry_ispell_path), file_path);                                     
+               /* select first one */
+               gtk_option_menu_set_history(GTK_OPTION_MENU(compose.optmenu_dictionary_path), 0);
+               
+               prefs_common.dictionary_path = gtkspell_get_dictionary_menu_active_item(
+                               gtk_option_menu_get_menu(GTK_OPTION_MENU(compose.optmenu_dictionary_path)));
+       }
+       
+}
+
 static void prefs_compose_create(void)
 {
        GtkWidget *vbox1;
@@ -1088,10 +1233,18 @@ static void prefs_compose_create(void)
        GtkWidget *label_sigsep;
        GtkWidget *entry_sigsep;
 
+       GtkWidget *frame_autosel;
+        GtkWidget *hbox_autosel;
+        GtkWidget *vbox_autosel;
        GtkWidget *checkbtn_reply_account_autosel;
-       GtkWidget *vbox_linewrap;
-       GtkWidget *hbox3;
+       GtkWidget *checkbtn_forward_account_autosel;
+       GtkWidget *checkbtn_reedit_account_autosel;
+
+        GtkWidget *vbox_linewrap;
+
+       GtkWidget *hbox3;
        GtkWidget *hbox4;
+       GtkWidget *hbox5;
        GtkWidget *label_linewrap;
        GtkObject *spinbtn_linewrap_adj;
        GtkWidget *spinbtn_linewrap;
@@ -1101,6 +1254,18 @@ static void prefs_compose_create(void)
        GtkWidget *checkbtn_forward_as_attachment;
        GtkWidget *checkbtn_smart_wrapping;
 
+       GtkWidget *frame_spell;
+       GtkWidget *hbox_spell;
+       GtkWidget *vbox_spell;
+       GtkWidget *hbox_ispell_path;
+       GtkWidget *checkbtn_enable_ispell;
+       GtkWidget *label_ispell_path;
+       GtkWidget *entry_ispell_path;
+       GtkWidget *btn_ispell_path;
+       GtkWidget *hbox_dictionary_path;
+       GtkWidget *label_dictionary_path;
+       GtkWidget *optmenu_dictionary_path;
+
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
        gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
@@ -1139,11 +1304,13 @@ static void prefs_compose_create(void)
        gtk_box_pack_start (GTK_BOX (hbox2), label_quotefmt, FALSE, FALSE, 0);
 
        btn_quotedesc =
-               gtk_button_new_with_label (_(" Quote format "));
+               gtk_button_new_with_label (_(" Description of symbols "));
+
        gtk_widget_show (btn_quotedesc);
        gtk_box_pack_end (GTK_BOX (hbox2), btn_quotedesc, FALSE, FALSE, 0);
        gtk_signal_connect(GTK_OBJECT(btn_quotedesc), "clicked",
-                          GTK_SIGNAL_FUNC(compose_prefs_fmt_open), &cancelled);
+                          GTK_SIGNAL_FUNC(prefs_quote_description), NULL);
+
 
        scrolledwin_quotefmt = gtk_scrolled_window_new (NULL, NULL);
        gtk_widget_show (scrolledwin_quotefmt);
@@ -1182,7 +1349,6 @@ static void prefs_compose_create(void)
        hbox1 = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox1);
        gtk_box_pack_start (GTK_BOX (vbox_sig), hbox1, TRUE, TRUE, 0);
-
        label_sigsep = gtk_label_new (_("Signature separator"));
        gtk_widget_show (label_sigsep);
        gtk_box_pack_start (GTK_BOX (hbox1), label_sigsep, FALSE, FALSE, 0);
@@ -1190,8 +1356,24 @@ static void prefs_compose_create(void)
        entry_sigsep = gtk_entry_new ();
        gtk_widget_show (entry_sigsep);
        gtk_box_pack_start (GTK_BOX (hbox1), entry_sigsep, FALSE, FALSE, 0);
+
        gtk_widget_set_usize (entry_sigsep, 64, -1);
 
+        /* Automatic (Smart) Account Selection */
+       PACK_FRAME(vbox1, frame_autosel, _("Automatic Account Selection"));
+
+       hbox_autosel = gtk_hbox_new (FALSE, VSPACING_NARROW);
+       gtk_widget_show (hbox_autosel);
+       gtk_container_add (GTK_CONTAINER (frame_autosel), hbox_autosel);
+       gtk_container_set_border_width (GTK_CONTAINER (hbox_autosel), 8);
+
+        PACK_CHECK_BUTTON (hbox_autosel, checkbtn_reply_account_autosel,
+                          _("when replying"));
+       PACK_CHECK_BUTTON (hbox_autosel, checkbtn_forward_account_autosel,
+                          _("when forwarding"));
+       PACK_CHECK_BUTTON (hbox_autosel, checkbtn_reedit_account_autosel,
+                          _("when re-editing"));
+
        /* line-wrapping */
        vbox_linewrap = gtk_vbox_new (FALSE, VSPACING_NARROW);
        gtk_widget_show (vbox_linewrap);
@@ -1201,6 +1383,7 @@ static void prefs_compose_create(void)
        gtk_widget_show (hbox3);
        gtk_box_pack_start (GTK_BOX (vbox_linewrap), hbox3, FALSE, FALSE, 0);
 
+
        label_linewrap = gtk_label_new (_("Wrap messages at"));
        gtk_widget_show (label_linewrap);
        gtk_box_pack_start (GTK_BOX (hbox3), label_linewrap, FALSE, FALSE, 0);
@@ -1228,13 +1411,62 @@ static void prefs_compose_create(void)
        PACK_CHECK_BUTTON (vbox1, checkbtn_forward_as_attachment,
                           _("Forward as attachment"));
 
-       PACK_CHECK_BUTTON (vbox1, checkbtn_reply_account_autosel,
-                          _("Automatically select account for mail replies"));
-
        PACK_CHECK_BUTTON (vbox1, checkbtn_smart_wrapping,
                           _("Smart wrapping (EXPERIMENTAL)"));
 
-       /*
+       /* 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_ispell, 
+                         _("Enable spell checker"));
+
+       gtk_signal_connect(GTK_OBJECT(checkbtn_enable_ispell), "toggled",
+                          GTK_SIGNAL_FUNC(prefs_compose_checkbtn_enable_ispell_toggle_cb),
+                          NULL);
+
+       hbox_ispell_path = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show(hbox_ispell_path);
+       gtk_box_pack_start(GTK_BOX(vbox_spell), hbox_ispell_path, TRUE, TRUE, 0);
+
+       label_ispell_path = gtk_label_new (_("Ispelll path"));
+       gtk_widget_show(label_ispell_path);
+       gtk_box_pack_start(GTK_BOX(hbox_ispell_path), label_ispell_path, FALSE, FALSE, 0);
+       
+       entry_ispell_path = gtk_entry_new();
+       gtk_widget_show(entry_ispell_path);
+       gtk_box_pack_start(GTK_BOX(hbox_ispell_path), entry_ispell_path, FALSE, FALSE, 0);
+       gtk_widget_set_usize(entry_ispell_path, 150, -1);
+       gtk_widget_set_sensitive(entry_ispell_path, prefs_common.enable_ispell);
+
+       btn_ispell_path = gtk_button_new_with_label(_("..."));
+       gtk_widget_show(btn_ispell_path);
+       gtk_box_pack_start(GTK_BOX(hbox_ispell_path), btn_ispell_path, FALSE, FALSE, 0);
+       gtk_widget_set_sensitive(btn_ispell_path, prefs_common.enable_ispell);
+
+       gtk_signal_connect(GTK_OBJECT(btn_ispell_path), "clicked", 
+                          GTK_SIGNAL_FUNC(prefs_compose_btn_ispell_path_clicked_cb),
+                          NULL);
+
+       hbox_dictionary_path = gtk_hbox_new(FALSE, 8);
+       gtk_widget_show(hbox_dictionary_path);
+       gtk_box_pack_start(GTK_BOX(vbox_spell), hbox_dictionary_path, TRUE, TRUE, 0);
+
+       label_dictionary_path = gtk_label_new(_("Dictionaries"));
+       gtk_widget_show(label_dictionary_path);
+       gtk_box_pack_start(GTK_BOX(hbox_dictionary_path), label_dictionary_path, FALSE, FALSE, 0);
+
+       optmenu_dictionary_path = gtk_option_menu_new();
+       gtk_widget_show(optmenu_dictionary_path);
+       gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu_dictionary_path), 
+                                gtkspell_dictionary_option_menu_new(prefs_common.ispell_path));
+       gtk_box_pack_start(GTK_BOX(hbox_dictionary_path), optmenu_dictionary_path, FALSE, FALSE, 0);
+       gtk_widget_set_sensitive(optmenu_dictionary_path, prefs_common.enable_ispell);
+
+       /*
        compose.checkbtn_quote   = checkbtn_quote;
        compose.entry_quotemark  = entry_quotemark;
        compose.text_quotefmt    = text_quotefmt;
@@ -1242,7 +1474,9 @@ static void prefs_compose_create(void)
        compose.checkbtn_autosig = checkbtn_autosig;
        compose.entry_sigsep     = entry_sigsep;
 
-       compose.checkbtn_reply_account_autosel = checkbtn_reply_account_autosel;
+        compose.checkbtn_reply_account_autosel = checkbtn_reply_account_autosel;
+       compose.checkbtn_forward_account_autosel = checkbtn_forward_account_autosel;
+       compose.checkbtn_reedit_account_autosel = checkbtn_reedit_account_autosel;
 
        compose.spinbtn_linewrap     = spinbtn_linewrap;
        compose.spinbtn_linewrap_adj = spinbtn_linewrap_adj;
@@ -1253,6 +1487,11 @@ static void prefs_compose_create(void)
                checkbtn_forward_as_attachment;
        compose.checkbtn_smart_wrapping = 
                checkbtn_smart_wrapping;
+
+       compose.checkbtn_enable_ispell = checkbtn_enable_ispell;
+       compose.entry_ispell_path      = entry_ispell_path;
+       compose.btn_ispell_path        = btn_ispell_path;
+       compose.optmenu_dictionary_path = optmenu_dictionary_path;
 }
 
 static void prefs_display_create(void)
@@ -1270,6 +1509,8 @@ static void prefs_display_create(void)
        GtkWidget *chkbtn_swapfrom;
        GtkWidget *chkbtn_hscrollbar;
        GtkWidget *chkbtn_useaddrbook;
+       GtkWidget *chkbtn_expand_thread;
+       GtkWidget *chkbtn_bold_unread;
        GtkWidget *hbox1;
        GtkWidget *label_datefmt;
        GtkWidget *button_datefmt;
@@ -1286,6 +1527,7 @@ static void prefs_display_create(void)
        PACK_FRAME(vbox1, frame_font, _("Font"));
 
        table1 = gtk_table_new (4, 3, FALSE);
+
        gtk_widget_show (table1);
        gtk_container_add (GTK_CONTAINER (frame_font), table1);
        gtk_container_set_border_width (GTK_CONTAINER (table1), 8);
@@ -1303,7 +1545,8 @@ static void prefs_display_create(void)
        gtk_table_attach (GTK_TABLE (table1), entry_textfont, 1, 2, 0, 1,
                          (GTK_EXPAND | GTK_FILL), 0, 0, 0);
 
-       button_textfont = gtk_button_new_with_label (" ... ");
+       button_textfont = gtk_button_new_with_label ("... ");
+
        gtk_widget_show (button_textfont);
        gtk_table_attach (GTK_TABLE (table1), button_textfont, 2, 3, 0, 1,
                          0, 0, 0, 0);
@@ -1365,7 +1608,7 @@ static void prefs_display_create(void)
                          0, 0, 0, 0);
        gtk_signal_connect (GTK_OBJECT(tmpbutton), "clicked",
                                GTK_SIGNAL_FUNC(prefs_font_select), tmpentry);
-       display.entry_boldfont = tmpentry;                        
+       display.entry_boldfont = tmpentry;
 
        vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW);
        gtk_widget_show (vbox2);
@@ -1395,6 +1638,11 @@ static void prefs_display_create(void)
                 _("Display sender using address book"));
        PACK_CHECK_BUTTON
                (vbox2, chkbtn_hscrollbar, _("Enable horizontal scroll bar"));
+       PACK_CHECK_BUTTON
+               (vbox2, chkbtn_expand_thread, _("Expand threads"));
+       PACK_CHECK_BUTTON
+               (vbox2, chkbtn_bold_unread,
+                _("Display unread messages with bold font"));
 
        hbox1 = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox1);
@@ -1408,7 +1656,8 @@ static void prefs_display_create(void)
        gtk_widget_show (entry_datefmt);
        gtk_box_pack_start (GTK_BOX (hbox1), entry_datefmt, TRUE, TRUE, 0);
 
-       button_datefmt = gtk_button_new_with_label (_("... "));
+       button_datefmt = gtk_button_new_with_label ("... ");
+
        gtk_widget_show (button_datefmt);
        gtk_box_pack_start (GTK_BOX (hbox1), button_datefmt, FALSE, FALSE, 0);
        gtk_signal_connect (GTK_OBJECT (button_datefmt), "clicked",
@@ -1437,10 +1686,12 @@ static void prefs_display_create(void)
        display.chkbtn_folder_unread = chkbtn_folder_unread;
        display.chkbtn_transhdr   = chkbtn_transhdr;
 
-       display.chkbtn_swapfrom    = chkbtn_swapfrom;
-       display.chkbtn_hscrollbar  = chkbtn_hscrollbar;
-       display.chkbtn_useaddrbook = chkbtn_useaddrbook;
-       display.entry_datefmt      = entry_datefmt;
+       display.chkbtn_swapfrom      = chkbtn_swapfrom;
+       display.chkbtn_hscrollbar    = chkbtn_hscrollbar;
+       display.chkbtn_expand_thread = chkbtn_expand_thread;
+       display.chkbtn_bold_unread   = chkbtn_bold_unread;
+       display.chkbtn_useaddrbook   = chkbtn_useaddrbook;
+       display.entry_datefmt        = entry_datefmt;
 }
 
 static void prefs_message_create(void)
@@ -1730,20 +1981,22 @@ static void prefs_interface_create(void)
        GtkWidget *vbox1;
        GtkWidget *vbox2;
        GtkWidget *vbox3;
-       GtkWidget *checkbtn_emacs;
+       /* GtkWidget *checkbtn_emacs; */
        GtkWidget *checkbtn_openunread;
        GtkWidget *checkbtn_openinbox;
        GtkWidget *checkbtn_immedexec;
-       GtkWidget *checkbtn_addaddrbyclick;
-       GtkWidget *hbox;
-       GtkWidget *recvdialog_optmenu;
-       GtkWidget *recvdialog_optmenu_menu;
-       GtkWidget *recvdialog_menuitem;
+       GtkWidget *hbox1;
        GtkWidget *label;
+       GtkWidget *optmenu_recvdialog;
+       GtkWidget *menu;
+       GtkWidget *menuitem;
+
+       GtkWidget *frame_addr;
+        GtkWidget *vbox_addr;
+       GtkWidget *checkbtn_addaddrbyclick;
 
        GtkWidget *frame_exit;
        GtkWidget *vbox_exit;
-       GtkWidget *hbox1;
        GtkWidget *checkbtn_confonexit;
        GtkWidget *checkbtn_cleanonexit;
        GtkWidget *checkbtn_askonclean;
@@ -1758,11 +2011,11 @@ static void prefs_interface_create(void)
        gtk_widget_show (vbox2);
        gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);
 
-       PACK_CHECK_BUTTON (vbox2, checkbtn_emacs,
+       /* PACK_CHECK_BUTTON (vbox2, checkbtn_emacs,
                           _("Emulate the behavior of mouse operation of\n"
                             "Emacs-based mailer"));
        gtk_label_set_justify (GTK_LABEL (GTK_BIN (checkbtn_emacs)->child),
-                              GTK_JUSTIFY_LEFT);
+                              GTK_JUSTIFY_LEFT);   */
 
        PACK_CHECK_BUTTON
                (vbox2, checkbtn_openunread,
@@ -1790,12 +2043,40 @@ static void prefs_interface_create(void)
        gtk_box_pack_start (GTK_BOX (hbox1), label, FALSE, FALSE, 8);
        gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
 
+       hbox1 = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox1);
+       gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0);
+
+       label = gtk_label_new (_("Show receive dialog"));
+       gtk_widget_show (label);
+       gtk_box_pack_start (GTK_BOX (hbox1), label, FALSE, FALSE, 0);
+
+       optmenu_recvdialog = gtk_option_menu_new ();
+       gtk_widget_show (optmenu_recvdialog);
+       gtk_box_pack_start (GTK_BOX (hbox1), optmenu_recvdialog,
+                           FALSE, FALSE, 0);
+
+       menu = gtk_menu_new ();
+       MENUITEM_ADD (menu, menuitem, _("Always"), RECV_DIALOG_ALWAYS);
+       MENUITEM_ADD (menu, menuitem, _("Only if a window is active"),
+                     RECV_DIALOG_ACTIVE);
+       MENUITEM_ADD (menu, menuitem, _("Never"), RECV_DIALOG_NEVER);
+
+       gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu_recvdialog), menu);
+
+       PACK_FRAME (vbox1, frame_addr, _("Address book"));
+
+       vbox_addr = gtk_vbox_new (FALSE, VSPACING_NARROW);
+       gtk_widget_show (vbox_addr);
+       gtk_container_add (GTK_CONTAINER (frame_addr), vbox_addr);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox_addr), 8);
+
        PACK_CHECK_BUTTON
-               (vbox2, checkbtn_addaddrbyclick,
+               (vbox_addr, checkbtn_addaddrbyclick,
                 _("Add address to destination when double-clicked"));
 
        /* Receive Dialog */
-       hbox = gtk_hbox_new (FALSE, 8);
+/*     hbox = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox);
        gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
 
@@ -1813,7 +2094,7 @@ static void prefs_interface_create(void)
        MENUITEM_ADD (recvdialog_optmenu_menu, recvdialog_menuitem, _("Only if a sylpheed window is active"),  RECVDIALOG_WINDOW_ACTIVE);
        MENUITEM_ADD (recvdialog_optmenu_menu, recvdialog_menuitem, _("Never"), RECVDIALOG_NEVER);
 
-       gtk_option_menu_set_menu (GTK_OPTION_MENU (recvdialog_optmenu), recvdialog_optmenu_menu);
+       gtk_option_menu_set_menu (GTK_OPTION_MENU (recvdialog_optmenu), recvdialog_optmenu_menu);     */
 
        /* On Exit */
        PACK_FRAME (vbox1, frame_exit, _("On exit"));
@@ -1839,12 +2120,12 @@ static void prefs_interface_create(void)
        PACK_CHECK_BUTTON (vbox_exit, checkbtn_warnqueued,
                           _("Warn if there are queued messages"));
 
-       interface.checkbtn_emacs          = checkbtn_emacs;
+       /* interface.checkbtn_emacs          = checkbtn_emacs; */
        interface.checkbtn_openunread     = checkbtn_openunread;
        interface.checkbtn_openinbox      = checkbtn_openinbox;
        interface.checkbtn_immedexec      = checkbtn_immedexec;
+       interface.optmenu_recvdialog      = optmenu_recvdialog;
        interface.checkbtn_addaddrbyclick = checkbtn_addaddrbyclick;
-       interface.recvdialog_optmenu      = recvdialog_optmenu;
        interface.checkbtn_confonexit     = checkbtn_confonexit;
        interface.checkbtn_cleanonexit    = checkbtn_cleanonexit;
        interface.checkbtn_askonclean     = checkbtn_askonclean;
@@ -2026,7 +2307,8 @@ static void date_format_select_row(GtkWidget *date_format_list, gint row,
        GtkWidget *datefmt_sample;
 
        /* only on double click */
-       if (!event ||event->type != GDK_2BUTTON_PRESS) return;
+       if (!event || event->type != GDK_2BUTTON_PRESS) return;
+
 
        datefmt_sample = GTK_WIDGET(gtk_object_get_data
                                    (GTK_OBJECT(date_format), "datefmt_sample"));
@@ -2125,6 +2407,7 @@ static GtkWidget *date_format_create(GtkButton *button, void *data)
        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_selection_mode(GTK_CLIST(datefmt_clist),
                                     GTK_SELECTION_BROWSE);
 
@@ -2264,6 +2547,7 @@ static void prefs_quote_colors_dialog_create(void)
        gtk_table_set_row_spacings (GTK_TABLE (table), 2);
        gtk_table_set_col_spacings (GTK_TABLE (table), 5);
 
+
        color_buttons.quote_level1_btn = gtk_button_new();
        gtk_table_attach (GTK_TABLE (table), color_buttons.quote_level1_btn,
                          0, 1, 0, 1, 0, 0, 0, 0);
@@ -2836,6 +3120,7 @@ static void prefs_font_selection_ok(GtkButton *button, GtkEntry *entry)
 
        if (fontname) {
                gtk_entry_set_text(entry, fontname);
+
                g_free(fontname);
        }
 
@@ -2883,6 +3168,42 @@ static void prefs_common_charset_set_optmenu(PrefParam *pparam)
        prefs_common_charset_set_data_from_optmenu(pparam);
 }
 
+static void prefs_common_recv_dialog_set_data_from_optmenu(PrefParam *pparam)
+{
+       GtkWidget *menu;
+       GtkWidget *menuitem;
+
+       menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(*pparam->widget));
+       menuitem = gtk_menu_get_active(GTK_MENU(menu));
+       *((RecvDialogMode *)pparam->data) = GPOINTER_TO_INT
+               (gtk_object_get_user_data(GTK_OBJECT(menuitem)));
+}
+
+static void prefs_common_recv_dialog_set_optmenu(PrefParam *pparam)
+{
+       RecvDialogMode mode = *((RecvDialogMode *)pparam->data);
+       GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
+       GtkWidget *menu;
+       GtkWidget *menuitem;
+
+       switch (mode) {
+       case RECV_DIALOG_ALWAYS:
+               gtk_option_menu_set_history(optmenu, 0);
+               break;
+       case RECV_DIALOG_ACTIVE:
+               gtk_option_menu_set_history(optmenu, 1);
+               break;
+       case RECV_DIALOG_NEVER:
+               gtk_option_menu_set_history(optmenu, 2);
+               break;
+       default:
+       }
+
+       menu = gtk_option_menu_get_menu(optmenu);
+       menuitem = gtk_menu_get_active(GTK_MENU(menu));
+       gtk_menu_item_activate(GTK_MENU_ITEM(menuitem));
+}
+
 static gint prefs_common_deleted(GtkWidget *widget, GdkEventAny *event,
                                 gpointer data)
 {
@@ -2904,7 +3225,7 @@ static void prefs_common_ok(void)
        if (quote_desc_win && GTK_WIDGET_VISIBLE(quote_desc_win))
                gtk_widget_hide(quote_desc_win);
 
-       inc_autocheck_timer_set();
+       inc_unlock();
 }
 
 static void prefs_common_apply(void)
@@ -2912,12 +3233,15 @@ static void prefs_common_apply(void)
        prefs_set_data_from_dialog(param);
        main_window_reflect_prefs_all();
        prefs_common_save_config();
+
+       inc_autocheck_timer_remove();
+       inc_autocheck_timer_set();
 }
 
 static void prefs_common_cancel(void)
 {
        gtk_widget_hide(dialog.window);
-       inc_autocheck_timer_set();
+       inc_unlock();
 }
 
 
@@ -3102,7 +3426,7 @@ static void compose_prefs_key_pressed(GtkWidget *widget, GdkEventKey *event)
        }
 }
 
-static void prefs_recvdialog_set_data_from_optmenu(PrefParam *pparam)
+/* static void prefs_recvdialog_set_data_from_optmenu(PrefParam *pparam)
 {
        GtkWidget *menu;
        GtkWidget *menuitem;
@@ -3111,9 +3435,9 @@ static void prefs_recvdialog_set_data_from_optmenu(PrefParam *pparam)
        menuitem = gtk_menu_get_active(GTK_MENU(menu));
        *((RecvDialogShow *)pparam->data) = GPOINTER_TO_INT
                (gtk_object_get_user_data(GTK_OBJECT(menuitem)));
-}
+}  */
 
-static void prefs_recvdialog_set_optmenu(PrefParam *pparam)
+/* static void prefs_recvdialog_set_optmenu(PrefParam *pparam)
 {
        RecvDialogShow dialog_show;
        GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
@@ -3138,4 +3462,4 @@ static void prefs_recvdialog_set_optmenu(PrefParam *pparam)
        menu = gtk_option_menu_get_menu(optmenu);
        menuitem = gtk_menu_get_active(GTK_MENU(menu));
        gtk_menu_item_activate(GTK_MENU_ITEM(menuitem));
-}
+}     */