2006-10-12 [colin] 2.5.5cvs4
[claws.git] / src / prefs_common.c
index be139bfcfbe7dfb5069a9f783b5c0328c41ca89f..7a2172014f9243b776976ff4eb6e609ce8f09118 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2005 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -58,6 +58,7 @@
 #include "folderview.h"
 #include "stock_pixmap.h"
 #include "prefswindow.h"
+#include "colorlabel.h"
 
 enum {
        DATEFMT_FMT,
@@ -69,6 +70,68 @@ PrefsCommon prefs_common;
 
 GtkWidget *notebook;
 
+#ifdef G_OS_WIN32
+/*
+ * In the Windows version prefs_common contains
+ *   - the non-OS-specific settings of the "Common" section and
+ *   - the OS-specific settings of the "CommonWin32" section
+ * The OS-specific settings of the "Common" section are not used
+ * but saved in prefs_unix.
+ */
+
+#  define SPECIFIC_PREFS prefs_unix
+
+static PrefsCommon prefs_unix;
+
+static PrefParam param_os_specific[] = {
+       /* Receive */
+       {"ext_inc_path", "",
+        &prefs_common.extinc_cmd, P_STRING, NULL, NULL, NULL},
+       {"newmail_notify_cmd", "",
+        &prefs_common.newmail_notify_cmd, P_STRING, NULL, NULL, NULL},
+
+       /* new fonts */
+       {"widget_font_gtk2",    NULL,
+         &prefs_common.widgetfont,             P_STRING, NULL, NULL, NULL},
+       {"message_font_gtk2",   "Monospace 9",
+        &prefs_common.textfont,                P_STRING, NULL, NULL, NULL},
+        {"print_font_gtk2",     "Monospace 9",
+         &prefs_common.printfont,              P_STRING, NULL, NULL, NULL},
+       {"small_font_gtk2",     "Sans 9",
+         &prefs_common.smallfont,              P_STRING, NULL, NULL, NULL},
+       {"normal_font_gtk2",    "Sans 9",
+         &prefs_common.normalfont,             P_STRING, NULL, NULL, NULL},
+
+       /* Message */
+       {"attach_save_directory", NULL,
+        &prefs_common.attach_save_dir, P_STRING, NULL, NULL, NULL},
+       {"attach_load_directory", NULL,
+        &prefs_common.attach_load_dir, P_STRING, NULL, NULL, NULL},
+
+       /* MIME viewer */
+       {"mime_textviewer", NULL,
+        &prefs_common.mime_textviewer,   P_STRING, NULL, NULL, NULL},
+       {"mime_open_command", "notepad '%s'",
+        &prefs_common.mime_open_cmd,     P_STRING, NULL, NULL, NULL},
+
+       /* Interface */
+       {"pixmap_theme_path", DEFAULT_PIXMAP_THEME, 
+        &prefs_common.pixmap_theme_path, P_STRING, NULL, NULL, NULL},
+
+       /* Other */
+       {"uri_open_command", NULL,
+        &prefs_common.uri_cmd, P_STRING, NULL, NULL, NULL},
+       {"print_command", "notepad /p %s",
+        &prefs_common.print_cmd, P_STRING, NULL, NULL, NULL},
+       {"ext_editor_command", "notepad %s",
+        &prefs_common.ext_editor_cmd, P_STRING, NULL, NULL, NULL},
+
+       {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
+};
+#else
+#  define SPECIFIC_PREFS prefs_common
+#endif
+
 /*
    parameter name, default value, pointer to the prefs variable, data type,
    pointer to the widget pointer,
@@ -80,7 +143,7 @@ static PrefParam param[] = {
        /* Receive */
        {"use_ext_inc", "FALSE", &prefs_common.use_extinc, P_BOOL,
         NULL, NULL, NULL},
-       {"ext_inc_path", DEFAULT_INC_PATH, &prefs_common.extinc_cmd, P_STRING,
+       {"ext_inc_path", DEFAULT_INC_PATH, &SPECIFIC_PREFS.extinc_cmd, P_STRING,
         NULL, NULL, NULL},
 
        {"autochk_newmail", "FALSE", &prefs_common.autochk_newmail, P_BOOL,
@@ -97,10 +160,14 @@ static PrefParam param[] = {
         P_BOOL, NULL, NULL, NULL},
        {"newmail_notify_auto", "FALSE", &prefs_common.newmail_notify_auto,
        P_BOOL, NULL, NULL, NULL},
-       {"newmail_notify_cmd", "", &prefs_common.newmail_notify_cmd, P_STRING,
+       {"newmail_notify_cmd", "", &SPECIFIC_PREFS.newmail_notify_cmd, P_STRING,
         NULL, NULL, NULL},
        {"receive_dialog_mode", "1", &prefs_common.recv_dialog_mode, P_ENUM,
         NULL, NULL, NULL},
+       {"receivewin_width", "460", &prefs_common.receivewin_width, P_INT,
+        NULL, NULL, NULL},
+       {"receivewin_height", "-1", &prefs_common.receivewin_height, P_INT,
+        NULL, NULL, NULL},
        {"no_receive_error_panel", "FALSE", &prefs_common.no_recv_err_panel,
         P_BOOL, NULL, NULL, NULL},
        {"close_receive_dialog", "TRUE", &prefs_common.close_recv_dialog,
@@ -113,6 +180,10 @@ static PrefParam param[] = {
         P_BOOL, NULL, NULL, NULL},
        {"send_dialog_mode", "0", &prefs_common.send_dialog_mode, P_ENUM,
         NULL, NULL, NULL},
+       {"sendwin_width", "460", &prefs_common.sendwin_width, P_INT,
+        NULL, NULL, NULL},
+       {"sendwin_height", "-1", &prefs_common.sendwin_height, P_INT,
+        NULL, NULL, NULL},
 
        {"outgoing_charset", CS_AUTO, &prefs_common.outgoing_charset, P_STRING,
         NULL, NULL, NULL},
@@ -141,8 +212,6 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"linewrap_auto", "TRUE", &prefs_common.autowrap, P_BOOL,
         NULL, NULL, NULL},
-       {"linewrap_before_sending", "FALSE", &prefs_common.linewrap_at_send, P_BOOL, 
-        NULL, NULL, NULL},
         {"autosave", "TRUE", &prefs_common.autosave,
         P_BOOL, NULL, NULL, NULL},
         {"autosave_length", "50", &prefs_common.autosave_length, P_INT,
@@ -160,11 +229,15 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"check_while_typing", "TRUE", &prefs_common.check_while_typing, P_BOOL,
         NULL, NULL, NULL},
+       {"recheck_when_changing_dict", "TRUE", &prefs_common.recheck_when_changing_dict,
+        P_BOOL, NULL, NULL, NULL},
        {"misspelled_color", "16711680", &prefs_common.misspelled_col, P_COLOR,
         NULL, NULL, NULL},
 #endif
        {"reply_with_quote", "TRUE", &prefs_common.reply_with_quote, P_BOOL,
         NULL, NULL, NULL},
+       {"compose_dnd_insert_or_attach", "0", &prefs_common.compose_dnd_mode, P_ENUM,
+        NULL, NULL, NULL},
 
        /* Account autoselection */
        {"reply_account_autoselect", "TRUE",
@@ -186,15 +259,15 @@ static PrefParam param[] = {
        /* Quote */
        {"reply_quote_mark", "> ", &prefs_common.quotemark, P_STRING,
         NULL, NULL, NULL},
-       {"reply_quote_format", "On %d\\n%f wrote:\\n\\n%q",
+       {"reply_quote_format", N_("On %d\\n%f wrote:\\n\\n%q"),
         &prefs_common.quotefmt, P_STRING, NULL, NULL, NULL},
 
        {"forward_quote_mark", "> ", &prefs_common.fw_quotemark, P_STRING,
         NULL, NULL, NULL},
        {"forward_quote_format",
-        "\\n\\nBegin forwarded message:\\n\\n"
+        N_("\\n\\nBegin forwarded message:\\n\\n"
         "?d{Date: %d\\n}?f{From: %f\\n}?t{To: %t\\n}?c{Cc: %c\\n}"
-        "?n{Newsgroups: %n\\n}?s{Subject: %s\\n}\\n\\n%M",
+        "?n{Newsgroups: %n\\n}?s{Subject: %s\\n}\\n\\n%M"),
         &prefs_common.fw_quotefmt, P_STRING, NULL, NULL, NULL},
        {"quote_chars", ">", &prefs_common.quote_chars, P_STRING,
         NULL, NULL, NULL},
@@ -214,13 +287,45 @@ static PrefParam param[] = {
 
        /* new fonts */
        {"widget_font_gtk2",    NULL,
-         &prefs_common.widgetfont,             P_STRING, NULL, NULL, NULL},
+         &SPECIFIC_PREFS.widgetfont,           P_STRING, NULL, NULL, NULL},
        {"message_font_gtk2",   "Monospace 9",
-        &prefs_common.textfont,                P_STRING, NULL, NULL, NULL},
+        &SPECIFIC_PREFS.textfont,                      P_STRING, NULL, NULL, NULL},
+        {"print_font_gtk2",     "Monospace 9",
+         &SPECIFIC_PREFS.printfont,             P_STRING, NULL, NULL, NULL},
        {"small_font_gtk2",     "Sans 9",
-         &prefs_common.smallfont,              P_STRING, NULL, NULL, NULL},
+         &SPECIFIC_PREFS.smallfont,            P_STRING, NULL, NULL, NULL},
        {"normal_font_gtk2",    "Sans 9",
-         &prefs_common.normalfont,             P_STRING, NULL, NULL, NULL},
+         &SPECIFIC_PREFS.normalfont,           P_STRING, NULL, NULL, NULL},
+
+       /* custom colors */
+       {"custom_color1", "#ff9900", &prefs_common.custom_colorlabel[0].color, P_COLOR,
+        NULL, NULL, NULL},
+       {"custom_colorlabel1", N_("Orange"), &prefs_common.custom_colorlabel[0].label, P_STRING,
+        NULL, NULL, NULL},
+       {"custom_color2", "#ff0000", &prefs_common.custom_colorlabel[1].color, P_COLOR,
+        NULL, NULL, NULL},
+       {"custom_colorlabel2", N_("Red"), &prefs_common.custom_colorlabel[1].label, P_STRING,
+        NULL, NULL, NULL},
+       {"custom_color3", "#ff66ff", &prefs_common.custom_colorlabel[2].color, P_COLOR,
+        NULL, NULL, NULL},
+       {"custom_colorlabel3", N_("Pink"), &prefs_common.custom_colorlabel[2].label, P_STRING,
+        NULL, NULL, NULL},
+       {"custom_color4", "#00ccff", &prefs_common.custom_colorlabel[3].color, P_COLOR,
+        NULL, NULL, NULL},
+       {"custom_colorlabel4", N_("Sky blue"), &prefs_common.custom_colorlabel[3].label, P_STRING,
+        NULL, NULL, NULL},
+       {"custom_color5", "#0000ff", &prefs_common.custom_colorlabel[4].color, P_COLOR,
+        NULL, NULL, NULL},
+       {"custom_colorlabel5", N_("Blue"), &prefs_common.custom_colorlabel[4].label, P_STRING,
+        NULL, NULL, NULL},
+       {"custom_color6", "#009900", &prefs_common.custom_colorlabel[5].color, P_COLOR,
+        NULL, NULL, NULL},
+       {"custom_colorlabel6", N_("Green"), &prefs_common.custom_colorlabel[5].label, P_STRING,
+        NULL, NULL, NULL},
+       {"custom_color7", "#663366", &prefs_common.custom_colorlabel[6].color, P_COLOR,
+        NULL, NULL, NULL},
+       {"custom_colorlabel7", N_("Brown"), &prefs_common.custom_colorlabel[6].label, P_STRING,
+        NULL, NULL, NULL},
 
        /* image viewer */
        {"display_image", "TRUE", &prefs_common.display_img, P_BOOL,
@@ -237,7 +342,7 @@ static PrefParam param[] = {
         &prefs_common.ng_abbrev_len, P_INT,
         NULL, NULL, NULL},
 
-       {"translate_header", "TRUE", &prefs_common.trans_hdr, P_BOOL,
+       {"translate_header", "FALSE", &prefs_common.trans_hdr, P_BOOL,
         NULL, NULL, NULL},
 
        /* Display: Summary View */
@@ -245,7 +350,7 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"thread_by_subject", "TRUE", &prefs_common.thread_by_subject, P_BOOL,
         NULL, NULL, NULL},
-       {"date_format", "%y/%m/%d(%a) %H:%M", &prefs_common.date_format,
+       {"date_format", N_("%y/%m/%d(%a) %H:%M"), &prefs_common.date_format,
         P_STRING, NULL, NULL, NULL},
 
        {"bold_unread", "TRUE", &prefs_common.bold_unread, P_BOOL,
@@ -429,6 +534,14 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"quote_level3_color", "179", &prefs_common.quote_level3_col, P_COLOR,
         NULL, NULL, NULL},
+       {"enable_bgcolor", "FALSE", &prefs_common.enable_bgcolor, P_BOOL,
+        NULL, NULL, NULL},
+       {"quote_level1_bgcolor", "13421772", &prefs_common.quote_level1_bgcol, P_COLOR,
+        NULL, NULL, NULL},
+       {"quote_level2_bgcolor", "13948116", &prefs_common.quote_level2_bgcol, P_COLOR,
+        NULL, NULL, NULL},
+       {"quote_level3_bgcolor", "14540253", &prefs_common.quote_level3_bgcol, P_COLOR,
+        NULL, NULL, NULL},
        {"uri_color", "32512", &prefs_common.uri_col, P_COLOR,
         NULL, NULL, NULL},
        {"target_folder_color", "14294218", &prefs_common.tgt_folder_col, P_COLOR,
@@ -446,8 +559,12 @@ static PrefParam param[] = {
         P_BOOL, NULL, NULL, NULL},
        {"render_html", "TRUE", &prefs_common.render_html, P_BOOL,
         NULL, NULL, NULL},
+       {"invoke_plugin_on_html", "FALSE", &prefs_common.invoke_plugin_on_html, P_BOOL,
+        NULL, NULL, NULL},
        {"line_space", "2", &prefs_common.line_space, P_INT,
         NULL, NULL, NULL},
+       {"never_send_retrcpt", "FALSE", &prefs_common.never_send_retrcpt, P_BOOL,
+        NULL, NULL, NULL},
 
        {"enable_smooth_scroll", "FALSE",
         &prefs_common.enable_smooth_scroll, P_BOOL,
@@ -456,22 +573,27 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"scroll_half_page", "FALSE", &prefs_common.scroll_halfpage, P_BOOL,
         NULL, NULL, NULL},
+       {"respect_flowed_format", "FALSE", &prefs_common.respect_flowed_format, P_BOOL,
+        NULL, NULL, NULL},
 
        {"show_other_header", "FALSE", &prefs_common.show_other_header, P_BOOL,
         NULL, NULL, NULL},
 
+       {"use_different_print_font", "FALSE", &prefs_common.use_different_print_font, P_BOOL,
+        NULL, NULL, NULL},
+
        {"attach_desc", "TRUE", &prefs_common.attach_desc, P_BOOL,
         NULL, NULL, NULL},
        {"attach_save_directory", NULL,
-        &prefs_common.attach_save_dir, P_STRING, NULL, NULL, NULL},
+        &SPECIFIC_PREFS.attach_save_dir, P_STRING, NULL, NULL, NULL},
+       {"attach_load_directory", NULL,
+        &SPECIFIC_PREFS.attach_load_dir, P_STRING, NULL, NULL, NULL},
 
        /* MIME viewer */
-       {"mime_image_viewer", DEFAULT_IMAGE_VIEWER_CMD,
-        &prefs_common.mime_image_viewer, P_STRING, NULL, NULL, NULL},
-       {"mime_audio_player", DEFAULT_AUDIO_PLAYER_CMD,
-        &prefs_common.mime_audio_player, P_STRING, NULL, NULL, NULL},
+       {"mime_textviewer",   NULL,
+        &SPECIFIC_PREFS.mime_textviewer,   P_STRING, NULL, NULL, NULL},
        {"mime_open_command", "gedit '%s'",
-        &prefs_common.mime_open_cmd, P_STRING, NULL, NULL, NULL},
+        &SPECIFIC_PREFS.mime_open_cmd,     P_STRING, NULL, NULL, NULL},
 
        /* Interface */
        {"separate_folder", "FALSE", &prefs_common.sep_folder, P_BOOL,
@@ -498,19 +620,24 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
 
        {"pixmap_theme_path", DEFAULT_PIXMAP_THEME, 
-        &prefs_common.pixmap_theme_path, P_STRING,
+        &SPECIFIC_PREFS.pixmap_theme_path, P_STRING,
         NULL, NULL, NULL},
 
        {"ask_mark_all_read", "TRUE", &prefs_common.ask_mark_all_read, P_BOOL,
         NULL, NULL, NULL},
 
+       {"ask_apply_per_account_filtering_rules", "TRUE", &prefs_common.ask_apply_per_account_filtering_rules, P_BOOL,
+        NULL, NULL, NULL},
+       {"apply_per_account_filtering_rules", "0", &prefs_common.apply_per_account_filtering_rules, P_ENUM,
+        NULL, NULL, NULL},
+
        /* Other */
        {"uri_open_command", DEFAULT_BROWSER_CMD,
-        &prefs_common.uri_cmd, P_STRING, NULL, NULL, NULL},
-       {"print_command", "lpr %s", &prefs_common.print_cmd, P_STRING,
-        NULL, NULL, NULL},
-       {"ext_editor_command", "gedit %s",
-        &prefs_common.ext_editor_cmd, P_STRING, NULL, NULL, NULL},
+        &SPECIFIC_PREFS.uri_cmd, P_STRING, NULL, NULL, NULL},
+       {"print_command", "lpr %s",
+        &SPECIFIC_PREFS.print_cmd, P_STRING, NULL, NULL, NULL},
+       {"ext_editor_command", DEFAULT_EDITOR_CMD,
+        &SPECIFIC_PREFS.ext_editor_cmd, P_STRING, NULL, NULL, NULL},
 
        {"add_address_by_click", "FALSE", &prefs_common.add_address_by_click,
         P_BOOL, NULL, NULL, NULL},
@@ -539,6 +666,16 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"log_length", "500", &prefs_common.loglength, P_INT,
         NULL, NULL, NULL},
+       {"log_msg_color", "#00af00", &prefs_common.log_msg_color, P_COLOR,
+        NULL, NULL, NULL},
+       {"log_warn_color", "#af0000", &prefs_common.log_warn_color, P_COLOR,
+        NULL, NULL, NULL},
+       {"log_error_color", "#af0000", &prefs_common.log_error_color, P_COLOR,
+        NULL, NULL, NULL},
+       {"log_in_color", "#000000", &prefs_common.log_in_color, P_COLOR,
+        NULL, NULL, NULL},
+       {"log_out_color", "#0000ef", &prefs_common.log_out_color, P_COLOR,
+        NULL, NULL, NULL},
 
        {"color_new", "179", &prefs_common.color_new, P_COLOR,
         NULL, NULL, NULL},
@@ -579,6 +716,11 @@ static PrefParam param[] = {
        {"addressbookeditpersonwin_height", "-1", &prefs_common.addressbookeditpersonwin_height, P_INT,
         NULL, NULL, NULL},
 
+       {"addressbookeditgroupwin_width", "580", &prefs_common.addressbookeditgroupwin_width, P_INT,
+        NULL, NULL, NULL},
+       {"addressbookeditgroupwin_height", "340", &prefs_common.addressbookeditgroupwin_height, P_INT,
+        NULL, NULL, NULL},
+
        {"pluginswin_width", "480", &prefs_common.pluginswin_width, P_INT,
         NULL, NULL, NULL},
        {"pluginswin_height", "-1", &prefs_common.pluginswin_height, P_INT,
@@ -609,6 +751,21 @@ static PrefParam param[] = {
        {"logwin_height", "-1", &prefs_common.logwin_height, P_INT,
         NULL, NULL, NULL},
 
+       {"folderselwin_width", "300", &prefs_common.folderselwin_width, P_INT,
+        NULL, NULL, NULL},
+       {"folderselwin_height", "-1", &prefs_common.folderselwin_height, P_INT,
+        NULL, NULL, NULL},
+
+       {"addressaddwin_width", "300", &prefs_common.addressaddwin_width, P_INT,
+        NULL, NULL, NULL},
+       {"addressaddwin_height", "-1", &prefs_common.addressaddwin_height, P_INT,
+        NULL, NULL, NULL},
+
+       {"addressbook_folderselwin_width", "300", &prefs_common.addressbook_folderselwin_width, P_INT,
+        NULL, NULL, NULL},
+       {"addressbook_folderselwin_height", "-1", &prefs_common.addressbook_folderselwin_height, P_INT,
+        NULL, NULL, NULL},
+
        /* Hidden */
        {"warn_dnd", "1", &prefs_common.warn_dnd, P_INT,
         NULL, NULL, NULL},
@@ -617,7 +774,13 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"enable_swap_from", "FALSE", &prefs_common.swap_from, P_BOOL,
         NULL, NULL, NULL},
-       {"enable_rules_hint", "TRUE", &prefs_common.enable_rules_hint, P_BOOL,
+       {"use_stripes_everywhere", "TRUE", &prefs_common.use_stripes_everywhere, P_BOOL,
+        NULL, NULL, NULL},
+       {"use_stripes_in_summaries", "TRUE", &prefs_common.use_stripes_in_summaries, P_BOOL,
+        NULL, NULL, NULL},
+       {"stripes_color_offset", "4000", &prefs_common.stripes_color_offset, P_INT,
+        NULL, NULL, NULL},
+       {"enable_dotted_lines", "FALSE", &prefs_common.enable_dotted_lines, P_BOOL,
         NULL, NULL, NULL},
        {"enable_hscrollbar", "TRUE", &prefs_common.enable_hscrollbar, P_BOOL,
         NULL, NULL, NULL},
@@ -639,6 +802,14 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"statusbar_update_step", "10", &prefs_common.statusbar_update_step, P_INT,
         NULL, NULL, NULL},
+       {"compose_no_markup", "FALSE", &prefs_common.compose_no_markup, P_BOOL,
+        NULL, NULL, NULL},
+       {"skip_ssl_cert_check", "FALSE", &prefs_common.skip_ssl_cert_check, P_BOOL,
+        NULL, NULL, NULL},
+       {"live_dangerously", "FALSE", &prefs_common.live_dangerously, P_BOOL,
+        NULL, NULL, NULL},
+       {"hide_quotes", "0", &prefs_common.hide_quotes, P_INT,
+        NULL, NULL, NULL},
 
        {NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };
@@ -681,15 +852,34 @@ GList *prefs_common_read_history(const gchar *history)
 void prefs_common_read_config(void)
 {
        gchar *rcpath;
-       
+       gchar *tmp;
+
        rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL);
        prefs_read_config(param, "Common", rcpath, NULL);
+#ifdef G_OS_WIN32
+       prefs_read_config(param_os_specific, "CommonWin32", rcpath, NULL);
+#endif
+
        g_free(rcpath);
+
+       tmp = g_strdup(gettext(prefs_common.quotefmt));
+       g_free(prefs_common.quotefmt);
+       prefs_common.quotefmt = tmp;
+
+       tmp = g_strdup(gettext(prefs_common.fw_quotefmt));
+       g_free(prefs_common.fw_quotefmt);
+       prefs_common.fw_quotefmt = tmp;
        
+       tmp = g_strdup(gettext(prefs_common.date_format));
+       g_free(prefs_common.date_format);
+       prefs_common.date_format = tmp;
+
        prefs_common.mime_open_cmd_history =
                prefs_common_read_history(COMMAND_HISTORY);
        prefs_common.summary_quicksearch_history =
                prefs_common_read_history(QUICKSEARCH_HISTORY);
+
+       colorlabel_update_colortable_from_prefs();
 }
 
 /*
@@ -721,6 +911,9 @@ void prefs_common_save_history(const gchar *history, GList *list)
 void prefs_common_write_config(void)
 {
        prefs_write_config(param, "Common", COMMON_RC);
+#ifdef G_OS_WIN32
+       prefs_write_config(param_os_specific, "CommonWin32", COMMON_RC);
+#endif
 
        prefs_common_save_history(COMMAND_HISTORY, 
                prefs_common.mime_open_cmd_history);