2011-08-29 [colin] 3.7.10cvs5
authorColin Leroy <colin@colino.net>
Mon, 29 Aug 2011 13:00:44 +0000 (13:00 +0000)
committerColin Leroy <colin@colino.net>
Mon, 29 Aug 2011 13:00:44 +0000 (13:00 +0000)
* src/account.c
* src/compose.c
* src/prefs_account.c
* src/prefs_account.h
Revert cvs4 which is rather illogical and instead
use Fabian's patch from bug #2471

ChangeLog
PATCHSETS
configure.ac
src/account.c
src/compose.c
src/prefs_account.c
src/prefs_account.h

index d253065..31f4e85 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-08-29 [colin]     3.7.10cvs5
+
+       * src/account.c
+       * src/compose.c
+       * src/prefs_account.c
+       * src/prefs_account.h
+               Revert cvs4 which is rather illogical and instead
+               use Fabian's patch from bug #2471
+
 2011-08-29 [colin]     3.7.10cvs4
 
        * src/compose.c
index 509da65..c543160 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.204.2.201 -r 1.204.2.202 src/prefs_common.c;  cvs diff -u -r 1.103.2.132 -r 1.103.2.133 src/prefs_common.h;  cvs diff -u -r 1.395.2.429 -r 1.395.2.430 src/summaryview.c;  ) > 3.7.10cvs2.patchset
 ( cvs diff -u -r 1.1.2.29 -r 1.1.2.30 src/image_viewer.c;  cvs diff -u -r 1.96.2.231 -r 1.96.2.232 src/textview.c;  cvs diff -u -r 1.5.2.94 -r 1.5.2.95 src/gtk/gtkutils.c;  cvs diff -u -r 1.4.2.56 -r 1.4.2.57 src/gtk/gtkutils.h;  ) > 3.7.10cvs3.patchset
 ( cvs diff -u -r 1.382.2.578 -r 1.382.2.579 src/compose.c;  ) > 3.7.10cvs4.patchset
+( cvs diff -u -r 1.61.2.97 -r 1.61.2.98 src/account.c;  cvs diff -u -r 1.382.2.579 -r 1.382.2.580 src/compose.c;  cvs diff -u -r 1.105.2.166 -r 1.105.2.167 src/prefs_account.c;  cvs diff -u -r 1.49.2.45 -r 1.49.2.46 src/prefs_account.h;  ) > 3.7.10cvs5.patchset
index 5af304c..95de545 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=4
+EXTRA_VERSION=5
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 25171a6..a3ce627 100644 (file)
@@ -938,6 +938,7 @@ static void account_clone(GtkWidget *widget, gpointer data)
 
        /* send */
        ACP_FASSIGN(gen_msgid);
+       ACP_FASSIGN(gen_xmailer);
        ACP_FASSIGN(add_customhdr);
        ACP_FASSIGN(use_smtp_auth);
        ACP_FASSIGN(smtp_auth_type);
index 099ac1f..96e492a 100644 (file)
@@ -6232,7 +6232,8 @@ static gchar *compose_get_header(Compose *compose)
        }
 
        /* Program version and system info */
-       if (g_slist_length(compose->to_list) && !IS_IN_CUSTOM_HEADER("X-Mailer") &&
+       if (compose->account->gen_xmailer &&
+           g_slist_length(compose->to_list) && !IS_IN_CUSTOM_HEADER("X-Mailer") &&
            !compose->newsgroup_list) {
                g_string_append_printf(header, "X-Mailer: %s (GTK+ %d.%d.%d; %s)\n",
                        prog_version,
index 705e66b..2b5557e 100644 (file)
@@ -162,6 +162,7 @@ typedef struct SendPage
     GtkWidget *vbox;
 
        GtkWidget *msgid_checkbtn;
+       GtkWidget *xmailer_checkbtn;
        GtkWidget *customhdr_checkbtn;
        GtkWidget *msgid_with_addr_checkbtn;
        GtkWidget *smtp_auth_checkbtn;
@@ -500,6 +501,10 @@ static PrefParam send_param[] = {
         &send_page.msgid_checkbtn,
         prefs_set_data_from_toggle, prefs_set_toggle},
 
+       {"generate_xmailer", "TRUE", &tmp_ac_prefs.gen_xmailer, P_BOOL,
+        &send_page.xmailer_checkbtn,
+        prefs_set_data_from_toggle, prefs_set_toggle},
+
        {"add_custom_header", "FALSE", &tmp_ac_prefs.add_customhdr, P_BOOL,
         &send_page.customhdr_checkbtn,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -1652,6 +1657,7 @@ static void send_create_widget_func(PrefsPage * _page,
        GtkWidget *vbox2;
        GtkWidget *frame;
        GtkWidget *msgid_checkbtn;
+       GtkWidget *xmailer_checkbtn;
        GtkWidget *hbox;
        GtkWidget *customhdr_checkbtn;
        GtkWidget *customhdr_edit_btn;
@@ -1683,6 +1689,9 @@ static void send_create_widget_func(PrefsPage * _page,
        PACK_CHECK_BUTTON (vbox2, checkbtn_msgid_with_addr,
                           _("Send account mail address in Message-ID"));
 
+       PACK_CHECK_BUTTON (vbox2, xmailer_checkbtn,
+                          _("Generate X-Mailer header"));
+
        hbox = gtk_hbox_new (FALSE, 12);
        gtk_widget_show (hbox);
        gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
@@ -1831,6 +1840,7 @@ static void send_create_widget_func(PrefsPage * _page,
        gtk_box_pack_start (GTK_BOX (hbox), pop_auth_minutes_lbl, FALSE, FALSE, 0);
        
        page->msgid_checkbtn     = msgid_checkbtn;
+       page->xmailer_checkbtn   = xmailer_checkbtn;
        page->customhdr_checkbtn = customhdr_checkbtn;
        page->msgid_with_addr_checkbtn  = checkbtn_msgid_with_addr;
 
@@ -3909,8 +3919,10 @@ static void prefs_account_protocol_set_optmenu(PrefParam *pparam)
                                        GTK_TOGGLE_BUTTON(send_page.msgid_checkbtn), 
                                        TRUE);
                        gtk_widget_hide(send_page.msgid_checkbtn);
+                       gtk_widget_hide(send_page.xmailer_checkbtn);
                } else {
                        gtk_widget_show(send_page.msgid_checkbtn);
+                       gtk_widget_show(send_page.xmailer_checkbtn);
                }
        }
 }
@@ -4060,6 +4072,7 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
                gtk_widget_hide(protocol_optmenu->no_imap_warn_label);
 #endif
                gtk_widget_show(send_page.msgid_checkbtn);
+               gtk_widget_show(send_page.xmailer_checkbtn);
                gtk_widget_show(basic_page.nntpserv_label);
                gtk_widget_show(basic_page.nntpserv_entry);
                gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
@@ -4157,6 +4170,7 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
                break;
        case A_LOCAL:
                gtk_widget_show(send_page.msgid_checkbtn);
+               gtk_widget_show(send_page.xmailer_checkbtn);
                gtk_widget_hide(protocol_optmenu->no_imap_warn_icon);
                gtk_widget_hide(protocol_optmenu->no_imap_warn_label);
                gtk_widget_hide(basic_page.nntpserv_label);
@@ -4260,6 +4274,11 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
                                GTK_TOGGLE_BUTTON(send_page.msgid_checkbtn), 
                                TRUE);
                gtk_widget_hide(send_page.msgid_checkbtn);
+               if (new_account)
+                       gtk_toggle_button_set_active(
+                               GTK_TOGGLE_BUTTON(send_page.xmailer_checkbtn),
+                               TRUE);
+               gtk_widget_hide(send_page.xmailer_checkbtn);
                gtk_widget_hide(basic_page.nntpserv_label);
                gtk_widget_hide(basic_page.nntpserv_entry);
                gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
@@ -4356,6 +4375,7 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
                break;
        case A_NONE:
                gtk_widget_show(send_page.msgid_checkbtn);
+               gtk_widget_show(send_page.xmailer_checkbtn);
                gtk_widget_hide(protocol_optmenu->no_imap_warn_icon);
                gtk_widget_hide(protocol_optmenu->no_imap_warn_label);
                gtk_widget_hide(basic_page.nntpserv_label);
@@ -4450,6 +4470,7 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
        case A_POP3:
        default:
                gtk_widget_show(send_page.msgid_checkbtn);
+               gtk_widget_show(send_page.xmailer_checkbtn);
                gtk_widget_hide(protocol_optmenu->no_imap_warn_icon);
                gtk_widget_hide(protocol_optmenu->no_imap_warn_label);
                gtk_widget_hide(basic_page.nntpserv_label);
index ce8689a..4dc5227 100644 (file)
@@ -106,6 +106,7 @@ struct _PrefsAccount
 
        /* Send */
        gboolean gen_msgid;
+       gboolean gen_xmailer;
        gboolean add_customhdr;
        gboolean use_smtp_auth;
        SMTPAuthType smtp_auth_type;