aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-formatter-error.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-error.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-error.c')
-rw-r--r--em-format/e-mail-formatter-error.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/em-format/e-mail-formatter-error.c b/em-format/e-mail-formatter-error.c
index 9c53a99e61..117fcd6e03 100644
--- a/em-format/e-mail-formatter-error.c
+++ b/em-format/e-mail-formatter-error.c
@@ -45,13 +45,14 @@ emfe_error_format (EMailFormatterExtension *extension,
EMailFormatter *formatter,
EMailFormatterContext *context,
EMailPart *part,
- CamelStream *stream,
+ GOutputStream *stream,
GCancellable *cancellable)
{
- CamelStream *filtered_stream;
+ GOutputStream *filtered_stream;
CamelMimeFilter *filter;
CamelMimePart *mime_part;
CamelDataWrapper *dw;
+ const gchar *string;
gchar *html;
mime_part = e_mail_part_ref_mime_part (part);
@@ -68,28 +69,27 @@ emfe_error_format (EMailFormatterExtension *extension,
"<td style=\"color: red;\">",
"dialog-error", GTK_ICON_SIZE_DIALOG);
- camel_stream_write_string (stream, html, cancellable, NULL);
+ g_output_stream_write_all (
+ stream, html, strlen (html), NULL, cancellable, NULL);
+
g_free (html);
- filtered_stream = camel_stream_filter_new (stream);
filter = camel_mime_filter_tohtml_new (
CAMEL_MIME_FILTER_TOHTML_CONVERT_NL |
CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
- camel_stream_filter_add (CAMEL_STREAM_FILTER (filtered_stream), filter);
+ filtered_stream = camel_filter_output_stream_new (stream, filter);
g_object_unref (filter);
- camel_data_wrapper_decode_to_stream_sync (dw, filtered_stream, cancellable, NULL);
- camel_stream_flush (filtered_stream, cancellable, NULL);
+ camel_data_wrapper_decode_to_output_stream_sync (
+ dw, filtered_stream, cancellable, NULL);
+ g_output_stream_flush (filtered_stream, cancellable, NULL);
+
g_object_unref (filtered_stream);
- camel_stream_write_string (
- stream,
- "</td>\n"
- "</tr>\n"
- "</table>\n"
- "</div>\n"
- "</div>",
- cancellable, NULL);
+ string = "</td></tr></table></div></div>";
+
+ g_output_stream_write_all (
+ stream, string, strlen (string), NULL, cancellable, NULL);
g_object_unref (mime_part);