From 3fbbdd80ac987f2b9ac0b91b7fd16098bb3240c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Thu, 19 Apr 2012 09:20:07 +0200 Subject: Bug #674248 - Lost new lines from text/plain --- em-format/em-format-quote.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'em-format') diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c index 2ee8ddb2e9..c3231785bf 100644 --- a/em-format/em-format-quote.c +++ b/em-format/em-format-quote.c @@ -522,6 +522,24 @@ emfq_write_attachment (EMFormat *emf, handler->write_func (emf, puri, stream, info, cancellable); } +static void +emfq_write (EMFormat *emf, + CamelStream *stream, + EMFormatWriterInfo *info, + GCancellable *cancellable) +{ + GList *iter; + + for (iter = emf->mail_part_list; iter; iter = iter->next) { + + EMFormatPURI *puri = iter->data; + if (!puri || !puri->write_func) + continue; + + puri->write_func (emf, puri, stream, info, cancellable); + } +} + static void emfq_base_init (EMFormatQuoteClass *klass) { @@ -532,10 +550,14 @@ static void emfq_class_init (EMFormatQuoteClass *klass) { GObjectClass *object_class; + EMFormatClass *format_class; parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (EMFormatQuotePrivate)); + format_class = EM_FORMAT_CLASS (klass); + format_class->write = emfq_write; + object_class = G_OBJECT_CLASS (klass); object_class->dispose = emfq_dispose; object_class->finalize = emfq_finalize; @@ -550,7 +572,7 @@ emfq_init (EMFormatQuote *emfq) emfq->priv->text_html_flags = CAMEL_MIME_FILTER_TOHTML_PRE | CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS | - CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES; + CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES; } GType -- cgit v1.2.3