aboutsummaryrefslogtreecommitdiffstats
path: root/em-format
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2012-06-08 22:09:53 +0800
committerDan Vrátil <dvratil@redhat.com>2012-06-08 23:08:00 +0800
commitc4071b0a1d38a478d3ba51c81af222cdeb4ed4fd (patch)
tree52b0f8825f9defd6accf554c5b26ae1c8c7ead94 /em-format
parenta601031be2fa34f3f860179c8448cc0b04d4bfa4 (diff)
downloadgsoc2013-evolution-c4071b0a1d38a478d3ba51c81af222cdeb4ed4fd.tar
gsoc2013-evolution-c4071b0a1d38a478d3ba51c81af222cdeb4ed4fd.tar.gz
gsoc2013-evolution-c4071b0a1d38a478d3ba51c81af222cdeb4ed4fd.tar.bz2
gsoc2013-evolution-c4071b0a1d38a478d3ba51c81af222cdeb4ed4fd.tar.lz
gsoc2013-evolution-c4071b0a1d38a478d3ba51c81af222cdeb4ed4fd.tar.xz
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')
-rw-r--r--em-format/e-mail-formatter.c20
-rw-r--r--em-format/e-mail-formatter.h2
2 files changed, 22 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
diff --git a/em-format/e-mail-formatter.h b/em-format/e-mail-formatter.h
index aea18439b2..c0c21c13b0 100644
--- a/em-format/e-mail-formatter.h
+++ b/em-format/e-mail-formatter.h
@@ -126,6 +126,8 @@ struct _EMailFormatterClass {
GtkStyle *style,
GtkStateType state);
+ /* Signals */
+ void (*need_redraw) (EMailFormatter *formatter);
};
GType e_mail_formatter_get_type (void);