correction to English
[claws.git] / src / prefs_common.c
index 1c97a3054467a89d395c632198ff5817a35756c1..c9c3d59ffb27ef429e51544a57e6245104d5b5ce 100644 (file)
 #include "gtkutils.h"
 #include "alertpanel.h"
 #include "folder.h"
-#include "gtkspell.h"
 #include "filesel.h"
 #include "folderview.h"
 
+#if USE_PSPELL
+#include "gtkspell.h"
+#endif
+
 PrefsCommon prefs_common;
 
 static PrefsDialog dialog;
@@ -102,6 +105,7 @@ static struct Compose {
        GtkWidget *entry_fw_quotemark;
        GtkWidget *text_fw_quotefmt;
 
+       GtkWidget *checkbtn_autoextedit;
        GtkWidget *checkbtn_reply_account_autosel;
        GtkWidget *checkbtn_forward_account_autosel;
        GtkWidget *checkbtn_reedit_account_autosel;
@@ -113,12 +117,16 @@ static struct Compose {
 
        GtkWidget * checkbtn_forward_as_attachment;
        GtkWidget * checkbtn_smart_wrapping;
+       GtkWidget * checkbtn_block_cursor;
 
        /* spelling */
-       GtkWidget *checkbtn_enable_ispell;
-       GtkWidget *entry_ispell_path;
-       GtkWidget *btn_ispell_path;
-       GtkWidget *optmenu_dictionary_path;
+#if USE_PSPELL
+       GtkWidget *checkbtn_enable_pspell;
+       GtkWidget *entry_pspell_path;
+       GtkWidget *btn_pspell_path;
+       GtkWidget *optmenu_dictionary;
+#endif
+
 } compose;
 
 static struct Display {
@@ -181,6 +189,7 @@ static struct Interface {
        GtkWidget *checkbtn_warnqueued;
        GtkWidget *checkbtn_addaddrbyclick;
        GtkWidget *optmenu_recvdialog;
+       GtkWidget *optmenu_nextunreadmsgdialog;
 } interface;
 
 static struct Other {
@@ -214,9 +223,13 @@ static void prefs_common_default_signkey_set_optmenu       (PrefParam *pparam);
 #endif
 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_nextunreadmsgdialog_set_data_from_optmenu(PrefParam *pparam);
+static void prefs_nextunreadmsgdialog_set_optmenu(PrefParam *pparam);
 
+#if USE_PSPELL
 static void prefs_dictionary_set_data_from_optmenu(PrefParam *param);
 static void prefs_dictionary_set_optmenu(PrefParam *pparam);
+#endif
 
 
 /*
@@ -231,7 +244,7 @@ static PrefParam param[] = {
        {"use_ext_inc", "FALSE", &prefs_common.use_extinc, P_BOOL,
         &receive.checkbtn_incext,
         prefs_set_data_from_toggle, prefs_set_toggle},
-       {"ext_inc_path", DEFAULT_INC_PATH, &prefs_common.extinc_path, P_STRING,
+       {"ext_inc_path", DEFAULT_INC_PATH, &prefs_common.extinc_cmd, P_STRING,
         &receive.entry_incext,
         prefs_set_data_from_entry, prefs_set_entry},
 
@@ -305,6 +318,9 @@ static PrefParam param[] = {
        {"signature_separator", "-- ", &prefs_common.sig_sep, P_STRING,
         &compose.entry_sigsep, prefs_set_data_from_entry, prefs_set_entry},
 
+       {"auto_ext_editor", "FALSE", &prefs_common.auto_exteditor, P_BOOL,
+        &compose.checkbtn_autoextedit,
+        prefs_set_data_from_toggle, prefs_set_toggle},
         {"reply_account_autoselect", "TRUE",
         &prefs_common.reply_account_autosel, P_BOOL,
         &compose.checkbtn_reply_account_autosel,
@@ -334,16 +350,20 @@ 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,
+       {"block_cursor", "FALSE", &prefs_common.block_cursor,
+        P_BOOL, &compose.checkbtn_block_cursor,
+        prefs_set_data_from_toggle, prefs_set_toggle},
+#if USE_PSPELL
+       {"enable_pspell", "TRUE", &prefs_common.enable_pspell,
+        P_BOOL, &compose.checkbtn_enable_pspell,
         prefs_set_data_from_toggle, prefs_set_toggle},
-       {"ispell_path", ISPELL_PATH, &prefs_common.ispell_path, 
-        P_STRING, &compose.entry_ispell_path, 
+       {"pspell_path", "/usr/local/share/pspell/", &prefs_common.pspell_path, 
+        P_STRING, &compose.entry_pspell_path, 
         prefs_set_data_from_entry, prefs_set_entry},
-       {"dictionary_path",  "", &prefs_common.dictionary_path,
-        P_STRING, &compose.optmenu_dictionary_path
+       {"dictionary",  "", &prefs_common.dictionary,
+        P_STRING, &compose.optmenu_dictionary, 
         prefs_dictionary_set_data_from_optmenu, prefs_dictionary_set_optmenu },
-
+#endif
        {"show_ruler", "TRUE", &prefs_common.show_ruler, P_BOOL,
         NULL, NULL, NULL},
 
@@ -592,6 +612,10 @@ static PrefParam param[] = {
         &interface.optmenu_recvdialog,
         prefs_common_recv_dialog_set_data_from_optmenu,
         prefs_common_recv_dialog_set_optmenu},
+       {"nextunreadmsg_dialog", NULL, &prefs_common.next_unread_msg_dialog, P_ENUM,
+        &interface.optmenu_nextunreadmsgdialog,
+        prefs_nextunreadmsgdialog_set_data_from_optmenu,
+        prefs_nextunreadmsgdialog_set_optmenu},
 
        {"add_address_by_click", "FALSE", &prefs_common.add_address_by_click,
         P_BOOL, &interface.checkbtn_addaddrbyclick,
@@ -905,7 +929,7 @@ static void prefs_receive_create(void)
        PACK_CHECK_BUTTON (hbox_autochk, checkbtn_autochk,
                           _("Auto-check new mail"));
 
-       label_autochk1 = gtk_label_new (_("each"));
+       label_autochk1 = gtk_label_new (_("every"));
        gtk_widget_show (label_autochk1);
        gtk_box_pack_start (GTK_BOX (hbox_autochk), label_autochk1, FALSE, FALSE, 0);
 
@@ -1108,22 +1132,23 @@ static void prefs_send_create(void)
        send.optmenu_charset = optmenu;
 }
 
+#if USE_PSPELL
 static void prefs_dictionary_set_data_from_optmenu(PrefParam *param)
 {
        gchar *str;
-       gchar *dict_path;
+       gchar *dict_name;
        
        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
+       dict_name = gtkpspell_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;
+       *((gchar **) param->data) = dict_name;
 }
 
 static void prefs_dictionary_set_optmenu(PrefParam *pparam)
@@ -1132,7 +1157,7 @@ static void prefs_dictionary_set_optmenu(PrefParam *pparam)
        GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
        GtkWidget *menu;
        GtkWidget *menuitem;
-       gchar *dict_path;
+       gchar *dict_name;
        gint n = 0;
 
        g_return_if_fail(optmenu != NULL);
@@ -1143,8 +1168,8 @@ static void prefs_dictionary_set_optmenu(PrefParam *pparam)
                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))) {
+                       dict_name = gtk_object_get_data(GTK_OBJECT(menuitem), "dict_name");
+                       if (!strcmp2(dict_name, *((gchar **)pparam->data))) {
                                gtk_option_menu_set_history(optmenu, n);
                                return;
                        }
@@ -1156,51 +1181,58 @@ static void prefs_dictionary_set_optmenu(PrefParam *pparam)
        prefs_dictionary_set_data_from_optmenu(pparam);
 }
 
-static void prefs_compose_checkbtn_enable_ispell_toggle_cb
+static void prefs_compose_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_ispell_path, toggled);
-       gtk_widget_set_sensitive(compose.optmenu_dictionary_path, toggled);
-       gtk_widget_set_sensitive(compose.btn_ispell_path, toggled);
+       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);
 }
 
-static void prefs_compose_btn_ispell_path_clicked_cb(GtkWidget *widget,
+static void prefs_compose_btn_pspell_path_clicked_cb(GtkWidget *widget,
                                                     gpointer data)
 {
-       gchar *file_path;
+       gchar *file_path, *tmp;
        GtkWidget *new_menu;
 
-       file_path = filesel_select_file(_("Select spelling checker location"),
-                                       prefs_common.ispell_path);
+       file_path = filesel_select_file(_("Select dictionaries location"),
+                                       prefs_common.pspell_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),
+         tmp=g_dirname(file_path);
+         
+               if (prefs_common.pspell_path)
+                       g_free(prefs_common.pspell_path);
+               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),
                                         new_menu);
 
-               gtk_entry_set_text(GTK_ENTRY(compose.entry_ispell_path), file_path);                                     
+               gtk_entry_set_text(GTK_ENTRY(compose.entry_pspell_path), prefs_common.pspell_path);                                      
                /* select first one */
-               gtk_option_menu_set_history(GTK_OPTION_MENU(compose.optmenu_dictionary_path), 0);
+               gtk_option_menu_set_history(GTK_OPTION_MENU(compose.optmenu_dictionary), 0);
                
-               prefs_common.dictionary_path = gtkspell_get_dictionary_menu_active_item(
-                               gtk_option_menu_get_menu(GTK_OPTION_MENU(compose.optmenu_dictionary_path)));
-       }
+               prefs_common.dictionary = gtkpspell_get_dictionary_menu_active_item(
+                               gtk_option_menu_get_menu(GTK_OPTION_MENU(compose.optmenu_dictionary)));
+               g_free(tmp);
        
+
+       }
 }
+#endif
 
 static void prefs_compose_create(void)
 {
        GtkWidget *vbox1;
+        GtkWidget *vbox2;
+        GtkWidget *vbox3;
 
        /*
        GtkWidget *frame_quote;
@@ -1233,6 +1265,8 @@ static void prefs_compose_create(void)
        GtkWidget *checkbtn_forward_account_autosel;
        GtkWidget *checkbtn_reedit_account_autosel;
 
+       GtkWidget *checkbtn_autoextedit;
+
         GtkWidget *vbox_linewrap;
 
        GtkWidget *hbox3;
@@ -1246,19 +1280,21 @@ static void prefs_compose_create(void)
 
        GtkWidget *checkbtn_forward_as_attachment;
        GtkWidget *checkbtn_smart_wrapping;
+       GtkWidget *checkbtn_block_cursor;
 
+#if USE_PSPELL
        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;
-
+       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);
@@ -1272,22 +1308,26 @@ static void prefs_compose_create(void)
        gtk_container_add (GTK_CONTAINER (frame_quote), vbox_quote);
        gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
 
-       PACK_CHECK_BUTTON (vbox_quote, checkbtn_quote,
-                          _("Quote message when replying"));
-
-       hbox1 = gtk_hbox_new (FALSE, 8);
+       hbox1 = gtk_hbox_new (FALSE, 32);
        gtk_widget_show (hbox1);
-       gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, TRUE, TRUE, 0);
+       gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, FALSE, FALSE, 0);
+
+       hbox2 = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox2);
+       gtk_box_pack_start (GTK_BOX (hbox1), hbox2, FALSE, FALSE, 0);
 
        label_quotemark = gtk_label_new (_("Quotation mark"));
        gtk_widget_show (label_quotemark);
-       gtk_box_pack_start (GTK_BOX (hbox1), label_quotemark, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX (hbox2), label_quotemark, FALSE, FALSE, 0);
 
        entry_quotemark = gtk_entry_new ();
        gtk_widget_show (entry_quotemark);
-       gtk_box_pack_start (GTK_BOX (hbox1), entry_quotemark, FALSE, FALSE, 0);
+       gtk_box_pack_start (GTK_BOX (hbox2), entry_quotemark, FALSE, FALSE, 0);
        gtk_widget_set_usize (entry_quotemark, 64, -1);
 
+       PACK_CHECK_BUTTON (hbox1, checkbtn_quote,
+                          _("Quote message when replying"));
+
        hbox2 = gtk_hbox_new (FALSE, 0);
        gtk_widget_show (hbox2);
        gtk_box_pack_start (GTK_BOX (vbox_quote), hbox2, TRUE, TRUE, 0);
@@ -1367,7 +1407,16 @@ static void prefs_compose_create(void)
        PACK_CHECK_BUTTON (hbox_autosel, checkbtn_reedit_account_autosel,
                           _("when re-editing"));
 
-       /* line-wrapping */
+       vbox2 = gtk_vbox_new (FALSE, 0);
+       gtk_widget_show (vbox2);
+       gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);
+
+       PACK_CHECK_BUTTON (vbox2, checkbtn_autoextedit,
+                          _("Automatically launch the external editor"));
+
+       PACK_VSPACER (vbox2, vbox3, VSPACING_NARROW_2);
+
+        /* line-wrapping */
        vbox_linewrap = gtk_vbox_new (FALSE, VSPACING_NARROW);
        gtk_widget_show (vbox_linewrap);
        gtk_box_pack_start (GTK_BOX (vbox1), vbox_linewrap, FALSE, FALSE, 0);
@@ -1393,6 +1442,8 @@ static void prefs_compose_create(void)
        gtk_widget_show (label_linewrap);
        gtk_box_pack_start (GTK_BOX (hbox3), label_linewrap, FALSE, FALSE, 0);
 
+       PACK_VSPACER (vbox2, vbox3, VSPACING_NARROW_2);
+
        hbox4 = gtk_hbox_new (FALSE, 32);
        gtk_widget_show (hbox4);
        gtk_box_pack_start (GTK_BOX (vbox_linewrap), hbox4, FALSE, FALSE, 0);
@@ -1406,7 +1457,11 @@ static void prefs_compose_create(void)
 
        PACK_CHECK_BUTTON (vbox1, checkbtn_smart_wrapping,
                           _("Smart wrapping (EXPERIMENTAL)"));
+       
+       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);
@@ -1414,50 +1469,51 @@ static void prefs_compose_create(void)
        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"));
+       PACK_CHECK_BUTTON(vbox_spell, checkbtn_enable_pspell, 
+                         _("Enable spell checker (EXPERIMENTAL)"));
 
-       gtk_signal_connect(GTK_OBJECT(checkbtn_enable_ispell), "toggled",
-                          GTK_SIGNAL_FUNC(prefs_compose_checkbtn_enable_ispell_toggle_cb),
+       gtk_signal_connect(GTK_OBJECT(checkbtn_enable_pspell), "toggled",
+                          GTK_SIGNAL_FUNC(prefs_compose_checkbtn_enable_pspell_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);
+       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_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);
+       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_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),
+       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);
 
-       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);
+       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);
 
-       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);
+       label_dictionary = gtk_label_new(_("Dictionary"));
+       gtk_widget_show(label_dictionary);
+       gtk_box_pack_start(GTK_BOX(hbox_dictionary), label_dictionary, 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);
+       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
 
        /*
        compose.checkbtn_quote   = checkbtn_quote;
@@ -1467,6 +1523,7 @@ static void prefs_compose_create(void)
        compose.checkbtn_autosig = checkbtn_autosig;
        compose.entry_sigsep     = entry_sigsep;
 
+       compose.checkbtn_autoextedit = checkbtn_autoextedit;
         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;
@@ -1480,11 +1537,15 @@ 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;
+       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_display_create(void)
@@ -1997,6 +2058,11 @@ static void prefs_interface_create(void)
        GtkWidget *checkbtn_askonclean;
        GtkWidget *checkbtn_warnqueued;
 
+       GtkWidget *hbox2;
+       GtkWidget *optmenu_nextunreadmsgdialog;
+       GtkWidget *optmenu_nextunreadmsgdialog_menu;
+       GtkWidget *nextunreadmsgdialog_menuitem;
+
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
        gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
@@ -2072,6 +2138,32 @@ static void prefs_interface_create(void)
                (vbox_addr, checkbtn_addaddrbyclick,
                 _("Add address to destination when double-clicked"));
 
+       /* Next Unread Message Dialog */
+       hbox2 = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox2);
+       gtk_box_pack_start (GTK_BOX (vbox2), hbox2, FALSE, FALSE, 0);
+
+       label = gtk_label_new (_("Show no-unread-message dialog"));
+       gtk_widget_show (label);
+       gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
+
+       optmenu_nextunreadmsgdialog = gtk_option_menu_new ();
+       gtk_widget_show (optmenu_nextunreadmsgdialog);
+       gtk_box_pack_start (GTK_BOX (hbox2), optmenu_nextunreadmsgdialog,
+                           FALSE, FALSE, 0);
+
+       optmenu_nextunreadmsgdialog_menu = gtk_menu_new ();
+       MENUITEM_ADD (optmenu_nextunreadmsgdialog_menu, nextunreadmsgdialog_menuitem,
+                     _("Always"),  NEXTUNREADMSGDIALOG_ALWAYS);
+       MENUITEM_ADD (optmenu_nextunreadmsgdialog_menu, nextunreadmsgdialog_menuitem,
+                     _("Assume 'Yes'"),  NEXTUNREADMSGDIALOG_ASSUME_YES);
+       MENUITEM_ADD (optmenu_nextunreadmsgdialog_menu, nextunreadmsgdialog_menuitem,
+                     _("Assume 'No'"), NEXTUNREADMSGDIALOG_ASSUME_NO);
+
+       gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu_nextunreadmsgdialog),
+                                 optmenu_nextunreadmsgdialog_menu);
+
+
        /* Receive Dialog */
 /*     hbox = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox);
@@ -2118,15 +2210,16 @@ static void prefs_interface_create(void)
                           _("Warn if there are queued messages"));
 
        /* 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.checkbtn_confonexit     = checkbtn_confonexit;
-       interface.checkbtn_cleanonexit    = checkbtn_cleanonexit;
-       interface.checkbtn_askonclean     = checkbtn_askonclean;
-       interface.checkbtn_warnqueued     = checkbtn_warnqueued;
+       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.optmenu_nextunreadmsgdialog = optmenu_nextunreadmsgdialog;
+       interface.checkbtn_confonexit         = checkbtn_confonexit;
+       interface.checkbtn_cleanonexit        = checkbtn_cleanonexit;
+       interface.checkbtn_askonclean         = checkbtn_askonclean;
+       interface.checkbtn_warnqueued         = checkbtn_warnqueued;
 }
 
 static void prefs_other_create(void)
@@ -2211,6 +2304,7 @@ static void prefs_other_create(void)
        gtk_box_pack_start (GTK_BOX (hbox1), exteditor_combo, TRUE, TRUE, 0);
        gtkut_combo_set_items (GTK_COMBO (exteditor_combo),
                               "gedit %s",
+                              "kedit %s",
                               "mgedit --no-fork %s",
                               "emacs %s",
                               "xemacs %s",
@@ -3235,6 +3329,44 @@ static void prefs_common_apply(void)
        inc_autocheck_timer_set();
 }
 
+static void prefs_nextunreadmsgdialog_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));
+       *((NextUnreadMsgDialogShow *)pparam->data) = GPOINTER_TO_INT
+               (gtk_object_get_user_data(GTK_OBJECT(menuitem)));
+}
+
+static void prefs_nextunreadmsgdialog_set_optmenu(PrefParam *pparam)
+{
+       NextUnreadMsgDialogShow dialog_show;
+       GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
+       GtkWidget *menu;
+       GtkWidget *menuitem;
+
+       dialog_show = *((NextUnreadMsgDialogShow *)pparam->data);
+
+       switch (dialog_show) {
+       case NEXTUNREADMSGDIALOG_ALWAYS:
+               gtk_option_menu_set_history(optmenu, 0);
+               break;
+       case NEXTUNREADMSGDIALOG_ASSUME_YES:
+               gtk_option_menu_set_history(optmenu, 1);
+               break;
+       case NEXTUNREADMSGDIALOG_ASSUME_NO:
+               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 void prefs_common_cancel(void)
 {
        gtk_widget_hide(dialog.window);