2005-05-05 [paul] 1.0.4cvs8
authorPaul Mangan <paul@claws-mail.org>
Thu, 5 May 2005 11:35:05 +0000 (11:35 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 5 May 2005 11:35:05 +0000 (11:35 +0000)
* AUTHORS
* src/compose.c
fix Bug 713 'Resent-To and Resent-Cc headers are garbled'
patch by Tim Mann

AUTHORS
ChangeLog.claws
PATCHSETS
configure.ac
src/compose.c

diff --git a/AUTHORS b/AUTHORS
index 60c674c..327786c 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -222,3 +222,4 @@ contributors (beside the above; based on Changelog)
        Rich Coe
        Ivan Rayner
        Markus Schwarzenberg
+       Tim Mann
index 11804e4..3c0261b 100644 (file)
@@ -1,3 +1,10 @@
+2005-05-05 [paul]      1.0.4cvs8
+
+       * AUTHORS
+       * src/compose.c
+               fix Bug 713 'Resent-To and Resent-Cc headers are garbled'
+               patch by Tim Mann
+
 2005-05-05 [paul]      1.0.4cvs7
 
        backported from GTK2...
index 9b34faa..8ae9e43 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.78 -r 1.79 src/account.c; cvs diff -u -r 1.482 -r 1.483 src/compose.c; cvs diff -u -r 1.72 -r 1.73 src/filtering.c; cvs diff -u -r 1.179 -r 1.180 src/inc.c; cvs diff -u -r 1.124 -r 1.125 src/prefs_account.c; cvs diff -u -r 1.57 -r 1.58 src/prefs_account.h; ) > 1.0.4cvs5.patchset
 ( cvs diff -u -r 1.65 -r 1.66 src/prefs_filtering.c; ) > 1.0.4cvs6.patchset
 ( cvs diff -u -r 1.483 -r 1.484 src/compose.c; cvs diff -u -r 1.259 -r 1.260 src/folderview.c; cvs diff -u -r 1.318 -r 1.319 src/mainwindow.c; cvs diff -u -r 1.136 -r 1.137 src/messageview.c; cvs diff -u -r 1.3 -r 1.4 src/partial_download.c; cvs diff -u -r 1.74 -r 1.75 src/pop.c; cvs diff -u -r 1.125 -r 1.126 src/prefs_account.c; cvs diff -u -r 1.233 -r 1.234 src/prefs_common.c; cvs diff -u -r 1.118 -r 1.119 src/prefs_common.h; cvs diff -u -r 1.66 -r 1.67 src/prefs_filtering.c; cvs diff -u -r 1.106 -r 1.107 src/procmime.c; cvs diff -u -r 1.18 -r 1.19 src/plugins/pgpmime/pgpmime.c; ) > 1.0.4cvs7.patchset
+( cvs diff -u -r 1.131 -r 1.132 AUTHORS; cvs diff -u -r 1.484 -r 1.485 src/compose.c; ) > 1.0.4cvs8.patchset
index b4cb48d..10d4608 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=7
+EXTRA_VERSION=8
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index c947796..38dfdce 100644 (file)
@@ -3234,13 +3234,11 @@ static gint compose_redirect_write_headers_from_headerlist(Compose *compose,
        to_hdr = prefs_common.trans_hdr ? _("To:") : "To:";
 
        first_to_address = TRUE;
-       first_cc_address = TRUE;
        for (list = compose->header_list; list; list = list->next) {
                headerentry = ((ComposeHeaderEntry *)list->data);
                headerentryname = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(headerentry->combo)->entry));
 
-               if (g_strcasecmp(headerentryname, cc_hdr) == 0 
-                  || g_strcasecmp(headerentryname, to_hdr) == 0) {
+               if (g_strcasecmp(headerentryname, to_hdr) == 0) {
                        str = gtk_entry_get_text(GTK_ENTRY(headerentry->entry));
                        Xstrdup_a(str, str, return -1);
                        g_strstrip(str);
@@ -3248,31 +3246,48 @@ static gint compose_redirect_write_headers_from_headerlist(Compose *compose,
                                compose_convert_header
                                        (buf, sizeof(buf), str,
                                        strlen("Resent-To") + 2, TRUE);
-                               if (g_strcasecmp(headerentryname, to_hdr) == 0) {
-                                       if (first_to_address) {
-                                               fprintf(fp, "Resent-To: ");
-                                               first_to_address = FALSE;
-                                       } else {
-                                               fprintf(fp, ",");
-                                       }
-                               }
-                               if (g_strcasecmp(headerentryname, cc_hdr) == 0) {
-                                       if (first_cc_address) {
-                                               fprintf(fp, "\n");
-                                               fprintf(fp, "Resent-Cc: ");
-                                               first_cc_address = FALSE;
-                                       } else {
-                                               fprintf(fp, ",");
-                                       }
-                               }
-                               
+
+                                if (first_to_address) {
+                                        fprintf(fp, "Resent-To: ");
+                                        first_to_address = FALSE;
+                                } else {
+                                        fprintf(fp, ",");
+                                }
                                fprintf(fp, "%s", buf);
                        }
                }
        }
-       /* if (!first_address) { */
-       fprintf(fp, "\n");
-       /* } */
+       if (!first_to_address) {
+               fprintf(fp, "\n");
+        }
+
+       first_cc_address = TRUE;
+       for (list = compose->header_list; list; list = list->next) {
+               headerentry = ((ComposeHeaderEntry *)list->data);
+               headerentryname = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(headerentry->combo)->entry));
+
+               if (g_strcasecmp(headerentryname, cc_hdr) == 0) {
+                       str = gtk_entry_get_text(GTK_ENTRY(headerentry->entry));
+                       Xstrdup_a(str, str, return -1);
+                       g_strstrip(str);
+                       if (str[0] != '\0') {
+                               compose_convert_header
+                                       (buf, sizeof(buf), str,
+                                       strlen("Resent-Cc") + 2, TRUE);
+
+                                if (first_cc_address) {
+                                        fprintf(fp, "Resent-Cc: ");
+                                        first_cc_address = FALSE;
+                                } else {
+                                        fprintf(fp, ",");
+                                }
+                               fprintf(fp, "%s", buf);
+                       }
+               }
+       }
+       if (!first_cc_address) {
+               fprintf(fp, "\n");
+        }
 
        return(0);
 }