diff options
author | Milan Crha <mcrha@redhat.com> | 2011-03-10 00:41:47 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-03-10 00:41:47 +0800 |
commit | eef2191a3a4fc8bb358b04a1eb0c10ba5f34e611 (patch) | |
tree | 26a41b417375f215e3618786de49d6b151a042bf /em-format/em-format-quote.c | |
parent | 46a52a54c4c7b3559f135a40d3bd77e644ce73ad (diff) | |
download | gsoc2013-evolution-eef2191a3a4fc8bb358b04a1eb0c10ba5f34e611.tar.gz gsoc2013-evolution-eef2191a3a4fc8bb358b04a1eb0c10ba5f34e611.tar.zst gsoc2013-evolution-eef2191a3a4fc8bb358b04a1eb0c10ba5f34e611.zip |
Bug #586461 - Remove signature also from HTML formatted emails on reply
Diffstat (limited to 'em-format/em-format-quote.c')
-rw-r--r-- | em-format/em-format-quote.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c index e2eb9d382b..e54ecf60ac 100644 --- a/em-format/em-format-quote.c +++ b/em-format/em-format-quote.c @@ -623,7 +623,7 @@ emfq_text_plain (EMFormat *emf, filtered_stream = camel_stream_filter_new (stream); if ((emfq->flags & EM_FORMAT_QUOTE_KEEP_SIG) == 0) { - sig_strip = em_stripsig_filter_new (); + sig_strip = em_stripsig_filter_new (TRUE); camel_stream_filter_add ( CAMEL_STREAM_FILTER (filtered_stream), sig_strip); g_object_unref (sig_strip); @@ -674,6 +674,7 @@ emfq_text_enriched (EMFormat *emf, camel_stream_write_string (stream, "<br><hr><br>", cancellable, NULL); em_format_format_text ( emf, filtered_stream, CAMEL_DATA_WRAPPER (part), cancellable); + camel_stream_flush (filtered_stream, cancellable, NULL); g_object_unref (filtered_stream); } @@ -687,8 +688,23 @@ emfq_text_html (EMFormat *emf, { camel_stream_write_string ( stream, "\n<!-- text/html -->\n", cancellable, NULL); - em_format_format_text ( - emf, stream, (CamelDataWrapper *)part, cancellable); + + if ((EM_FORMAT_QUOTE (emf)->flags & EM_FORMAT_QUOTE_KEEP_SIG) == 0) { + CamelMimeFilter *sig_strip; + CamelStream *filtered_stream; + + filtered_stream = camel_stream_filter_new (stream); + + sig_strip = em_stripsig_filter_new (FALSE); + camel_stream_filter_add (CAMEL_STREAM_FILTER (filtered_stream), sig_strip); + g_object_unref (sig_strip); + + em_format_format_text (emf, filtered_stream, (CamelDataWrapper *) part, cancellable); + camel_stream_flush (filtered_stream, cancellable, NULL); + g_object_unref (filtered_stream); + } else { + em_format_format_text (emf, stream, (CamelDataWrapper *)part, cancellable); + } } static void |