[evolution/webkit: 17/171] Adapt EMsgComposer to the new EMFormat API
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit: 17/171] Adapt EMsgComposer to the new EMFormat API
- Date: Fri, 24 Feb 2012 12:35:52 +0000 (UTC)
commit df74d30aaac1fbe37e45e0bed5f85f3b47059528
Author: Dan VrÃtil <dvratil redhat com>
Date: Fri Aug 26 16:38:47 2011 +0200
Adapt EMsgComposer to the new EMFormat API
This only makes EMsgComposer compile against the new EMFormat API,
but the formatting does not work. It can be still used to compose
and send emails, it will just lack some formatting when replying
existing emails.
composer/e-msg-composer.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 3a44fa2..e0c6ecf 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -193,19 +193,20 @@ emcu_part_to_html (CamelMimePart *part,
camel_stream_mem_set_byte_array (mem, buf);
emfq = em_format_quote_new (NULL, (CamelStream *) mem, EM_FORMAT_QUOTE_KEEP_SIG);
- ((EMFormat *) emfq)->composer = TRUE;
+ em_format_set_composer ((EMFormat *) emfq, TRUE);
if (source) {
/* Copy over things we can, other things are internal.
* XXX Perhaps need different api than 'clone'. */
- if (source->default_charset)
+ if (em_format_get_default_charset (source))
em_format_set_default_charset (
- (EMFormat *) emfq, source->default_charset);
- if (source->charset)
- em_format_set_default_charset (
- (EMFormat *) emfq, source->charset);
+ (EMFormat *) emfq, em_format_get_default_charset (source));
+ if (em_format_get_charset (source))
+ em_format_set_charset (
+ (EMFormat *) emfq, em_format_get_charset (source));
}
- em_format_part (
- EM_FORMAT (emfq), CAMEL_STREAM (mem), part, cancellable);
+
+ em_format_format_text (EM_FORMAT (emfq),
+ CAMEL_STREAM (mem), CAMEL_DATA_WRAPPER (part), cancellable);
g_object_unref (emfq);
camel_stream_write((CamelStream *) mem, "", 1, cancellable, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]