\n", cancellable, NULL); /* output some info about it */ text = em_format_describe_part (part, mime_type); html = camel_text_to_html ( text, emfq->text_html_flags & CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0); camel_stream_write_string (stream, html, cancellable, NULL); g_free (html); g_free (text); camel_stream_write_string ( stream, " |
\n"); if (((CamelMimePart *)emf->message) != part) { camel_stream_printf ( stream, "%s\n", _("-------- Forwarded Message --------")); emfq_format_headers (emfq, stream, (CamelMedium *)part); } else if (emfq->flags & EM_FORMAT_QUOTE_HEADERS) emfq_format_headers (emfq, stream, (CamelMedium *)part); em_format_part (emf, stream, part, cancellable); if (emfq->flags & EM_FORMAT_QUOTE_CITE) camel_stream_write_string ( stream, "", cancellable, NULL); } static void emfq_text_plain (EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info, GCancellable *cancellable, gboolean is_fallback) { EMFormatQuote *emfq = EM_FORMAT_QUOTE (emf); CamelStream *filtered_stream; CamelMimeFilter *html_filter; CamelMimeFilter *sig_strip; CamelContentType *type; const gchar *format; guint32 rgb = 0x737373, flags; if (!part) return; flags = emfq->text_html_flags; /* Check for RFC 2646 flowed text. */ type = camel_mime_part_get_content_type (part); if (camel_content_type_is(type, "text", "plain") && (format = camel_content_type_param(type, "format")) && !g_ascii_strcasecmp(format, "flowed")) flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED; filtered_stream = camel_stream_filter_new (stream); if ((emfq->flags & EM_FORMAT_QUOTE_KEEP_SIG) == 0) { sig_strip = em_stripsig_filter_new (); camel_stream_filter_add ( CAMEL_STREAM_FILTER (filtered_stream), sig_strip); g_object_unref (sig_strip); } html_filter = camel_mime_filter_tohtml_new (flags, rgb); camel_stream_filter_add ( CAMEL_STREAM_FILTER (filtered_stream), html_filter); g_object_unref (html_filter); em_format_format_text ( EM_FORMAT (emfq), filtered_stream, CAMEL_DATA_WRAPPER (part), cancellable); camel_stream_flush (filtered_stream, cancellable, NULL); g_object_unref (filtered_stream); } static void emfq_text_enriched (EMFormat *emf, CamelStream *stream, CamelMimePart *part, const EMFormatHandler *info, GCancellable *cancellable, gboolean is_fallback) { CamelStream *filtered_stream; CamelMimeFilter *enriched; guint32 flags = 0; if (g_strcmp0 (info->mime_type, "text/richtext") == 0) { flags = CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT; camel_stream_write_string ( stream, "\n\n", cancellable, NULL); } else { camel_stream_write_string ( stream, "\n\n", cancellable, NULL); } enriched = camel_mime_filter_enriched_new (flags); filtered_stream = camel_stream_filter_new (stream); camel_stream_filter_add ( CAMEL_STREAM_FILTER (filtered_stream), enriched); g_object_unref (enriched); camel_stream_write_string (stream, "