enable storing of GnuPG passphrase
[claws.git] / src / prefs_common.c
index 71c847aa848e42e871b0c20c369633ad8b81a4b6..1c06e38e46a505353be4413860c7d81bf1828ce0 100644 (file)
@@ -53,6 +53,8 @@
 #include "folder.h"
 #include "filesel.h"
 #include "folderview.h"
+#include "stock_pixmap.h"
+#include "quote_fmt.h"
 
 #if USE_PSPELL
 #include "gtkspell.h"
@@ -80,6 +82,11 @@ static struct Receive {
        GtkWidget *checkbtn_scan_after_inc;
 
 
+       GtkWidget *checkbtn_newmail_auto;
+       GtkWidget *checkbtn_newmail_manu;
+       GtkWidget *entry_newmail_notify_cmd;
+       GtkWidget *hbox_newmail_notify;
+
        GtkWidget *spinbtn_maxarticle;
        GtkObject *spinbtn_maxarticle_adj;
 } receive;
@@ -118,6 +125,7 @@ static struct Compose {
 
        GtkWidget *checkbtn_quote;
        GtkWidget *checkbtn_forward_as_attachment;
+       GtkWidget *checkbtn_bounce_keep_from;
        GtkWidget *checkbtn_smart_wrapping;
        GtkWidget *checkbtn_block_cursor;
        GtkWidget *checkbtn_reply_with_quote;
@@ -186,6 +194,9 @@ static struct Message {
 static struct Privacy {
        GtkWidget *checkbtn_auto_check_signatures;
        GtkWidget *checkbtn_gpg_signature_popup;
+       GtkWidget *checkbtn_store_passphrase;
+       GtkWidget *spinbtn_store_passphrase;
+       GtkObject *spinbtn_store_passphrase_adj;
        GtkWidget *checkbtn_passphrase_grab;
        GtkWidget *checkbtn_gpg_warning;
        GtkWidget *optmenu_default_signkey;
@@ -200,6 +211,8 @@ static struct Interface {
        GtkWidget *checkbtn_addaddrbyclick;
        GtkWidget *optmenu_recvdialog;
        GtkWidget *optmenu_nextunreadmsgdialog;
+       GtkWidget *entry_pixmap_theme;
+       GtkWidget *combo_pixmap_theme;
 } interface;
 
 static struct Other {
@@ -227,7 +240,6 @@ static struct KeybindDialog {
        GtkWidget *combo;
 } keybind;
 
-static GtkWidget *quote_desc_win;
 static GtkWidget *font_sel_win;
 static guint font_sel_conn_id; 
 static GtkWidget *quote_color_win;
@@ -240,6 +252,8 @@ 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);
 static void prefs_common_recv_dialog_set_optmenu(PrefParam *pparam);
 static void prefs_nextunreadmsgdialog_set_data_from_optmenu(PrefParam *pparam);
@@ -294,6 +308,16 @@ static PrefParam param[] = {
        {"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},
+       {"newmail_notify_manu", "FALSE", &prefs_common.newmail_notify_manu,
+        P_BOOL, &receive.checkbtn_newmail_manu,
+        prefs_set_data_from_toggle, prefs_set_toggle},
+       {"newmail_notify_auto", "FALSE", &prefs_common.newmail_notify_auto,
+       P_BOOL, &receive.checkbtn_newmail_auto,
+        prefs_set_data_from_toggle, prefs_set_toggle},
+       {"newmail_notify_cmd", "", &prefs_common.newmail_notify_cmd, P_STRING,
+        &receive.entry_newmail_notify_cmd,
+        prefs_set_data_from_entry, prefs_set_entry},
        {"max_news_articles", "300", &prefs_common.max_articles, P_INT,
         &receive.spinbtn_maxarticle,
         prefs_set_data_from_spinbtn, prefs_set_spinbtn},
@@ -327,10 +351,19 @@ static PrefParam param[] = {
        {"auto_ext_editor", "FALSE", &prefs_common.auto_exteditor, P_BOOL,
         &compose.checkbtn_autoextedit,
         prefs_set_data_from_toggle, prefs_set_toggle},
-
+       {"forward_as_attachment", "FALSE", &prefs_common.forward_as_attachment,
+        P_BOOL, &compose.checkbtn_forward_as_attachment,
+        prefs_set_data_from_toggle, prefs_set_toggle},
+       {"bounce_keep_from", "FALSE",
+        &prefs_common.bounce_keep_from, P_BOOL,
+        &compose.checkbtn_bounce_keep_from,
+        prefs_set_data_from_toggle, prefs_set_toggle},
        {"undo_level", "50", &prefs_common.undolevels, P_INT,
         &compose.spinbtn_undolevel,
         prefs_set_data_from_spinbtn, prefs_set_spinbtn},
+       {"block_cursor", "FALSE", &prefs_common.block_cursor,
+        P_BOOL, &compose.checkbtn_block_cursor,
+        prefs_set_data_from_toggle, prefs_set_toggle},
 
        {"linewrap_length", "72", &prefs_common.linewrap_len, P_INT,
         &compose.spinbtn_linewrap,
@@ -342,20 +375,14 @@ static PrefParam param[] = {
         &prefs_common.linewrap_at_send, P_BOOL,
         &compose.checkbtn_wrapatsend,
         prefs_set_data_from_toggle, prefs_set_toggle},
-       {"forward_as_attachment", "FALSE", &prefs_common.forward_as_attachment,
-        P_BOOL, &compose.checkbtn_forward_as_attachment,
-        prefs_set_data_from_toggle, prefs_set_toggle},
         {"smart_wrapping", "TRUE", &prefs_common.smart_wrapping,
         P_BOOL, &compose.checkbtn_smart_wrapping,
         prefs_set_data_from_toggle, prefs_set_toggle},
-       {"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, &spelling.checkbtn_enable_pspell,
         prefs_set_data_from_toggle, prefs_set_toggle},
-       {"pspell_path", "/usr/local/share/pspell/", &prefs_common.pspell_path, 
+       {"pspell_path", PSPELL_PATH, &prefs_common.pspell_path, 
         P_STRING, &spelling.entry_pspell_path, 
         prefs_set_data_from_entry, prefs_set_entry},
        {"dictionary",  "", &prefs_common.dictionary,
@@ -643,6 +670,12 @@ static PrefParam param[] = {
         &prefs_common.gpg_signature_popup, P_BOOL,
         &privacy.checkbtn_gpg_signature_popup,
         prefs_set_data_from_toggle, prefs_set_toggle},
+       {"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, 
+        prefs_set_data_from_spinbtn, prefs_set_spinbtn},
 #ifndef __MINGW32__
        {"passphrase_grab", "FALSE", &prefs_common.passphrase_grab, P_BOOL,
         &privacy.checkbtn_passphrase_grab,
@@ -687,7 +720,10 @@ static PrefParam param[] = {
        {"add_address_by_click", "FALSE", &prefs_common.add_address_by_click,
         P_BOOL, &interface.checkbtn_addaddrbyclick,
         prefs_set_data_from_toggle, prefs_set_toggle},
-
+       {"pixmap_theme_path", DEFAULT_PIXMAP_THEME, 
+        &prefs_common.pixmap_theme_path, P_STRING,
+        &interface.entry_pixmap_theme, prefs_set_data_from_entry, prefs_set_entry},
+       
        /* Other */
        {"uri_open_command", "netscape -remote 'openURL(%s,raise)'",
         &prefs_common.uri_cmd, P_STRING,
@@ -754,13 +790,8 @@ static void date_format_select_row         (GtkWidget      *date_format_list,
                                                 gint            column,
                                                 GdkEventButton *event,
                                                 GtkWidget      *date_format);
-static GtkWidget *date_format_create           (GtkButton      *button,
-                                                void           *data);
-
-static void prefs_quote_description_create     (void);
-static void prefs_quote_description_key_pressed        (GtkWidget      *widget,
-                                                GdkEventKey    *event,
-                                                gpointer        data);
+static GtkWidget *date_format_create            (GtkButton      *button,
+                                                 void           *data);
 
 static void prefs_quote_colors_dialog          (void);
 static void prefs_quote_colors_dialog_create   (void);
@@ -823,7 +854,7 @@ void prefs_common_read_config(void)
 
        path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMAND_HISTORY,
                           NULL);
-       if ((fp = fopen(path, "r")) == NULL) {
+       if ((fp = fopen(path, "rb")) == NULL) {
                if (ENOENT != errno) FILE_OP_ERROR(path, "fopen");
                g_free(path);
                return;
@@ -851,7 +882,7 @@ void prefs_common_save_config(void)
 
        path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMAND_HISTORY,
                           NULL);
-       if ((fp = fopen(path, "w")) == NULL) {
+       if ((fp = fopen(path, "wb")) == NULL) {
                FILE_OP_ERROR(path, "fopen");
                g_free(path);
                return;
@@ -900,10 +931,8 @@ static void prefs_common_create(void)
                            GTK_SIGNAL_FUNC(prefs_common_deleted), NULL);
        gtk_signal_connect (GTK_OBJECT(dialog.window), "key_press_event",
                            GTK_SIGNAL_FUNC(prefs_common_key_pressed), NULL);
-       gtk_signal_connect (GTK_OBJECT(dialog.window), "focus_in_event",
-                           GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
-       gtk_signal_connect (GTK_OBJECT(dialog.window), "focus_out_event",
-                           GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+       MANAGE_WINDOW_SIGNALS_CONNECT(dialog.window);
+
        gtk_signal_connect (GTK_OBJECT(dialog.ok_btn), "clicked",
                            GTK_SIGNAL_FUNC(prefs_common_ok), NULL);
        gtk_signal_connect (GTK_OBJECT(dialog.apply_btn), "clicked",
@@ -969,6 +998,13 @@ static void prefs_receive_create(void)
        GtkWidget *checkbtn_scan_after_inc;
 
 
+       GtkWidget *frame_newmail;
+       GtkWidget *hbox_newmail_notify;
+       GtkWidget *checkbtn_newmail_auto;
+       GtkWidget *checkbtn_newmail_manu;
+       GtkWidget *entry_newmail_notify_cmd;
+       GtkWidget *label_newmail_notify_cmd;
+
        GtkWidget *frame_news;
        GtkWidget *label_maxarticle;
        GtkWidget *spinbtn_maxarticle;
@@ -1078,6 +1114,51 @@ static void prefs_receive_create(void)
        PACK_CHECK_BUTTON (vbox2, checkbtn_scan_after_inc,
                           _("Update all local folders after incorporation"));
 
+       
+       PACK_FRAME(vbox1, frame_newmail, _("Run command when new mail "
+                                          "arrives"));
+       vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW);
+       gtk_widget_show (vbox2);
+       gtk_container_add (GTK_CONTAINER (frame_newmail), vbox2);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
+
+       hbox = gtk_hbox_new (TRUE, 8);
+       gtk_widget_show (hbox);
+       PACK_CHECK_BUTTON (hbox, checkbtn_newmail_auto,
+                          _("after autochecking"));
+       PACK_CHECK_BUTTON (hbox, checkbtn_newmail_manu,
+                          _("after manual checking"));
+       gtk_box_pack_start (GTK_BOX(vbox2), hbox, FALSE, FALSE, 0);
+       gtk_signal_connect(GTK_OBJECT(checkbtn_newmail_auto), "toggled",
+                          GTK_SIGNAL_FUNC(prefs_common_recv_dialog_newmail_notify_toggle_cb),
+                          NULL);
+       gtk_signal_connect(GTK_OBJECT(checkbtn_newmail_manu), "toggled",
+                          GTK_SIGNAL_FUNC(prefs_common_recv_dialog_newmail_notify_toggle_cb),
+                          NULL);
+
+       hbox_newmail_notify = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox);
+       gtk_box_pack_start (GTK_BOX (vbox2), hbox_newmail_notify, FALSE, 
+                           FALSE, 0);
+
+       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), 
+                             GTK_JUSTIFY_RIGHT);
+       gtk_widget_show (label_newmail_notify_cmd);
+       gtk_box_pack_start (GTK_BOX (hbox_newmail_notify), 
+                           label_newmail_notify_cmd, FALSE, FALSE, 0);
+
+       entry_newmail_notify_cmd = gtk_entry_new ();
+       gtk_widget_show (entry_newmail_notify_cmd);
+       gtk_box_pack_start (GTK_BOX (hbox_newmail_notify), 
+                           entry_newmail_notify_cmd, TRUE, TRUE, 0);
+
+       gtk_widget_set_sensitive(hbox_newmail_notify, 
+                                prefs_common.newmail_notify_auto || 
+                                prefs_common.newmail_notify_manu);
+
        PACK_FRAME(vbox1, frame_news, _("News"));
 
        hbox = gtk_hbox_new (FALSE, 8);
@@ -1120,6 +1201,11 @@ static void prefs_receive_create(void)
        receive.checkbtn_scan_after_inc = checkbtn_scan_after_inc;
 
 
+       receive.checkbtn_newmail_auto  = checkbtn_newmail_auto;
+       receive.checkbtn_newmail_manu  = checkbtn_newmail_manu;
+       receive.hbox_newmail_notify    = hbox_newmail_notify;
+       receive.entry_newmail_notify_cmd = entry_newmail_notify_cmd;
+
        receive.spinbtn_maxarticle     = spinbtn_maxarticle;
        receive.spinbtn_maxarticle_adj = spinbtn_maxarticle_adj;
 }
@@ -1213,14 +1299,15 @@ static void prefs_send_create(void)
 #if HAVE_LIBJCONV
        SET_MENUITEM(_("Unicode (UTF-8)"),               CS_UTF_8);
 #endif
-       SET_MENUITEM(_("Western European (ISO-8859-1)"), CS_ISO_8859_1);
-       SET_MENUITEM(_("Central European (ISO-8859-2)"), CS_ISO_8859_2);
-       SET_MENUITEM(_("Baltic (ISO-8859-13)"),          CS_ISO_8859_13);
-       SET_MENUITEM(_("Baltic (ISO-8859-4)"),           CS_ISO_8859_4);
-       SET_MENUITEM(_("Greek (ISO-8859-7)"),            CS_ISO_8859_7);
-       SET_MENUITEM(_("Turkish (ISO-8859-9)"),          CS_ISO_8859_9);
+       SET_MENUITEM(_("Western European (ISO-8859-1)"),  CS_ISO_8859_1);
+       SET_MENUITEM(_("Western European (ISO-8859-15)"), CS_ISO_8859_15);
+       SET_MENUITEM(_("Central European (ISO-8859-2)"),  CS_ISO_8859_2);
+       SET_MENUITEM(_("Baltic (ISO-8859-13)"),           CS_ISO_8859_13);
+       SET_MENUITEM(_("Baltic (ISO-8859-4)"),            CS_ISO_8859_4);
+       SET_MENUITEM(_("Greek (ISO-8859-7)"),             CS_ISO_8859_7);
+       SET_MENUITEM(_("Turkish (ISO-8859-9)"),           CS_ISO_8859_9);
 #if HAVE_LIBJCONV
-       SET_MENUITEM(_("Cyrillic (ISO-8859-5)"),         CS_ISO_8859_5);
+       SET_MENUITEM(_("Cyrillic (ISO-8859-5)"),          CS_ISO_8859_5);
 #endif
        SET_MENUITEM(_("Cyrillic (KOI8-R)"),             CS_KOI8_R);
 #if HAVE_LIBJCONV
@@ -1267,6 +1354,17 @@ static void prefs_send_create(void)
        send.optmenu_charset = optmenu;
 }
 
+static void prefs_common_recv_dialog_newmail_notify_toggle_cb(GtkWidget *w, gpointer data)
+{
+       gboolean toggled;
+
+       toggled = gtk_toggle_button_get_active
+                       (GTK_TOGGLE_BUTTON(receive.checkbtn_newmail_manu)) ||
+                 gtk_toggle_button_get_active
+                       (GTK_TOGGLE_BUTTON(receive.checkbtn_newmail_auto));
+       gtk_widget_set_sensitive(receive.hbox_newmail_notify, toggled);
+}
+
 #if USE_PSPELL
 static void prefs_dictionary_set_data_from_optmenu(PrefParam *param)
 {
@@ -1333,8 +1431,6 @@ static void prefs_speller_sugmode_set_data_from_optmenu(PrefParam *param)
 static void prefs_speller_sugmode_set_optmenu(PrefParam *pparam)
 {
        GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
-       GtkWidget *menu;
-       GtkWidget *menuitem;
        gint sugmode;
 
        g_return_if_fail(optmenu != NULL);
@@ -1408,7 +1504,6 @@ static void prefs_spelling_create()
 {
        GtkWidget *vbox1;
        GtkWidget *frame_spell;
-       GtkWidget *hbox_spell;
        GtkWidget *vbox_spell;
        GtkWidget *hbox_pspell_path;
        GtkWidget *checkbtn_enable_pspell;
@@ -1424,10 +1519,7 @@ static void prefs_spelling_create()
        GtkWidget *help_label;
        GtkWidget *checkbtn_check_while_typing;
        GtkWidget *color_label;
-       GtkWidget *hbox_col;
        GtkWidget *col_align;
-       GtkWidget *hline;
-
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -1560,8 +1652,8 @@ static void prefs_spelling_create()
 static void prefs_compose_create(void)
 {
        GtkWidget *vbox1;
-        GtkWidget *vbox2;
-        GtkWidget *vbox3;
+       GtkWidget *vbox2;
+       GtkWidget *vbox3;
        GtkWidget *hbox1;
        GtkWidget *hbox2;
        GtkWidget *btn_quotefmt;
@@ -1577,8 +1669,8 @@ static void prefs_compose_create(void)
        GtkWidget *checkbtn_autoextedit;
 
        GtkWidget *frame_autosel;
-        GtkWidget *hbox_autosel;
-        GtkWidget *vbox_autosel;
+       GtkWidget *hbox_autosel;
+       GtkWidget *vbox_autosel;
        GtkWidget *checkbtn_reply_account_autosel;
        GtkWidget *checkbtn_forward_account_autosel;
        GtkWidget *checkbtn_reedit_account_autosel;
@@ -1602,8 +1694,10 @@ static void prefs_compose_create(void)
        GtkWidget *frame_reply;
        GtkWidget *checkbtn_quote;
        GtkWidget *checkbtn_forward_as_attachment;
+       GtkWidget *checkbtn_bounce_keep_from;
        GtkWidget *checkbtn_smart_wrapping;
        GtkWidget *checkbtn_block_cursor;
+       GtkWidget *frame_msgwrap;
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
@@ -1648,7 +1742,7 @@ static void prefs_compose_create(void)
        gtk_widget_set_usize (entry_sigsep, 64, -1);
 
         /* Account autoselection */
-       PACK_FRAME(vbox1, frame_autosel, _("Automatic Account Selection"));
+       PACK_FRAME(vbox1, frame_autosel, _("Automatic account selection"));
 
        hbox_autosel = gtk_hbox_new (FALSE, VSPACING_NARROW);
        gtk_widget_show (hbox_autosel);
@@ -1671,9 +1765,45 @@ static void prefs_compose_create(void)
 
        PACK_VSPACER (vbox2, vbox3, VSPACING_NARROW_2);
 
+       hbox5 = gtk_hbox_new (FALSE, 32);
+       gtk_widget_show (hbox5);
+       gtk_box_pack_start (GTK_BOX (vbox2), hbox5, FALSE, FALSE, 0);
+
+       PACK_CHECK_BUTTON (hbox5, checkbtn_forward_as_attachment,
+                          _("Forward as attachment"));
+
+       PACK_CHECK_BUTTON (hbox5, checkbtn_block_cursor,
+                         _("Block cursor"));
+
+       PACK_CHECK_BUTTON (vbox2, checkbtn_bounce_keep_from,
+                          _("Keep the original 'From' header when bouncing"));
+
+       hbox_undolevel = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox_undolevel);
+       gtk_box_pack_start (GTK_BOX (vbox1), hbox_undolevel, FALSE, FALSE, 0);
+
+       label_undolevel = gtk_label_new (_("Undo level"));
+       gtk_widget_show (label_undolevel);
+       gtk_box_pack_start (GTK_BOX (hbox_undolevel), label_undolevel, FALSE, FALSE, 0);
+
+       spinbtn_undolevel_adj = gtk_adjustment_new (50, 0, 100, 1, 10, 10);
+       spinbtn_undolevel = gtk_spin_button_new
+               (GTK_ADJUSTMENT (spinbtn_undolevel_adj), 1, 0);
+       gtk_widget_show (spinbtn_undolevel);
+       gtk_box_pack_start (GTK_BOX (hbox_undolevel), spinbtn_undolevel, FALSE, FALSE, 0);
+       gtk_widget_set_usize (spinbtn_undolevel, 64, -1);
+       gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_undolevel), TRUE);
+
+       PACK_VSPACER (vbox2, vbox3, VSPACING_NARROW_2);
+
         /* line-wrapping */
+       PACK_FRAME(vbox1, frame_msgwrap, _("Message wrapping"));
+
        vbox_linewrap = gtk_vbox_new (FALSE, VSPACING_NARROW);
        gtk_widget_show (vbox_linewrap);
+       gtk_container_add (GTK_CONTAINER (frame_msgwrap), vbox_linewrap);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox_linewrap), 8);
+
        gtk_box_pack_start (GTK_BOX (vbox1), vbox_linewrap, FALSE, FALSE, 0);
 
        hbox3 = gtk_hbox_new (FALSE, 8);
@@ -1707,33 +1837,9 @@ static void prefs_compose_create(void)
        PACK_CHECK_BUTTON
                (hbox4, checkbtn_wrapatsend, _("Wrap before sending"));
 
-       PACK_CHECK_BUTTON (vbox1, checkbtn_forward_as_attachment,
-                          _("Forward as attachment"));
-
-       PACK_CHECK_BUTTON (vbox1, checkbtn_smart_wrapping,
+       PACK_CHECK_BUTTON (vbox_linewrap, checkbtn_smart_wrapping,
                           _("Smart wrapping (EXPERIMENTAL)"));
        
-       PACK_CHECK_BUTTON (vbox1, checkbtn_block_cursor,
-                         _("Block cursor"));
-
-       PACK_VSPACER (vbox2, vbox3, VSPACING_NARROW_2);
-
-       hbox_undolevel = gtk_hbox_new (FALSE, 8);
-       gtk_widget_show (hbox3);
-       gtk_box_pack_start (GTK_BOX (vbox1), hbox_undolevel, FALSE, FALSE, 0);
-
-       label_undolevel = gtk_label_new (_("Undo level"));
-       gtk_widget_show (label_undolevel);
-       gtk_box_pack_start (GTK_BOX (hbox_undolevel), label_undolevel, FALSE, FALSE, 0);
-
-       spinbtn_undolevel_adj = gtk_adjustment_new (50, 0, 100, 1, 10, 10);
-       spinbtn_undolevel = gtk_spin_button_new
-               (GTK_ADJUSTMENT (spinbtn_undolevel_adj), 1, 0);
-       gtk_widget_show (spinbtn_undolevel);
-       gtk_box_pack_start (GTK_BOX (hbox_undolevel), spinbtn_undolevel, FALSE, FALSE, 0);
-       gtk_widget_set_usize (spinbtn_undolevel, 64, -1);
-       gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_undolevel), TRUE);
-
        /*
        compose.checkbtn_quote   = checkbtn_quote;
        compose.entry_quotemark  = entry_quotemark;
@@ -1758,6 +1864,8 @@ static void prefs_compose_create(void)
 
        compose.checkbtn_forward_as_attachment =
                checkbtn_forward_as_attachment;
+       compose.checkbtn_bounce_keep_from =
+               checkbtn_bounce_keep_from;
        compose.checkbtn_smart_wrapping = 
                checkbtn_smart_wrapping;
        compose.checkbtn_block_cursor   =
@@ -1880,7 +1988,7 @@ static void prefs_quote_create(void)
        gtk_widget_show (btn_quotedesc);
        gtk_box_pack_start (GTK_BOX (hbox1), btn_quotedesc, FALSE, FALSE, 0);
        gtk_signal_connect(GTK_OBJECT(btn_quotedesc), "clicked",
-                          GTK_SIGNAL_FUNC(prefs_quote_description), NULL);
+                          GTK_SIGNAL_FUNC(quote_fmt_quote_description), NULL);
 
        compose.checkbtn_reply_with_quote= checkbtn_reply_with_quote;
        quote.entry_quotemark    = entry_quotemark;
@@ -2257,6 +2365,14 @@ static void prefs_privacy_create(void)
        GtkWidget *hbox1;
        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;
@@ -2279,6 +2395,43 @@ 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);
+
 #ifndef __MINGW32__
        PACK_CHECK_BUTTON (vbox2, checkbtn_passphrase_grab,
                           _("Grab input while entering a passphrase"));
@@ -2311,6 +2464,9 @@ static void prefs_privacy_create(void)
                                         = checkbtn_auto_check_signatures;
        privacy.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;
@@ -2389,6 +2545,12 @@ static void prefs_interface_create(void)
        GtkWidget *optmenu_nextunreadmsgdialog_menu;
        GtkWidget *nextunreadmsgdialog_menuitem;
 
+       GtkWidget *frame_pixmap_theme;
+       GtkWidget *vbox_pixmap_theme;
+       GtkWidget *entry_pixmap_theme;
+       GtkWidget *combo_pixmap_theme;
+       GList *avail_pixmap_themes = NULL;
+
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
        gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
@@ -2521,6 +2683,24 @@ static void prefs_interface_create(void)
        gtk_box_pack_start (GTK_BOX (hbox1), button_keybind, FALSE, FALSE, 0);
        gtk_signal_connect (GTK_OBJECT (button_keybind), "clicked",
                            GTK_SIGNAL_FUNC (prefs_keybind_select), NULL);
+
+       PACK_FRAME(vbox1, frame_pixmap_theme, "Pixmap theme");
+       
+       vbox_pixmap_theme = gtk_vbox_new(FALSE, 0);
+       gtk_widget_show(vbox_pixmap_theme);
+       gtk_container_add(GTK_CONTAINER(frame_pixmap_theme), vbox_pixmap_theme);
+       gtk_container_set_border_width(GTK_CONTAINER(vbox_pixmap_theme), 8);
+       avail_pixmap_themes = stock_pixmap_themes_list_new(); 
+       combo_pixmap_theme = gtk_combo_new ();
+       gtk_widget_show (combo_pixmap_theme);
+       gtk_box_pack_start (GTK_BOX (vbox_pixmap_theme), combo_pixmap_theme, TRUE, TRUE, 0);
+       gtk_combo_set_popdown_strings(GTK_COMBO(combo_pixmap_theme), avail_pixmap_themes);
+       entry_pixmap_theme = GTK_COMBO (combo_pixmap_theme)->entry;
+
+       stock_pixmap_themes_list_free(avail_pixmap_themes);
+
        /* interface.checkbtn_emacs          = checkbtn_emacs; */
        interface.checkbtn_openunread         = checkbtn_openunread;
        interface.checkbtn_openinbox          = checkbtn_openinbox;
@@ -2528,6 +2708,8 @@ static void prefs_interface_create(void)
        interface.optmenu_recvdialog          = optmenu_recvdialog;
        interface.checkbtn_addaddrbyclick     = checkbtn_addaddrbyclick;
        interface.optmenu_nextunreadmsgdialog = optmenu_nextunreadmsgdialog;
+       interface.combo_pixmap_theme            = combo_pixmap_theme;
+       interface.entry_pixmap_theme            = entry_pixmap_theme;
 }
 
 static void prefs_other_create(void)
@@ -2584,6 +2766,8 @@ static void prefs_other_create(void)
                               "netscape -remote 'openURL(%s,raise)'",
                               "netscape '%s'",
                               "gnome-moz-remote --raise --newwin '%s'",
+                              "kfmclient openURL '%s'",
+                              "opera -newwindow '%s'",        
                               "kterm -e w3m '%s'",
                               "kterm -e lynx '%s'",
                               NULL);
@@ -3064,10 +3248,7 @@ static void prefs_quote_colors_dialog_create(void)
        gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
 
        gtk_widget_grab_default(ok_btn);
-       gtk_signal_connect(GTK_OBJECT(window), "focus_in_event",
-                          GTK_SIGNAL_FUNC(manage_window_focus_in), NULL);
-       gtk_signal_connect(GTK_OBJECT(window), "focus_out_event",
-                          GTK_SIGNAL_FUNC(manage_window_focus_out), NULL);
+       MANAGE_WINDOW_SIGNALS_CONNECT(window);
        gtk_signal_connect(GTK_OBJECT(window), "delete_event",
                           GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
        gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
@@ -3264,144 +3445,6 @@ static void prefs_recycle_colors_toggled(GtkWidget *widget)
        prefs_common.recycle_quote_colors = is_active;
 }
 
-void prefs_quote_description(void)
-{
-       if (!quote_desc_win)
-               prefs_quote_description_create();
-
-       manage_window_set_transient(GTK_WINDOW(quote_desc_win));
-       gtk_widget_show(quote_desc_win);
-       gtk_main();
-       gtk_widget_hide(quote_desc_win);
-}
-
-static void prefs_quote_description_create(void)
-{
-       GtkWidget *vbox;
-       GtkWidget *hbox;
-       GtkWidget *vbox2;
-       GtkWidget *label;
-       GtkWidget *hbbox;
-       GtkWidget *ok_btn;
-
-       quote_desc_win = gtk_window_new(GTK_WINDOW_DIALOG);
-       gtk_window_set_title(GTK_WINDOW(quote_desc_win),
-                            _("Description of symbols"));
-       gtk_container_set_border_width(GTK_CONTAINER(quote_desc_win), 8);
-       gtk_window_set_position(GTK_WINDOW(quote_desc_win), GTK_WIN_POS_CENTER);
-       gtk_window_set_modal(GTK_WINDOW(quote_desc_win), TRUE);
-       gtk_window_set_policy(GTK_WINDOW(quote_desc_win), FALSE, FALSE, FALSE);
-
-       vbox = gtk_vbox_new(FALSE, 8);
-       gtk_container_add(GTK_CONTAINER(quote_desc_win), vbox);
-
-       hbox = gtk_hbox_new(FALSE, 8);
-       gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0);
-
-       vbox2 = gtk_vbox_new(FALSE, 8);
-       gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 0);
-
-#define PACK_LABEL() \
-       gtk_box_pack_start(GTK_BOX(vbox2), label, TRUE, TRUE, 0); \
-       gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); \
-       gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-
-       label = gtk_label_new
-               ("%d\n"         /* date */
-                "%f\n"         /* from */
-                "%N\n"         /* full name of sender */
-                "%F\n"         /* first name of sender */
-                "%I\n"         /* initial of sender */
-                "%s\n"         /* subject */
-                "%t\n"         /* to */
-                "%c\n"         /* cc */
-                "%n\n"         /* newsgroups */
-                "%r\n"         /* references */
-                "%i");         /* message id */
-       PACK_LABEL();
-
-       label = gtk_label_new
-               ("?x{expr}");   /* condition */
-       PACK_LABEL();
-
-       label = gtk_label_new
-               ("%M\n"         /* message body */
-                "%Q\n"         /* quoted message body */
-                "%m\n"         /* message body without signature */
-                "%q\n"         /* quoted message body without signature */
-                "%%");         /* literal percent */
-       PACK_LABEL();
-
-       label = gtk_label_new
-               ("\\\\\n"       /* literal backslash */
-                "\\?\n"        /* literal question mark */
-                "\\{\n"        /* literal opening curly brace */
-                "\\}");        /* literal closing curly brace */
-       PACK_LABEL();
-
-       vbox2 = gtk_vbox_new(FALSE, 8);
-       gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 0);
-
-       label = gtk_label_new
-               (_("Date\n"
-                  "From\n"
-                  "Full Name of Sender\n"
-                  "First Name of Sender\n"
-                  "Initial of Sender\n"
-                  "Subject\n"
-                  "To\n"
-                  "Cc\n"
-                  "Newsgroups\n"
-                  "References\n"
-                  "Message-ID"));
-       PACK_LABEL();
-
-       label = gtk_label_new
-               (_("If x is set, displays expr"));
-       PACK_LABEL();
-
-       label = gtk_label_new
-               (_("Message body\n"
-                  "Quoted message body\n"
-                  "Message body without signature\n"
-                  "Quoted message body without signature\n"
-                  "Literal %"));
-       PACK_LABEL();
-
-       label = gtk_label_new
-               (_("Literal backslash\n"
-                  "Literal question mark\n"
-                  "Literal opening curly brace\n"
-                  "Literal closing curly brace"));
-       PACK_LABEL();
-
-#undef PACK_LABEL
-
-       gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
-                               NULL, NULL, NULL, NULL);
-       gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
-
-       gtk_widget_grab_default(ok_btn);
-       gtk_signal_connect(GTK_OBJECT(ok_btn), "clicked",
-                          GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
-       gtk_signal_connect
-               (GTK_OBJECT(quote_desc_win), "key_press_event",
-                GTK_SIGNAL_FUNC(prefs_quote_description_key_pressed),
-                NULL);
-       gtk_signal_connect(GTK_OBJECT(quote_desc_win), "delete_event",
-                          GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
-
-       gtk_widget_show_all(vbox);
-}
-
-static void prefs_quote_description_key_pressed(GtkWidget *widget,
-                                               GdkEventKey *event,
-                                               gpointer data)
-{
-       if (event && event->keyval == GDK_Escape)
-               gtk_main_quit();
-}
-
 static void prefs_font_select(GtkButton *button, GtkEntry *entry)
 {
        gchar *font_name;
@@ -3525,10 +3568,7 @@ static void prefs_keybind_select(void)
        gtk_box_pack_end (GTK_BOX (hbox1), confirm_area, FALSE, FALSE, 0);
        gtk_widget_grab_default (ok_btn);
 
-       gtk_signal_connect (GTK_OBJECT (window), "focus_in_event",
-                           GTK_SIGNAL_FUNC (manage_window_focus_in), NULL);
-       gtk_signal_connect (GTK_OBJECT (window), "focus_out_event",
-                           GTK_SIGNAL_FUNC (manage_window_focus_out), NULL);
+       MANAGE_WINDOW_SIGNALS_CONNECT(window);
        gtk_signal_connect (GTK_OBJECT (window), "delete_event",
                            GTK_SIGNAL_FUNC (prefs_keybind_deleted), NULL);
        gtk_signal_connect (GTK_OBJECT (window), "key_press_event",
@@ -3587,7 +3627,6 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/View/Expand Summary View\" \"V\")\n"
                "(menu-path \"<Main>/View/Expand Message View\" \"<shift>V\")\n"
                "(menu-path \"<Main>/View/Thread view\" \"<control>T\")\n"
-               "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
                "(menu-path \"<Main>/View/Go to/Prev message\" \"P\")\n"
                "(menu-path \"<Main>/View/Go to/Next message\" \"N\")\n"
                "(menu-path \"<Main>/View/Go to/Prev unread message\" \"<shift>P\")\n"
@@ -3614,9 +3653,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"<shift>exclam\")\n"
                "(menu-path \"<Main>/Message/Mark/Mark as read\" \"\")\n"
 
-               "(menu-path \"<Main>/Tool/Address book\" \"<shift><control>A\")\n"
-               "(menu-path \"<Main>/Tool/Execute\" \"X\")\n"
-               "(menu-path \"<Main>/Tool/Log window\" \"<control>L\")\n"
+               "(menu-path \"<Main>/Tools/Address book\" \"<shift><control>A\")\n"
+               "(menu-path \"<Main>/Tools/Execute\" \"X\")\n"
+               "(menu-path \"<Main>/Tools/Log window\" \"<control>L\")\n"
 
                "(menu-path \"<Compose>/File/Close\" \"<control>W\")\n"
                "(menu-path \"<Compose>/Edit/Select all\" \"<control>A\")\n"
@@ -3640,7 +3679,6 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/View/Expand Summary View\" \"\")\n"
                "(menu-path \"<Main>/View/Expand Message View\" \"\")\n"
                "(menu-path \"<Main>/View/Thread view\" \"<shift>T\")\n"
-               "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
                "(menu-path \"<Main>/View/Go to/Prev message\" \"P\")\n"
                "(menu-path \"<Main>/View/Go to/Next message\" \"N\")\n"
                "(menu-path \"<Main>/View/Go to/Prev unread message\" \"<shift>P\")\n"
@@ -3667,9 +3705,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"<shift>exclam\")\n"
                "(menu-path \"<Main>/Message/Mark/Mark as read\" \"<shift>R\")\n"
 
-               "(menu-path \"<Main>/Tool/Address book\" \"<shift><control>A\")\n"
-               "(menu-path \"<Main>/Tool/Execute\" \"X\")\n"
-               "(menu-path \"<Main>/Tool/Log window\" \"<control>L\")\n"
+               "(menu-path \"<Main>/Tools/Address book\" \"<shift><control>A\")\n"
+               "(menu-path \"<Main>/Tools/Execute\" \"X\")\n"
+               "(menu-path \"<Main>/Tools/Log window\" \"<control>L\")\n"
 
                "(menu-path \"<Compose>/File/Close\" \"<alt>W\")\n"
                "(menu-path \"<Compose>/Edit/Select all\" \"\")\n"
@@ -3692,7 +3730,6 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
 
                "(menu-path \"<Main>/View/Toggle summary view\" \"V\")\n"
                "(menu-path \"<Main>/View/Thread view\" \"<control>T\")\n"
-               "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
                "(menu-path \"<Main>/View/Go to/Prev message\" \"\")\n"
                "(menu-path \"<Main>/View/Go to/Next message\" \"\")\n"
                "(menu-path \"<Main>/View/Go to/Prev unread message\" \"\")\n"
@@ -3719,9 +3756,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"<shift>N\")\n"
                "(menu-path \"<Main>/Message/Mark/Mark as read\" \"\")\n"
 
-               "(menu-path \"<Main>/Tool/Address book\" \"<shift><control>A\")\n"
-               "(menu-path \"<Main>/Tool/Execute\" \"X\")\n"
-               "(menu-path \"<Main>/Tool/Log window\" \"<control>L\")\n"
+               "(menu-path \"<Main>/Tools/Address book\" \"<shift><control>A\")\n"
+               "(menu-path \"<Main>/Tools/Execute\" \"X\")\n"
+               "(menu-path \"<Main>/Tools/Log window\" \"<control>L\")\n"
 
                "(menu-path \"<Compose>/File/Close\" \"<alt>W\")\n"
                "(menu-path \"<Compose>/Edit/Select all\" \"\")\n"
@@ -3745,7 +3782,6 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/View/Expand Summary View\" \"\")\n"
                "(menu-path \"<Main>/View/Expand Message View\" \"\")\n"
                "(menu-path \"<Main>/View/Thread view\" \"<control>T\")\n"
-               "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
                "(menu-path \"<Main>/View/Go to/Prev message\" \"P\")\n"
                "(menu-path \"<Main>/View/Go to/Next message\" \"N\")\n"
                "(menu-path \"<Main>/View/Go to/Prev unread message\" \"<shift>P\")\n"
@@ -3772,9 +3808,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"<shift>exclam\")\n"
                "(menu-path \"<Main>/Message/Mark/Mark as read\" \"\")\n"
 
-               "(menu-path \"<Main>/Tool/Address book\" \"<alt>A\")\n"
-               "(menu-path \"<Main>/Tool/Execute\" \"<alt>X\")\n"
-               "(menu-path \"<Main>/Tool/Log window\" \"<alt>L\")\n"
+               "(menu-path \"<Main>/Tools/Address book\" \"<alt>A\")\n"
+               "(menu-path \"<Main>/Tools/Execute\" \"<alt>X\")\n"
+               "(menu-path \"<Main>/Tools/Log window\" \"<alt>L\")\n"
 
                "(menu-path \"<Compose>/File/Close\" \"<alt>W\")\n"
                "(menu-path \"<Compose>/Edit/Select all\" \"\")\n"
@@ -3798,7 +3834,6 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/View/Expand Summary View\" \"\")\n"
                "(menu-path \"<Main>/View/Expand Message View\" \"\")\n"
                "(menu-path \"<Main>/View/Thread view\" \"\")\n"
-               "(menu-path \"<Main>/View/Unthread view\" \"\")\n"
                "(menu-path \"<Main>/View/Go to/Prev message\" \"\")\n"
                "(menu-path \"<Main>/View/Go to/Next message\" \"\")\n"
                "(menu-path \"<Main>/View/Go to/Prev unread message\" \"\")\n"
@@ -3825,9 +3860,9 @@ static void prefs_keybind_apply_clicked(GtkWidget *widget)
                "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"\")\n"
                "(menu-path \"<Main>/Message/Mark/Mark as read\" \"\")\n"
 
-               "(menu-path \"<Main>/Tool/Address book\" \"\")\n"
-               "(menu-path \"<Main>/Tool/Execute\" \"\")\n"
-               "(menu-path \"<Main>/Tool/Log window\" \"\")\n"
+               "(menu-path \"<Main>/Tools/Address book\" \"\")\n"
+               "(menu-path \"<Main>/Tools/Execute\" \"\")\n"
+               "(menu-path \"<Main>/Tools/Log window\" \"\")\n"
 
                "(menu-path \"<Compose>/File/Close\" \"\")\n"
                "(menu-path \"<Compose>/Edit/Select all\" \"\")\n"
@@ -3928,6 +3963,7 @@ static void prefs_common_recv_dialog_set_optmenu(PrefParam *pparam)
                gtk_option_menu_set_history(optmenu, 2);
                break;
        default:
+               break;
        }
 
        menu = gtk_option_menu_get_menu(optmenu);
@@ -3953,16 +3989,31 @@ static void prefs_common_ok(void)
 {
        prefs_common_apply();
        gtk_widget_hide(dialog.window);
-       if (quote_desc_win && GTK_WIDGET_VISIBLE(quote_desc_win))
-               gtk_widget_hide(quote_desc_win);
 
        inc_unlock();
 }
 
 static void prefs_common_apply(void)
 {
+       gchar *entry_pixmap_theme_str;
+       gboolean update_pixmap_theme;
+       
+       entry_pixmap_theme_str = gtk_entry_get_text(GTK_ENTRY(interface.entry_pixmap_theme));
+       if (entry_pixmap_theme_str && 
+               (strcmp(prefs_common.pixmap_theme_path, entry_pixmap_theme_str) != 0) )
+               update_pixmap_theme = TRUE;
+       else
+               update_pixmap_theme = FALSE;
+       
        prefs_set_data_from_dialog(param);
-       main_window_reflect_prefs_all();
+       
+       if (update_pixmap_theme)
+       {
+               main_window_reflect_prefs_all_real(TRUE);
+               compose_reflect_prefs_pixmap_theme();
+       } else
+               main_window_reflect_prefs_all_real(FALSE);
+       
        prefs_common_save_config();
 
        inc_autocheck_timer_remove();
@@ -3999,7 +4050,6 @@ static void prefs_nextunreadmsgdialog_set_optmenu(PrefParam *pparam)
        case NEXTUNREADMSGDIALOG_ASSUME_NO:
                gtk_option_menu_set_history(optmenu, 2);
                break;
-       default:
        }
 
        menu = gtk_option_menu_get_menu(optmenu);