aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-formatter-quote-text-plain.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2014-02-25 23:23:11 +0800
committerMatthew Barnes <mbarnes@redhat.com>2014-03-01 03:38:11 +0800
commitf4bb7d7748f3c407858e9c844d365411c586d861 (patch)
tree5946af137b2439857433fd9729ba758e9cd3c05d /em-format/e-mail-formatter-quote-text-plain.c
parentc3f8c95322ca7e461444820c7469d5527c239b05 (diff)
downloadgsoc2013-evolution-f4bb7d7748f3c407858e9c844d365411c586d861.tar
gsoc2013-evolution-f4bb7d7748f3c407858e9c844d365411c586d861.tar.gz
gsoc2013-evolution-f4bb7d7748f3c407858e9c844d365411c586d861.tar.bz2
gsoc2013-evolution-f4bb7d7748f3c407858e9c844d365411c586d861.tar.lz
gsoc2013-evolution-f4bb7d7748f3c407858e9c844d365411c586d861.tar.xz
gsoc2013-evolution-f4bb7d7748f3c407858e9c844d365411c586d861.tar.zst
gsoc2013-evolution-f4bb7d7748f3c407858e9c844d365411c586d861.zip
EMailFormatter: Use GOutputStream instead of CamelStream.
Diffstat (limited to 'em-format/e-mail-formatter-quote-text-plain.c')
-rw-r--r--em-format/e-mail-formatter-quote-text-plain.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/em-format/e-mail-formatter-quote-text-plain.c b/em-format/e-mail-formatter-quote-text-plain.c
index d0623f270c..d53cc53ca8 100644
--- a/em-format/e-mail-formatter-quote-text-plain.c
+++ b/em-format/e-mail-formatter-quote-text-plain.c
@@ -49,12 +49,12 @@ emqfe_text_plain_format (EMailFormatterExtension *extension,
EMailFormatter *formatter,
EMailFormatterContext *context,
EMailPart *part,
- CamelStream *stream,
+ GOutputStream *stream,
GCancellable *cancellable)
{
- CamelStream *filtered_stream;
- CamelMimeFilter *html_filter;
- CamelMimeFilter *sig_strip;
+ GOutputStream *filtered_stream;
+ GOutputStream *temp_stream;
+ CamelMimeFilter *filter;
CamelMimePart *mime_part;
CamelContentType *type;
EMailFormatterQuoteContext *qf_context;
@@ -83,24 +83,27 @@ emqfe_text_plain_format (EMailFormatterExtension *extension,
&& !g_ascii_strcasecmp (format, "flowed"))
text_flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED;
- filtered_stream = camel_stream_filter_new (stream);
+ filtered_stream = g_object_ref (stream);
if ((qf_context->qf_flags & E_MAIL_FORMATTER_QUOTE_FLAG_KEEP_SIG) == 0) {
- sig_strip = e_mail_stripsig_filter_new (TRUE);
- camel_stream_filter_add (
- CAMEL_STREAM_FILTER (filtered_stream), sig_strip);
- g_object_unref (sig_strip);
+ filter = e_mail_stripsig_filter_new (TRUE);
+ temp_stream = camel_filter_output_stream_new (
+ filtered_stream, filter);
+ g_object_unref (filtered_stream);
+ filtered_stream = temp_stream;
+ g_object_unref (filter);
}
- html_filter = camel_mime_filter_tohtml_new (text_flags, rgb);
- camel_stream_filter_add (
- CAMEL_STREAM_FILTER (filtered_stream), html_filter);
- g_object_unref (html_filter);
+ filter = camel_mime_filter_tohtml_new (text_flags, rgb);
+ temp_stream = camel_filter_output_stream_new (filtered_stream, filter);
+ g_object_unref (filtered_stream);
+ filtered_stream = temp_stream;
+ g_object_unref (filter);
e_mail_formatter_format_text (
formatter, part, filtered_stream, cancellable);
- camel_stream_flush (filtered_stream, cancellable, NULL);
+ g_output_stream_flush (filtered_stream, cancellable, NULL);
g_object_unref (filtered_stream);
g_object_unref (mime_part);