X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-tny-msg.c;h=b56ef3ab2483f7ecb7f927e8f66841ebfaf76a62;hp=493402896f47dcad8aa7045aa2a1f318d6bc8baa;hb=0b89af7ad6d3143f55dddb1407d5f05fbbe4116f;hpb=0cb97e907d893c0b3f8d240c4355b3b7b16bea2d diff --git a/src/modest-tny-msg.c b/src/modest-tny-msg.c index 4934028..b56ef3a 100644 --- a/src/modest-tny-msg.c +++ b/src/modest-tny-msg.c @@ -659,6 +659,7 @@ create_reply_forward_mail (TnyMsg *msg, TnyHeader *header, const gchar *from, gchar *subject_prefix; gboolean no_text_part; gchar *parent_uid; + gboolean forward_as_attach = FALSE; if (header) g_object_ref (header); @@ -688,8 +689,10 @@ create_reply_forward_mail (TnyMsg *msg, TnyHeader *header, const gchar *from, attachments); else { if (no_text_part || (html_body && (strcmp (tny_mime_part_get_content_type (html_body), "text/html")==0))) { + forward_as_attach = TRUE; new_msg = modest_formatter_attach (formatter, msg, header); } else { + forward_as_attach = FALSE; new_msg = modest_formatter_inline (formatter, body, header, attachments); } @@ -737,7 +740,7 @@ create_reply_forward_mail (TnyMsg *msg, TnyHeader *header, const gchar *from, g_object_unref (G_OBJECT (header)); /* ugly to unref it here instead of in the calling func */ - if (!is_reply & !no_text_part) { + if (!is_reply & !forward_as_attach) { add_attachments (TNY_MIME_PART (new_msg), attachments, FALSE, NULL); }