diff options
author | Dan Vrátil <dvratil@redhat.com> | 2012-06-08 22:09:53 +0800 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2012-06-08 23:08:00 +0800 |
commit | c4071b0a1d38a478d3ba51c81af222cdeb4ed4fd (patch) | |
tree | 52b0f8825f9defd6accf554c5b26ae1c8c7ead94 /em-format/e-mail-formatter.c | |
parent | a601031be2fa34f3f860179c8448cc0b04d4bfa4 (diff) | |
download | gsoc2013-evolution-c4071b0a1d38a478d3ba51c81af222cdeb4ed4fd.tar.gz gsoc2013-evolution-c4071b0a1d38a478d3ba51c81af222cdeb4ed4fd.tar.zst gsoc2013-evolution-c4071b0a1d38a478d3ba51c81af222cdeb4ed4fd.zip |
Fix displayed message headers
The new formatter was ignoring selected headers, always displaying
only From, To, Subject and Date (default headers).
Handling of the currently displayed headers has been moved to
EMailConfigFormatHTML extension, because it is related to
configuration of EMailFormatter, rather then EMailReader.
Diffstat (limited to 'em-format/e-mail-formatter.c')
-rw-r--r-- | em-format/e-mail-formatter.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/em-format/e-mail-formatter.c b/em-format/e-mail-formatter.c index a08504a21f..0c8a0e7068 100644 --- a/em-format/e-mail-formatter.c +++ b/em-format/e-mail-formatter.c @@ -72,6 +72,13 @@ enum { PROP_DEFAULT_CHARSET }; +enum { + NEED_REDRAW, + LAST_SIGNAL +}; + +static int signals[LAST_SIGNAL]; + static void mail_formatter_run (EMailFormatter *formatter, EMailFormatterContext *context, @@ -492,6 +499,7 @@ e_mail_formatter_base_init (EMailFormatterClass *klass) CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS | CAMEL_MIME_FILTER_TOHTML_CONVERT_NL | CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES | + CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES | CAMEL_MIME_FILTER_TOHTML_MARK_CITATION; } @@ -691,6 +699,16 @@ e_mail_formatter_class_init (EMailFormatterClass *klass) NULL, NULL, G_PARAM_READWRITE)); + + signals[NEED_REDRAW] = g_signal_new ( + "need-redraw", + E_TYPE_MAIL_FORMATTER, + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EMailFormatterClass, need_redraw), + NULL, + NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0, NULL); } static void @@ -1414,6 +1432,8 @@ e_mail_formatter_add_header (EMailFormatter *formatter, h = e_mail_formatter_header_new (name, value); h->flags = flags; g_queue_push_tail (formatter->priv->header_list, h); + + g_signal_emit (formatter, signals[NEED_REDRAW], 0, NULL); } void |