From b28d4738f24ecf8e001fc920b498e4ed1e7c90d6 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 25 May 2004 16:16:25 +0000 Subject: a few fixes. 2004-05-25 Jeffrey Stedfast * mail-errors.xml: a few fixes. * em-format-quote.c (emfq_text_plain): Only strip the signature if we are in some wy modifying the content (we don't want to remove the signature if we are editing the message as a new message). Fixes bug #58826. svn path=/trunk/; revision=26079 --- mail/em-format-quote.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'mail/em-format-quote.c') diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c index f0f45787ae..e25b182a31 100644 --- a/mail/em-format-quote.c +++ b/mail/em-format-quote.c @@ -427,7 +427,7 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E CamelContentType *type; const char *format; guint32 rgb = 0x737373, flags; - + flags = emfq->text_html_flags; /* Check for RFC 2646 flowed text. */ @@ -437,13 +437,17 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E && !g_ascii_strcasecmp(format, "flowed")) flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED; - sig_strip = em_stripsig_filter_new(); - html_filter = camel_mime_filter_tohtml_new(flags, rgb); filtered_stream = camel_stream_filter_new_with_stream(stream); - camel_stream_filter_add(filtered_stream, sig_strip); + + if (emfq->flags != 0) { + sig_strip = em_stripsig_filter_new (); + camel_stream_filter_add (filtered_stream, sig_strip); + camel_object_unref (sig_strip); + } + + html_filter = camel_mime_filter_tohtml_new(flags, rgb); camel_stream_filter_add(filtered_stream, html_filter); camel_object_unref(html_filter); - camel_object_unref(sig_strip); em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, camel_medium_get_content_object((CamelMedium *)part)); camel_stream_flush((CamelStream *)filtered_stream); -- cgit