Made some debug info not translatable and few code cleanups
[claws.git] / src / prefs_common.c
index 957bbc3161f91e2db2d11e5ee215f1534bf69558..e91ca172b5fefafa8a5a86854f2b6b9ce422fa77 100644 (file)
@@ -78,7 +78,6 @@ static struct Receive {
        GtkObject *spinbtn_autochk_adj;
 
        GtkWidget *checkbtn_chkonstartup;
-       GtkWidget *checkbtn_noerrorpanel;
        GtkWidget *checkbtn_scan_after_inc;
 
 
@@ -100,9 +99,7 @@ static struct Send {
        GtkWidget *checkbtn_queuemsg;
 
        GtkWidget *optmenu_charset;
-       
-       GtkWidget *checkbtn_returnreceipt;
-} send;
+} p_send;
 
 static struct Compose {
        GtkWidget *checkbtn_autosig;
@@ -114,15 +111,15 @@ static struct Compose {
        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;
-
        GtkWidget *spinbtn_linewrap;
        GtkObject *spinbtn_linewrap_adj;
        GtkWidget *checkbtn_wrapquote;
+       GtkWidget *checkbtn_autowrap;
        GtkWidget *checkbtn_wrapatsend;
 
+       GtkWidget *checkbtn_reply_account_autosel;
+       GtkWidget *checkbtn_forward_account_autosel;
+       GtkWidget *checkbtn_reedit_account_autosel;
        GtkWidget *checkbtn_quote;
        GtkWidget *checkbtn_forward_as_attachment;
        GtkWidget *checkbtn_redirect_keep_from;
@@ -204,17 +201,18 @@ static struct Privacy {
        GtkObject *spinbtn_store_passphrase_adj;
        GtkWidget *checkbtn_passphrase_grab;
        GtkWidget *checkbtn_gpg_warning;
-       GtkWidget *optmenu_default_signkey;
 } privacy;
 #endif
 
 static struct Interface {
        /* GtkWidget *checkbtn_emacs; */
+       GtkWidget *checkbtn_show_msg_with_cursor;
        GtkWidget *checkbtn_openunread;
        GtkWidget *checkbtn_openinbox;
        GtkWidget *checkbtn_immedexec;
        GtkWidget *checkbtn_addaddrbyclick;
        GtkWidget *optmenu_recvdialog;
+       GtkWidget *checkbtn_no_recv_err_panel;
        GtkWidget *optmenu_nextunreadmsgdialog;
        GtkWidget *entry_pixmap_theme;
        GtkWidget *combo_pixmap_theme;
@@ -255,11 +253,6 @@ static GtkWidget *color_dialog;
 
 static void prefs_common_charset_set_data_from_optmenu(PrefParam *pparam);
 static void prefs_common_charset_set_optmenu         (PrefParam *pparam);
-#if USE_GPGME
-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_common_recv_dialog_newmail_notify_toggle_cb  (GtkWidget *w,
                                                                 gpointer data);
 static void prefs_common_recv_dialog_set_data_from_optmenu(PrefParam *pparam);
@@ -310,9 +303,6 @@ static PrefParam param[] = {
        {"check_on_startup", "FALSE", &prefs_common.chk_on_startup, P_BOOL,
         &receive.checkbtn_chkonstartup,
         prefs_set_data_from_toggle, prefs_set_toggle},
-       {"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},
@@ -332,20 +322,20 @@ static PrefParam param[] = {
 
        /* Send */
        {"use_ext_sendmail", "FALSE", &prefs_common.use_extsend, P_BOOL,
-        &send.checkbtn_extsend,
+        &p_send.checkbtn_extsend,
         prefs_set_data_from_toggle, prefs_set_toggle},
        {"ext_sendmail_cmd", DEFAULT_SENDMAIL_CMD,
         &prefs_common.extsend_cmd, P_STRING,
-        &send.entry_extsend, prefs_set_data_from_entry, prefs_set_entry},
+        &p_send.entry_extsend, prefs_set_data_from_entry, prefs_set_entry},
        {"save_message", "TRUE", &prefs_common.savemsg, P_BOOL,
-        &send.checkbtn_savemsg,
+        &p_send.checkbtn_savemsg,
         prefs_set_data_from_toggle, prefs_set_toggle},
        {"queue_message", "FALSE", &prefs_common.queue_msg, P_BOOL,
-        &send.checkbtn_queuemsg,
+        &p_send.checkbtn_queuemsg,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
        {"outgoing_charset", CS_AUTO, &prefs_common.outgoing_charset, P_STRING,
-        &send.optmenu_charset,
+        &p_send.optmenu_charset,
         prefs_common_charset_set_data_from_optmenu,
         prefs_common_charset_set_optmenu},
 
@@ -379,6 +369,9 @@ static PrefParam param[] = {
        {"linewrap_quotation", "FALSE", &prefs_common.linewrap_quote, P_BOOL,
         &compose.checkbtn_wrapquote,
         prefs_set_data_from_toggle, prefs_set_toggle},
+       {"linewrap_auto", "FALSE", &prefs_common.autowrap, P_BOOL,
+        &compose.checkbtn_autowrap,
+        prefs_set_data_from_toggle, prefs_set_toggle},
        {"linewrap_before_sending", "FALSE",
         &prefs_common.linewrap_at_send, P_BOOL,
         &compose.checkbtn_wrapatsend,
@@ -508,12 +501,15 @@ static PrefParam param[] = {
 
        {"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,
         NULL, NULL, NULL},
 
+       {"folderview_vscrollbar_policy", "0",
+        &prefs_common.folderview_vscrollbar_policy, P_ENUM,
+        NULL, NULL, NULL},
+
        {"summary_col_show_mark", "TRUE",
         &prefs_common.summary_col_visible[S_COL_MARK], P_BOOL, NULL, NULL, NULL},
        {"summary_col_show_unread", "TRUE",
@@ -692,8 +688,9 @@ static PrefParam param[] = {
        {"store_passphrase", "FALSE", &prefs_common.store_passphrase, P_BOOL,
         &privacy.checkbtn_store_passphrase,
         prefs_set_data_from_toggle, prefs_set_toggle},
-       {"store_passphrase_timeout", "0", &prefs_common.store_passphrase_timeout,
-        P_INT, &privacy.spinbtn_store_passphrase, 
+       {"store_passphrase_timeout", "0",
+        &prefs_common.store_passphrase_timeout, P_INT,
+        &privacy.spinbtn_store_passphrase,
         prefs_set_data_from_spinbtn, prefs_set_spinbtn},
 #ifndef __MINGW32__
        {"passphrase_grab", "FALSE", &prefs_common.passphrase_grab, P_BOOL,
@@ -703,10 +700,6 @@ static PrefParam param[] = {
        {"gpg_warning", "TRUE", &prefs_common.gpg_warning, P_BOOL,
         &privacy.checkbtn_gpg_warning,
         prefs_set_data_from_toggle, prefs_set_toggle},
-       {"default_signkey", CS_AUTO, &prefs_common.default_signkey, P_STRING,
-        &privacy.optmenu_default_signkey,
-        prefs_common_default_signkey_set_data_from_optmenu,
-        prefs_common_default_signkey_set_optmenu},
 #endif /* USE_GPGME */
 
        /* Interface */
@@ -717,7 +710,10 @@ static PrefParam param[] = {
 
        /* {"emulate_emacs", "FALSE", &prefs_common.emulate_emacs, P_BOOL,
         NULL, NULL, NULL}, */
-
+       {"show_message_with_cursor_key", "FALSE",
+        &prefs_common.show_msg_with_cursor_key,
+        P_BOOL, &interface.checkbtn_show_msg_with_cursor,
+        prefs_set_data_from_toggle, prefs_set_toggle},
        {"open_unread_on_enter", "FALSE", &prefs_common.open_unread_on_enter,
         P_BOOL, &interface.checkbtn_openunread,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -731,6 +727,9 @@ static PrefParam param[] = {
         &interface.optmenu_recvdialog,
         prefs_common_recv_dialog_set_data_from_optmenu,
         prefs_common_recv_dialog_set_optmenu},
+       {"no_receive_error_panel", "FALSE", &prefs_common.no_recv_err_panel,
+        P_BOOL, &interface.checkbtn_no_recv_err_panel,
+        prefs_set_data_from_toggle, prefs_set_toggle},
        {"nextunreadmsg_dialog", NULL, &prefs_common.next_unread_msg_dialog, P_ENUM,
         &interface.optmenu_nextunreadmsgdialog,
         prefs_nextunreadmsgdialog_set_data_from_optmenu,
@@ -756,9 +755,6 @@ static PrefParam param[] = {
        {"confirm_on_exit", "TRUE", &prefs_common.confirm_on_exit, P_BOOL,
         &other.checkbtn_confonexit,
         prefs_set_data_from_toggle, prefs_set_toggle},
-       {"send_return_receipt", "TRUE", &prefs_common.return_receipt, P_BOOL,
-        &send.checkbtn_returnreceipt,
-        prefs_set_data_from_toggle, prefs_set_toggle},
        {"clean_trash_on_exit", "FALSE", &prefs_common.clean_on_exit, P_BOOL,
         &other.checkbtn_cleanonexit,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -782,6 +778,11 @@ static PrefParam param[] = {
         &other.loglength_entry,
         prefs_set_data_from_entry, prefs_set_entry},
 
+       {"cache_max_mem_usage", "4096", &prefs_common.cache_max_mem_usage, P_INT,
+        NULL, NULL, NULL},
+       {"cache_min_keep_time", "15", &prefs_common.cache_min_keep_time, P_INT,
+        NULL, NULL, NULL},
+
        {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };
 
@@ -1021,7 +1022,6 @@ static void prefs_receive_create(void)
        GtkWidget *spinbtn_autochk;
        GtkWidget *label_autochk2;
        GtkWidget *checkbtn_chkonstartup;
-       GtkWidget *checkbtn_noerrorpanel;
        GtkWidget *checkbtn_scan_after_inc;
 
 
@@ -1135,9 +1135,6 @@ static void prefs_receive_create(void)
 
        PACK_CHECK_BUTTON (vbox2, checkbtn_chkonstartup,
                           _("Check new mail on startup"));
-
-       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"));
 
@@ -1168,7 +1165,7 @@ static void prefs_receive_create(void)
        gtk_box_pack_start (GTK_BOX (vbox2), hbox_newmail_notify, FALSE, 
                            FALSE, 0);
 
-       label_newmail_notify_cmd = gtk_label_new (_("Command  to execute:\n"
+       label_newmail_notify_cmd = gtk_label_new (_("Command to execute:\n"
                                                    "(use %d as number of new "
                                                    "mails)"));
        gtk_label_set_justify(GTK_LABEL(label_newmail_notify_cmd), 
@@ -1224,7 +1221,6 @@ static void prefs_receive_create(void)
        receive.spinbtn_autochk_adj = spinbtn_autochk_adj;
 
        receive.checkbtn_chkonstartup = checkbtn_chkonstartup;
-       receive.checkbtn_noerrorpanel = checkbtn_noerrorpanel;
        receive.checkbtn_scan_after_inc = checkbtn_scan_after_inc;
 
 
@@ -1254,7 +1250,6 @@ static void prefs_send_create(void)
        GtkWidget *optmenu;
        GtkWidget *optmenu_menu;
        GtkWidget *menuitem;
-       GtkWidget *checkbtn_returnreceipt;
        GtkWidget *label_charset_desc;
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
@@ -1299,8 +1294,6 @@ static void prefs_send_create(void)
                           _("Save sent messages to Sent"));
        PACK_CHECK_BUTTON (vbox2, checkbtn_queuemsg,
                           _("Queue messages that fail to send"));
-       PACK_CHECK_BUTTON (vbox2, checkbtn_returnreceipt,
-                          _("Send return receipt on request"));
 
        hbox1 = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox1);
@@ -1370,15 +1363,14 @@ static void prefs_send_create(void)
                            FALSE, FALSE, 0);
        gtk_label_set_justify(GTK_LABEL (label_charset_desc), GTK_JUSTIFY_LEFT);
 
-       send.checkbtn_extsend = checkbtn_extsend;
-       send.entry_extsend    = entry_extsend;
-       /* send.button_extsend   = button_extsend; */
+       p_send.checkbtn_extsend = checkbtn_extsend;
+       p_send.entry_extsend    = entry_extsend;
+       /* p_send.button_extsend   = button_extsend; */
 
-       send.checkbtn_savemsg  = checkbtn_savemsg;
-       send.checkbtn_queuemsg = checkbtn_queuemsg;
-       send.checkbtn_returnreceipt = checkbtn_returnreceipt;
+       p_send.checkbtn_savemsg  = checkbtn_savemsg;
+       p_send.checkbtn_queuemsg = checkbtn_queuemsg;
 
-       send.optmenu_charset = optmenu;
+       p_send.optmenu_charset = optmenu;
 }
 
 static void prefs_common_recv_dialog_newmail_notify_toggle_cb(GtkWidget *w, gpointer data)
@@ -1680,10 +1672,7 @@ static void prefs_compose_create(void)
 {
        GtkWidget *vbox1;
        GtkWidget *vbox2;
-       GtkWidget *vbox3;
        GtkWidget *hbox1;
-       GtkWidget *hbox2;
-       GtkWidget *btn_quotefmt;
 
        GtkWidget *frame_sig;
        GtkWidget *vbox_sig;
@@ -1691,13 +1680,10 @@ static void prefs_compose_create(void)
        GtkWidget *label_sigsep;
        GtkWidget *entry_sigsep;
 
-       GtkWidget *frame_editor;
-       GtkWidget *hbox_editor;
        GtkWidget *checkbtn_autoextedit;
 
        GtkWidget *frame_autosel;
        GtkWidget *hbox_autosel;
-       GtkWidget *vbox_autosel;
        GtkWidget *checkbtn_reply_account_autosel;
        GtkWidget *checkbtn_forward_account_autosel;
        GtkWidget *checkbtn_reedit_account_autosel;
@@ -1716,10 +1702,9 @@ static void prefs_compose_create(void)
        GtkObject *spinbtn_linewrap_adj;
        GtkWidget *spinbtn_linewrap;
        GtkWidget *checkbtn_wrapquote;
+       GtkWidget *checkbtn_autowrap;
        GtkWidget *checkbtn_wrapatsend;
 
-       GtkWidget *frame_reply;
-       GtkWidget *checkbtn_quote;
        GtkWidget *checkbtn_forward_as_attachment;
        GtkWidget *checkbtn_redirect_keep_from;
        GtkWidget *checkbtn_smart_wrapping;
@@ -1731,20 +1716,6 @@ static void prefs_compose_create(void)
        gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
        gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
 
-
-
-       hbox1 = gtk_hbox_new (FALSE, 32);
-       gtk_widget_show (hbox1);
-
-       hbox2 = gtk_hbox_new (FALSE, 8);
-       gtk_widget_show (hbox2);
-       gtk_box_pack_start (GTK_BOX (hbox1), hbox2, FALSE, FALSE, 0);
-
-
-       hbox1 = gtk_hbox_new (FALSE, 32);
-       gtk_widget_show (hbox1);
-       gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
-
        PACK_FRAME(vbox1, frame_sig, _("Signature"));
 
        vbox_sig = gtk_vbox_new (FALSE, VSPACING_NARROW);
@@ -1790,9 +1761,7 @@ static void prefs_compose_create(void)
        PACK_CHECK_BUTTON (vbox2, checkbtn_autoextedit,
                           _("Automatically launch the external editor"));
 
-       PACK_VSPACER (vbox2, vbox3, VSPACING_NARROW_2);
-
-       hbox5 = gtk_hbox_new (FALSE, 32);
+       hbox5 = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox5);
        gtk_box_pack_start (GTK_BOX (vbox2), hbox5, FALSE, FALSE, 0);
 
@@ -1821,8 +1790,6 @@ static void prefs_compose_create(void)
        gtk_widget_set_usize (spinbtn_undolevel, 64, -1);
        gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_undolevel), TRUE);
 
-       PACK_VSPACER (vbox2, vbox3, VSPACING_NARROW_2);
-
         /* line-wrapping */
        PACK_FRAME(vbox1, frame_msgwrap, _("Message wrapping"));
 
@@ -1852,13 +1819,14 @@ 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);
+       hbox4 = gtk_hbox_new (FALSE, VSPACING);
        gtk_widget_show (hbox4);
        gtk_box_pack_start (GTK_BOX (vbox_linewrap), hbox4, FALSE, FALSE, 0);
 
        PACK_CHECK_BUTTON (hbox4, checkbtn_wrapquote, _("Wrap quotation"));
+
+       PACK_CHECK_BUTTON (hbox4, checkbtn_autowrap, _("Wrap on input"));
+
        PACK_CHECK_BUTTON
                (hbox4, checkbtn_wrapatsend, _("Wrap before sending"));
 
@@ -1885,6 +1853,7 @@ static void prefs_compose_create(void)
        compose.spinbtn_linewrap     = spinbtn_linewrap;
        compose.spinbtn_linewrap_adj = spinbtn_linewrap_adj;
        compose.checkbtn_wrapquote   = checkbtn_wrapquote;
+       compose.checkbtn_autowrap    = checkbtn_autowrap;
        compose.checkbtn_wrapatsend  = checkbtn_wrapatsend;
 
        compose.checkbtn_forward_as_attachment =
@@ -2455,23 +2424,17 @@ static void prefs_privacy_create(void)
 {
        GtkWidget *vbox1;
        GtkWidget *vbox2;
+       GtkWidget *vbox3;
        GtkWidget *hbox1;
+       GtkWidget *hbox_spc;
+       GtkWidget *label;
        GtkWidget *checkbtn_auto_check_signatures;
        GtkWidget *checkbtn_gpg_signature_popup;
-       GtkWidget *hbox_stpass;
        GtkWidget *checkbtn_store_passphrase;
-       GtkWidget *label_stpass1;
        GtkObject *spinbtn_store_passphrase_adj;
        GtkWidget *spinbtn_store_passphrase;
-       GtkWidget *label_stpass2;
-       GtkWidget *hbox_stpassinfo;
-       GtkWidget *label_stpassinfo;
        GtkWidget *checkbtn_passphrase_grab;
        GtkWidget *checkbtn_gpg_warning;
-       GtkWidget *label;
-       GtkWidget *menuitem;
-       GtkWidget *optmenu;
-       GtkWidget *optmenu_menu;
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -2488,42 +2451,55 @@ static void prefs_privacy_create(void)
        PACK_CHECK_BUTTON (vbox2, checkbtn_gpg_signature_popup,
                           _("Show signature check result in a popup window"));
 
-       hbox_stpass = gtk_hbox_new(FALSE, 8);
-       gtk_box_pack_start(GTK_BOX(vbox2), hbox_stpass, FALSE, FALSE, 0);
-
-       PACK_CHECK_BUTTON (hbox_stpass, checkbtn_store_passphrase,
-                          _("Store passphrase temporarily"));
-
-       label_stpass1 = gtk_label_new(_("- remove after"));
-       gtk_box_pack_start(GTK_BOX(hbox_stpass), label_stpass1, FALSE, FALSE, 0);
-
-       spinbtn_store_passphrase_adj = gtk_adjustment_new(0, 0, 1440, 1, 5, 5);
-       spinbtn_store_passphrase = gtk_spin_button_new(
-                       GTK_ADJUSTMENT(spinbtn_store_passphrase_adj), 1, 0);
-       gtk_box_pack_start(GTK_BOX(hbox_stpass), spinbtn_store_passphrase, FALSE, 
-                          FALSE, 0);
-       gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spinbtn_store_passphrase), 
-                                   TRUE);
-       gtk_widget_set_usize(spinbtn_store_passphrase, 50, -1);
-    
-       label_stpass2 = gtk_label_new(_("minute(s)"));
-       gtk_box_pack_start(GTK_BOX(hbox_stpass), label_stpass2, FALSE, FALSE, 0);
-       gtk_widget_show_all(hbox_stpass);
-
-       hbox_stpassinfo = gtk_hbox_new(FALSE, 8);
-       gtk_box_pack_start(GTK_BOX(vbox2), hbox_stpassinfo, FALSE, FALSE, 0);
-
-       label_stpassinfo = gtk_label_new
-               (_("(A setting of '0' will store the passphrase\n"
-                  " for the whole session)"));
-       gtk_box_pack_start (GTK_BOX (hbox_stpassinfo), label_stpassinfo, FALSE, FALSE, 0);
-       gtk_label_set_justify (GTK_LABEL (label_stpassinfo), GTK_JUSTIFY_LEFT);
-       gtk_widget_show_all(hbox_stpassinfo);
-
-       SET_TOGGLE_SENSITIVITY(checkbtn_store_passphrase, label_stpass1);
-       SET_TOGGLE_SENSITIVITY(checkbtn_store_passphrase, spinbtn_store_passphrase); 
-       SET_TOGGLE_SENSITIVITY(checkbtn_store_passphrase, label_stpass2);
-       SET_TOGGLE_SENSITIVITY(checkbtn_store_passphrase, label_stpassinfo);
+       PACK_CHECK_BUTTON (vbox2, checkbtn_store_passphrase,
+                          _("Store passphrase in memory temporarily"));
+
+       vbox3 = gtk_vbox_new (FALSE, 0);
+       gtk_widget_show (vbox3);
+       gtk_box_pack_start (GTK_BOX (vbox2), vbox3, FALSE, FALSE, 0);
+
+       hbox1 = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox1);
+       gtk_box_pack_start (GTK_BOX (vbox3), hbox1, FALSE, FALSE, 0);
+
+       hbox_spc = gtk_hbox_new (FALSE, 0);
+       gtk_widget_show (hbox_spc);
+       gtk_box_pack_start (GTK_BOX (hbox1), hbox_spc, FALSE, FALSE, 0);
+       gtk_widget_set_usize (hbox_spc, 12, -1);
+
+       label = gtk_label_new (_("Expire after"));
+       gtk_widget_show (label);
+       gtk_box_pack_start (GTK_BOX (hbox1), label, FALSE, FALSE, 0);
+
+       spinbtn_store_passphrase_adj = gtk_adjustment_new (0, 0, 1440, 1, 5, 5);
+       spinbtn_store_passphrase = gtk_spin_button_new
+               (GTK_ADJUSTMENT (spinbtn_store_passphrase_adj), 1, 0);
+       gtk_widget_show (spinbtn_store_passphrase);
+       gtk_box_pack_start (GTK_BOX (hbox1), spinbtn_store_passphrase, FALSE, FALSE, 0);
+       gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_store_passphrase),
+                                    TRUE);
+       gtk_widget_set_usize (spinbtn_store_passphrase, 64, -1);
+
+       label = gtk_label_new (_("minute(s) "));
+       gtk_widget_show (label);
+       gtk_box_pack_start (GTK_BOX (hbox1), label, FALSE, FALSE, 0);
+
+       hbox1 = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox1);
+       gtk_box_pack_start (GTK_BOX (vbox3), hbox1, FALSE, FALSE, 0);
+
+       hbox_spc = gtk_hbox_new (FALSE, 0);
+       gtk_widget_show (hbox_spc);
+       gtk_box_pack_start (GTK_BOX (hbox1), hbox_spc, FALSE, FALSE, 0);
+       gtk_widget_set_usize (hbox_spc, 12, -1);
+
+       label = gtk_label_new (_("(Setting to '0' will store the passphrase\n"
+                                " for the whole session)"));
+       gtk_widget_show (label);
+       gtk_box_pack_start (GTK_BOX (hbox1), label, FALSE, FALSE, 0);
+       gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
+
+       SET_TOGGLE_SENSITIVITY (checkbtn_store_passphrase, vbox3);
 
 #ifndef __MINGW32__
        PACK_CHECK_BUTTON (vbox2, checkbtn_passphrase_grab,
@@ -2538,77 +2514,15 @@ static void prefs_privacy_create(void)
        gtk_widget_show (hbox1);
        gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
 
-       /* create default signkey box */
-       label = gtk_label_new (_("Default Sign Key"));
-       gtk_widget_show (label);
-       gtk_box_pack_start (GTK_BOX (hbox1), label, FALSE, FALSE, 0);
-       optmenu = gtk_option_menu_new ();
-       gtk_widget_show (optmenu);
-       gtk_box_pack_start(GTK_BOX (hbox1), optmenu, FALSE, FALSE, 0);
-       optmenu_menu = gtk_menu_new ();
-
-       MENUITEM_ADD(optmenu_menu, menuitem, "Default Key", "def_key");
-       MENUITEM_ADD(optmenu_menu, menuitem, "Second Key", "2nd_key");
-       gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu), optmenu_menu);
-       /* FIXME: disabled because not implemented */
-       gtk_widget_set_sensitive(optmenu, FALSE);
-
        privacy.checkbtn_auto_check_signatures
-                                        = checkbtn_auto_check_signatures;
+                                            = checkbtn_auto_check_signatures;
        privacy.checkbtn_gpg_signature_popup
-                                        = checkbtn_gpg_signature_popup;
+                                            = checkbtn_gpg_signature_popup;
        privacy.checkbtn_store_passphrase    = checkbtn_store_passphrase;
        privacy.spinbtn_store_passphrase     = spinbtn_store_passphrase;
        privacy.spinbtn_store_passphrase_adj = spinbtn_store_passphrase_adj;
-       privacy.checkbtn_passphrase_grab = checkbtn_passphrase_grab;
-       privacy.checkbtn_gpg_warning     = checkbtn_gpg_warning;
-       privacy.optmenu_default_signkey  = optmenu;
-}
-
-static void
-prefs_common_default_signkey_set_data_from_optmenu(PrefParam *pparam)
-{
-#if 0
-       GtkWidget *menu;
-       GtkWidget *menuitem;
-       gchar *charset;
-
-       menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(*pparam->widget));
-       menuitem = gtk_menu_get_active(GTK_MENU(menu));
-       charset = gtk_object_get_user_data(GTK_OBJECT(menuitem));
-       g_free(*((gchar **)pparam->data));
-       *((gchar **)pparam->data) = g_strdup(charset);
-#endif
-}
-
-static void prefs_common_default_signkey_set_optmenu(PrefParam *pparam)
-{
-#if 0
-       GList *cur;
-       GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
-       GtkWidget *menu;
-       GtkWidget *menuitem;
-       gchar *charset;
-       gint n = 0;
-
-       g_return_if_fail(optmenu != NULL);
-       g_return_if_fail(*((gchar **)pparam->data) != NULL);
-
-       menu = gtk_option_menu_get_menu(optmenu);
-       for (cur = GTK_MENU_SHELL(menu)->children;
-            cur != NULL; cur = cur->next) {
-               menuitem = GTK_WIDGET(cur->data);
-               charset = gtk_object_get_user_data(GTK_OBJECT(menuitem));
-               if (!strcmp(charset, *((gchar **)pparam->data))) {
-                       gtk_option_menu_set_history(optmenu, n);
-                       return;
-               }
-               n++;
-       }
-
-       gtk_option_menu_set_history(optmenu, 0);
-       prefs_common_charset_set_data_from_optmenu(pparam);
-#endif
+       privacy.checkbtn_passphrase_grab     = checkbtn_passphrase_grab;
+       privacy.checkbtn_gpg_warning         = checkbtn_gpg_warning;
 }
 #endif /* USE_GPGME */
 
@@ -2618,6 +2532,7 @@ static void prefs_interface_create(void)
        GtkWidget *vbox2;
        GtkWidget *vbox3;
        /* GtkWidget *checkbtn_emacs; */
+       GtkWidget *checkbtn_show_msg_with_cursor;
        GtkWidget *checkbtn_openunread;
        GtkWidget *checkbtn_openinbox;
        GtkWidget *checkbtn_immedexec;
@@ -2626,6 +2541,7 @@ static void prefs_interface_create(void)
        GtkWidget *optmenu_recvdialog;
        GtkWidget *menu;
        GtkWidget *menuitem;
+       GtkWidget *checkbtn_no_recv_err_panel;
 
        GtkWidget *frame_addr;
        GtkWidget *vbox_addr;
@@ -2659,6 +2575,10 @@ static void prefs_interface_create(void)
        gtk_label_set_justify (GTK_LABEL (GTK_BIN (checkbtn_emacs)->child),
                               GTK_JUSTIFY_LEFT);   */
 
+       PACK_CHECK_BUTTON
+               (vbox2, checkbtn_show_msg_with_cursor,
+                _("Open message when cursor keys are pressed on summary"));
+
        PACK_CHECK_BUTTON
                (vbox2, checkbtn_openunread,
                 _("Open first unread message when entering a folder"));
@@ -2688,6 +2608,9 @@ static void prefs_interface_create(void)
 
        PACK_VSPACER(vbox2, vbox3, VSPACING_NARROW);
 
+       PACK_CHECK_BUTTON (vbox2, checkbtn_no_recv_err_panel,
+                          _("No popup error dialog on receive error"));
+
        hbox1 = gtk_hbox_new (FALSE, 8);
        gtk_widget_show (hbox1);
        gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0);
@@ -2777,7 +2700,7 @@ static void prefs_interface_create(void)
        gtk_signal_connect (GTK_OBJECT (button_keybind), "clicked",
                            GTK_SIGNAL_FUNC (prefs_keybind_select), NULL);
 
-       PACK_FRAME(vbox1, frame_pixmap_theme, _("Pixmap theme"));
+       PACK_FRAME(vbox1, frame_pixmap_theme, _("Icon theme"));
        
        vbox_pixmap_theme = gtk_vbox_new(FALSE, 0);
        gtk_widget_show(vbox_pixmap_theme);
@@ -2795,14 +2718,17 @@ static void prefs_interface_create(void)
        stock_pixmap_themes_list_free(avail_pixmap_themes);
 
        /* interface.checkbtn_emacs          = checkbtn_emacs; */
+       interface.checkbtn_show_msg_with_cursor
+                                             = checkbtn_show_msg_with_cursor;
        interface.checkbtn_openunread         = checkbtn_openunread;
        interface.checkbtn_openinbox          = checkbtn_openinbox;
        interface.checkbtn_immedexec          = checkbtn_immedexec;
        interface.optmenu_recvdialog          = optmenu_recvdialog;
+       interface.checkbtn_no_recv_err_panel  = checkbtn_no_recv_err_panel;
        interface.checkbtn_addaddrbyclick     = checkbtn_addaddrbyclick;
        interface.optmenu_nextunreadmsgdialog = optmenu_nextunreadmsgdialog;
-       interface.combo_pixmap_theme            = combo_pixmap_theme;
-       interface.entry_pixmap_theme            = entry_pixmap_theme;
+       interface.combo_pixmap_theme          = combo_pixmap_theme;
+       interface.entry_pixmap_theme          = entry_pixmap_theme;
 }
 
 static void prefs_other_create(void)
@@ -2863,11 +2789,13 @@ static void prefs_other_create(void)
        gtk_table_attach (GTK_TABLE (ext_table), uri_combo, 1, 2, 0, 1,
                          GTK_EXPAND | GTK_FILL, 0, 0, 0);
        gtkut_combo_set_items (GTK_COMBO (uri_combo),
+                              "galeon '%s'",
+                              "mozilla -remote 'openurl(%s,new-window)'",
                               "netscape -remote 'openURL(%s,raise)'",
                               "netscape '%s'",
                               "gnome-moz-remote --raise --newwin '%s'",
                               "kfmclient openURL '%s'",
-                              "opera -newwindow '%s'",        
+                              "opera -newwindow '%s'",
                               "kterm -e w3m '%s'",
                               "kterm -e lynx '%s'",
                               NULL);
@@ -3032,6 +2960,7 @@ static void date_format_entry_on_change(GtkEditable *editable,
        text = gtk_editable_get_chars(editable, 0, -1);
        if (text)
                strftime(buffer, sizeof buffer, text, cal_time); 
+       g_free(text);
        gtk_label_set_text(example, buffer);
 }
 
@@ -4191,37 +4120,6 @@ static void prefs_common_cancel(void)
 }
 
 
-static struct _ComposePrefs
-{
-       GtkWidget *window;
-
-       GtkWidget *close_btn;
-} composeprefs;
-
-static void compose_prefs_key_pressed(GtkWidget *widget, GdkEventKey *event);
-static gint compose_prefs_delete_event(GtkWidget *widget, GdkEventAny *event);
-static void compose_prefs_close(GtkWidget *widget);
-static void compose_prefs_fmt_create(void);
-
-static void compose_prefs_close(GtkWidget *widget)
-{
-       gtk_widget_hide(composeprefs.window);
-}
-
-static gint compose_prefs_delete_event(GtkWidget *widget, GdkEventAny *event)
-{
-       gtk_widget_hide(composeprefs.window);
-
-       return TRUE;
-}
-
-static void compose_prefs_key_pressed(GtkWidget *widget, GdkEventKey *event)
-{
-       if (event && event->keyval == GDK_Escape) {
-               gtk_widget_hide(composeprefs.window);
-       }
-}
-
 /* static void prefs_recvdialog_set_data_from_optmenu(PrefParam *pparam)
 {
        GtkWidget *menu;