2007-06-04 [colin] 2.9.2cvs37
authorColin Leroy <colin@colino.net>
Mon, 4 Jun 2007 16:51:29 +0000 (16:51 +0000)
committerColin Leroy <colin@colino.net>
Mon, 4 Jun 2007 16:51:29 +0000 (16:51 +0000)
* src/compose.c
Use original mail file for forward/redirect
Fixes some forwarded mails to be attached as
application/octet-stream (when they have binary
parts), and incidentally fixes bug 848
'Redirect breaks GnuPG'

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index db4db67351cab79dd011b69fe3406beb1b33d214..ee5fbf4c46514bbce9fa8b4685ee632e6f3e3b38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-06-04 [colin]     2.9.2cvs37
+
+       * src/compose.c
+               Use original mail file for forward/redirect
+               Fixes some forwarded mails to be attached as
+               application/octet-stream (when they have binary
+               parts), and incidentally fixes bug 848
+               'Redirect breaks GnuPG'
+
 2007-06-04 [wwp]       2.9.2cvs36
 
        * src/compose.c
 2007-06-04 [wwp]       2.9.2cvs36
 
        * src/compose.c
index 7eed91b8eb213430735b9a9a2d65050a842c689a..56aefb6dfdc74f38b2be40f3866879d17ff4ce14 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.105.2.99 -r 1.105.2.100 src/prefs_account.c;  cvs diff -u -r 1.49.2.30 -r 1.49.2.31 src/prefs_account.h;  ) > 2.9.2cvs34.patchset
 ( cvs diff -u -r 1.1.2.20 -r 1.1.2.21 src/prefs_compose_writing.c;  cvs diff -u -r 1.1.2.20 -r 1.1.2.21 src/prefs_quote.c;  ) > 2.9.2cvs35.patchset
 ( cvs diff -u -r 1.382.2.383 -r 1.382.2.384 src/compose.c;  ) > 2.9.2cvs36.patchset
 ( cvs diff -u -r 1.105.2.99 -r 1.105.2.100 src/prefs_account.c;  cvs diff -u -r 1.49.2.30 -r 1.49.2.31 src/prefs_account.h;  ) > 2.9.2cvs34.patchset
 ( cvs diff -u -r 1.1.2.20 -r 1.1.2.21 src/prefs_compose_writing.c;  cvs diff -u -r 1.1.2.20 -r 1.1.2.21 src/prefs_quote.c;  ) > 2.9.2cvs35.patchset
 ( cvs diff -u -r 1.382.2.383 -r 1.382.2.384 src/compose.c;  ) > 2.9.2cvs36.patchset
+( cvs diff -u -r 1.382.2.384 -r 1.382.2.385 src/compose.c;  ) > 2.9.2cvs37.patchset
index f92148c931a2f3057fa033bb1bc37d96cd3f1aff..967edc92a1a28436bc7d36f74ee8d4a638be85a3 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=36
+EXTRA_VERSION=37
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index e8e8c5c7ad3feacaae0dd3a832bd0dcfbfff82b2..8493f011dc15495eac6654c8c4d2c06594bcf4ee 100644 (file)
@@ -1569,7 +1569,7 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo,
        if (as_attach) {
                gchar *msgfile;
 
        if (as_attach) {
                gchar *msgfile;
 
-               msgfile = procmsg_get_message_file_path(msginfo);
+               msgfile = procmsg_get_message_file(msginfo);
                if (!is_file_exist(msgfile))
                        g_warning("%s: file not exist\n", msgfile);
                else
                if (!is_file_exist(msgfile))
                        g_warning("%s: file not exist\n", msgfile);
                else
@@ -1702,7 +1702,7 @@ static Compose *compose_forward_multiple(PrefsAccount *account, GSList *msginfo_
        
        undo_block(compose->undostruct);
        for (msginfo = msginfo_list; msginfo != NULL; msginfo = msginfo->next) {
        
        undo_block(compose->undostruct);
        for (msginfo = msginfo_list; msginfo != NULL; msginfo = msginfo->next) {
-               msgfile = procmsg_get_message_file_path((MsgInfo *)msginfo->data);
+               msgfile = procmsg_get_message_file((MsgInfo *)msginfo->data);
 
                if (!is_file_exist(msgfile))
                        g_warning("%s: file not exist\n", msgfile);
 
                if (!is_file_exist(msgfile))
                        g_warning("%s: file not exist\n", msgfile);
@@ -2074,7 +2074,7 @@ Compose *compose_redirect(PrefsAccount *account, MsgInfo *msginfo,
 
        gtk_widget_grab_focus(compose->header_last->entry);
 
 
        gtk_widget_grab_focus(compose->header_last->entry);
 
-       filename = procmsg_get_message_file_path(msginfo);
+       filename = procmsg_get_message_file(msginfo);
 
        if (filename == NULL) {
                compose->updating = FALSE;
 
        if (filename == NULL) {
                compose->updating = FALSE;
@@ -3398,9 +3398,10 @@ static void compose_attach_parts(Compose *compose, MsgInfo *msginfo)
 
                        /* if we meet a pgp signature, we don't attach it, but
                         * we force signing. */
 
                        /* if we meet a pgp signature, we don't attach it, but
                         * we force signing. */
-                       if (strcmp(content_type, "application/pgp-signature") &&
+                       if ((strcmp(content_type, "application/pgp-signature") &&
                            strcmp(content_type, "application/pkcs7-signature") &&
                            strcmp(content_type, "application/pkcs7-signature") &&
-                           strcmp(content_type, "application/x-pkcs7-signature")) {
+                           strcmp(content_type, "application/x-pkcs7-signature"))
+                           || compose->mode == COMPOSE_REDIRECT) {
                                partname = procmime_mimeinfo_get_parameter(child, "filename");
                                if (partname == NULL)
                                        partname = procmime_mimeinfo_get_parameter(child, "name");
                                partname = procmime_mimeinfo_get_parameter(child, "filename");
                                if (partname == NULL)
                                        partname = procmime_mimeinfo_get_parameter(child, "name");
@@ -9733,7 +9734,9 @@ static void compose_reply_from_messageview_real(MessageView *msgview, GSList *ms
                                if (procmime_msginfo_is_encrypted(orig_msginfo)) {
                                        originally_enc = TRUE;
                                }
                                if (procmime_msginfo_is_encrypted(orig_msginfo)) {
                                        originally_enc = TRUE;
                                }
-                       } 
+                               tmp_msginfo->folder = orig_msginfo->folder;
+                               tmp_msginfo->msgnum = orig_msginfo->msgnum; 
+                       }
                }
        }
 
                }
        }