sync with 0.7.5cvs20
[claws.git] / src / prefs_common.c
index ca259c3174217680542b8425fddb6c3a4f543b66..33f58a8ba3a0dda809b4c6f8d644e5d3a4f92e20 100644 (file)
@@ -125,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;
@@ -150,6 +151,8 @@ static struct Quote {
 
        GtkWidget *entry_fw_quotemark;
        GtkWidget *text_fw_quotefmt;
+       
+       GtkWidget *entry_quote_chars;
 } quote;
 
 static struct Display {
@@ -161,6 +164,10 @@ static struct Display {
        GtkWidget *entry_boldfont;
 
        GtkWidget *chkbtn_folder_unread;
+       GtkWidget *chkbtn_display_img;
+       GtkWidget *entry_ng_abbrev_len;
+       GtkWidget *spinbtn_ng_abbrev_len;
+       GtkObject *spinbtn_ng_abbrev_len_adj;
 
        GtkWidget *chkbtn_transhdr;
 
@@ -169,7 +176,6 @@ static struct Display {
        GtkWidget *chkbtn_useaddrbook;
        GtkWidget *chkbtn_expand_thread;
        GtkWidget *chkbtn_bold_unread;
-
        GtkWidget *entry_datefmt;
 } display;
 
@@ -193,6 +199,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;
@@ -350,6 +359,10 @@ static PrefParam param[] = {
        {"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},
@@ -428,6 +441,8 @@ static PrefParam param[] = {
         "?n{Newsgroups: %n\\n}?s{Subject: %s\\n}\\n\\n%M",
         &prefs_common.fw_quotefmt, P_STRING, &quote.text_fw_quotefmt,
         prefs_set_data_from_text, prefs_set_text},
+       {"quote_chars", ">", &prefs_common.quote_chars, P_STRING,
+        &quote.entry_quote_chars, prefs_set_data_from_entry, prefs_set_entry},
 
        /* Display */
        {"widget_font", NULL, &prefs_common.widgetfont, P_STRING,
@@ -455,6 +470,15 @@ static PrefParam param[] = {
         &display.chkbtn_folder_unread,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
+       {"display_img", "TRUE",
+        &prefs_common.display_img, P_BOOL,
+        &display.chkbtn_display_img,
+        prefs_set_data_from_toggle, prefs_set_toggle},
+       {"newsgroup_abbrev_len", "16",
+        &prefs_common.ng_abbrev_len, P_INT,
+        &display.spinbtn_ng_abbrev_len,
+        prefs_set_data_from_spinbtn, prefs_set_spinbtn},
+
        {"translate_header", "TRUE", &prefs_common.trans_hdr, P_BOOL,
         &display.chkbtn_transhdr,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -662,6 +686,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,
@@ -735,6 +765,8 @@ static PrefParam param[] = {
        {"warn_queued_on_exit", "TRUE", &prefs_common.warn_queued_on_exit,
         P_BOOL, &other.checkbtn_warnqueued,
         prefs_set_data_from_toggle, prefs_set_toggle},
+       {"work_offline", "FALSE", &prefs_common.work_offline, P_BOOL,
+        NULL, NULL, NULL},
 
        {"kill_score", "-9999", &prefs_common.kill_score, P_INT,
         NULL, NULL, NULL},
@@ -1255,7 +1287,7 @@ static void prefs_send_create(void)
        gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);
 
        PACK_CHECK_BUTTON (vbox2, checkbtn_savemsg,
-                          _("Save sent messages to outbox"));
+                          _("Save sent messages to Sent"));
        PACK_CHECK_BUTTON (vbox2, checkbtn_queuemsg,
                           _("Queue messages that fail to send"));
        PACK_CHECK_BUTTON (vbox2, checkbtn_returnreceipt,
@@ -1297,7 +1329,7 @@ static void prefs_send_create(void)
 #endif
        SET_MENUITEM(_("Cyrillic (KOI8-R)"),             CS_KOI8_R);
 #if HAVE_LIBJCONV
-       SET_MENUITEM(_("Cyrillic (Windows-1251)"),       CS_CP1251);
+       SET_MENUITEM(_("Cyrillic (Windows-1251)"),       CS_WINDOWS_1251);
        SET_MENUITEM(_("Cyrillic (KOI8-U)"),             CS_KOI8_U);
 #endif
        SET_MENUITEM(_("Japanese (ISO-2022-JP)"),        CS_ISO_2022_JP);
@@ -1680,6 +1712,7 @@ 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;
@@ -1760,6 +1793,9 @@ static void prefs_compose_create(void)
        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);
@@ -1846,6 +1882,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   =
@@ -1868,6 +1906,9 @@ static void prefs_quote_create(void)
        GtkWidget *entry_fw_quotemark;
        GtkWidget *text_fw_quotefmt;
 
+       GtkWidget *entry_quote_chars;
+       GtkWidget *label_quote_chars;
+       
        GtkWidget *btn_quotedesc;
 
        GtkWidget *checkbtn_reply_with_quote;
@@ -1970,11 +2011,40 @@ static void prefs_quote_create(void)
        gtk_signal_connect(GTK_OBJECT(btn_quotedesc), "clicked",
                           GTK_SIGNAL_FUNC(quote_fmt_quote_description), NULL);
 
+       /* quote chars */
+
+       PACK_FRAME (vbox1, frame_quote, _("Quoting characters"));
+
+       vbox_quote = gtk_vbox_new (FALSE, VSPACING_NARROW);
+       gtk_widget_show (vbox_quote);
+       gtk_container_add (GTK_CONTAINER (frame_quote), vbox_quote);
+       gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
+
+       hbox1 = gtk_hbox_new (FALSE, 32);
+       gtk_widget_show (hbox1);
+       gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, FALSE, FALSE, 0);
+
+       hbox2 = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox2);
+       gtk_box_pack_start (GTK_BOX (hbox1), hbox2, FALSE, FALSE, 0);
+
+       label_quote_chars = gtk_label_new (_("Treat these characters as quotation marks: "));
+       gtk_widget_show (label_quote_chars);
+       gtk_box_pack_start (GTK_BOX (hbox2), label_quote_chars, FALSE, FALSE, 0);
+
+       entry_quote_chars = gtk_entry_new ();
+       gtk_widget_show (entry_quote_chars);
+       gtk_box_pack_start (GTK_BOX (hbox2), entry_quote_chars,
+                           FALSE, FALSE, 0);
+       gtk_widget_set_usize (entry_quote_chars, 64, -1);
+
+
        compose.checkbtn_reply_with_quote= checkbtn_reply_with_quote;
        quote.entry_quotemark    = entry_quotemark;
        quote.text_quotefmt      = text_quotefmt;
        quote.entry_fw_quotemark = entry_fw_quotemark;
        quote.text_fw_quotefmt   = text_fw_quotefmt;
+       quote.entry_quote_chars  = entry_quote_chars;
 }
 
 static void prefs_display_create(void)
@@ -1985,8 +2055,13 @@ static void prefs_display_create(void)
        GtkWidget *label_textfont;
        GtkWidget *entry_textfont;
        GtkWidget *button_textfont;
-       GtkWidget *chkbtn_folder_unread;
+       GtkWidget *chkbtn_display_img;
        GtkWidget *chkbtn_transhdr;
+       GtkWidget *chkbtn_folder_unread;
+       GtkWidget *hbox1;
+       GtkWidget *label_ng_abbrev;
+       GtkWidget *spinbtn_ng_abbrev_len;
+       GtkObject *spinbtn_ng_abbrev_len_adj;
        GtkWidget *frame_summary;
        GtkWidget *vbox2;
        GtkWidget *chkbtn_swapfrom;
@@ -1995,7 +2070,6 @@ static void prefs_display_create(void)
        GtkWidget *chkbtn_expand_thread;
        GtkWidget *chkbtn_bold_unread;
        GtkWidget *vbox3;
-       GtkWidget *hbox1;
        GtkWidget *label_datefmt;
        GtkWidget *button_datefmt;
        GtkWidget *entry_datefmt;
@@ -2104,6 +2178,35 @@ static void prefs_display_create(void)
        PACK_CHECK_BUTTON (vbox2, chkbtn_folder_unread,
                           _("Display unread number next to folder name"));
 
+       PACK_CHECK_BUTTON (vbox2, chkbtn_display_img,
+                          _("Automatically display images"));
+
+       PACK_VSPACER(vbox2, vbox3, VSPACING_NARROW_2);
+
+       hbox1 = gtk_hbox_new (FALSE, 8);
+       gtk_widget_show (hbox1);
+       gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, TRUE, 0);
+
+       label_ng_abbrev = gtk_label_new
+               (_("Abbreviate newsgroups longer than"));
+       gtk_widget_show (label_ng_abbrev);
+       gtk_box_pack_start (GTK_BOX (hbox1), label_ng_abbrev, FALSE, FALSE, 0);
+
+       spinbtn_ng_abbrev_len_adj = gtk_adjustment_new (16, 0, 999, 1, 10, 10);
+       spinbtn_ng_abbrev_len = gtk_spin_button_new
+               (GTK_ADJUSTMENT (spinbtn_ng_abbrev_len_adj), 1, 0);
+       gtk_widget_show (spinbtn_ng_abbrev_len);
+       gtk_box_pack_start (GTK_BOX (hbox1), spinbtn_ng_abbrev_len,
+                           FALSE, FALSE, 0);
+       gtk_widget_set_usize (spinbtn_ng_abbrev_len, 56, -1);
+       gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_ng_abbrev_len),
+                                    TRUE);
+
+       label_ng_abbrev = gtk_label_new
+               (_("letters"));
+       gtk_widget_show (label_ng_abbrev);
+       gtk_box_pack_start (GTK_BOX (hbox1), label_ng_abbrev, FALSE, FALSE, 0);
+
        /* ---- Summary ---- */
 
        PACK_FRAME(vbox1, frame_summary, _("Summary View"));
@@ -2165,8 +2268,11 @@ static void prefs_display_create(void)
        display.entry_textfont  = entry_textfont;
        display.button_textfont = button_textfont;
 
-       display.chkbtn_folder_unread = chkbtn_folder_unread;
-       display.chkbtn_transhdr   = chkbtn_transhdr;
+       display.chkbtn_display_img   = chkbtn_display_img;
+       display.chkbtn_transhdr           = chkbtn_transhdr;
+       display.chkbtn_folder_unread      = chkbtn_folder_unread;
+       display.spinbtn_ng_abbrev_len     = spinbtn_ng_abbrev_len;
+       display.spinbtn_ng_abbrev_len_adj = spinbtn_ng_abbrev_len_adj;
 
        display.chkbtn_swapfrom      = chkbtn_swapfrom;
        display.chkbtn_hscrollbar    = chkbtn_hscrollbar;
@@ -2345,6 +2451,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;
@@ -2367,6 +2481,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"));
@@ -2399,6 +2550,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;
@@ -2698,7 +2852,7 @@ static void prefs_other_create(void)
                               "netscape -remote 'openURL(%s,raise)'",
                               "netscape '%s'",
                               "gnome-moz-remote --raise --newwin '%s'",
-                              "kfmclient openProfile webbrowsing '%s'",
+                              "kfmclient openURL '%s'",
                               "opera -newwindow '%s'",        
                               "kterm -e w3m '%s'",
                               "kterm -e lynx '%s'",