diff options
author | Not Zed <NotZed@Ximian.com> | 2004-07-28 22:38:50 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-07-28 22:38:50 +0800 |
commit | 10bfd57c379db75b8def5b6bc1590f14484de03e (patch) | |
tree | 735c02e72bd543c02345ad561a0eeec4a061e5fa /mail/em-utils.c | |
parent | c43feee67589f6da65f5ea8fa586d458b363d44a (diff) | |
download | gsoc2013-evolution-10bfd57c379db75b8def5b6bc1590f14484de03e.tar.gz gsoc2013-evolution-10bfd57c379db75b8def5b6bc1590f14484de03e.tar.zst gsoc2013-evolution-10bfd57c379db75b8def5b6bc1590f14484de03e.zip |
** See #61940.
2004-07-28 Not Zed <NotZed@Ximian.com>
** See #61940.
* em-composer-utils.c (composer_set_body): add emformat source arg.
(em_utils_reply_to_message): take source arg. Fixed callers.
* em-utils.c (em_utils_message_to_html): take a source formatter
argument, so we can copy/honour settings from it.
(em_utils_part_to_html): similar.
svn path=/trunk/; revision=26757
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r-- | mail/em-utils.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c index 8e47f68254..f66690a052 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -1365,7 +1365,7 @@ em_utils_get_proxy_uri(void) * Return Value: The part in displayable html format. **/ char * -em_utils_part_to_html(CamelMimePart *part, ssize_t *len) +em_utils_part_to_html(CamelMimePart *part, ssize_t *len, EMFormat *source) { EMFormatQuote *emfq; CamelStreamMem *mem; @@ -1378,6 +1378,13 @@ em_utils_part_to_html(CamelMimePart *part, ssize_t *len) emfq = em_format_quote_new(NULL, (CamelStream *)mem, 0); em_format_set_session((EMFormat *)emfq, session); + if (source) { + /* copy over things we can, other things are internal, perhaps need different api than 'clone' */ + if (source->default_charset) + em_format_set_default_charset((EMFormat *)emfq, source->default_charset); + if (source->charset) + em_format_set_default_charset((EMFormat *)emfq, source->charset); + } em_format_part((EMFormat *) emfq, (CamelStream *) mem, part); g_object_unref (emfq); @@ -1395,6 +1402,7 @@ em_utils_part_to_html(CamelMimePart *part, ssize_t *len) /** * em_utils_message_to_html: * @message: + * @source: * @credits: * @flags: EMFormatQuote flags * @@ -1404,7 +1412,7 @@ em_utils_part_to_html(CamelMimePart *part, ssize_t *len) * Return value: The html version. **/ char * -em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32 flags, ssize_t *len) +em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32 flags, ssize_t *len, EMFormat *source) { EMFormatQuote *emfq; CamelStreamMem *mem; @@ -1417,7 +1425,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32 emfq = em_format_quote_new(credits, (CamelStream *)mem, flags); em_format_set_session((EMFormat *)emfq, session); - em_format_format((EMFormat *)emfq, NULL, NULL, message); + em_format_format_clone((EMFormat *)emfq, NULL, NULL, message, source); g_object_unref (emfq); camel_stream_write ((CamelStream *) mem, "", 1); |