aboutsummaryrefslogtreecommitdiffstats
path: root/em-format
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2012-07-25 17:29:22 +0800
committerDan Vrátil <dvratil@redhat.com>2012-07-25 17:29:22 +0800
commit8663b54cae296883452850f3baad6d4cbc92e220 (patch)
treef895a43b817e0115a57bc639b2b6a9e40caa1193 /em-format
parentb456ff5423b9f4ffe5719e460e4b769bed28c934 (diff)
downloadgsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.tar
gsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.tar.gz
gsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.tar.bz2
gsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.tar.lz
gsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.tar.xz
gsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.tar.zst
gsoc2013-evolution-8663b54cae296883452850f3baad6d4cbc92e220.zip
Highlighting of text parts and source codes
This adds 'Format as' submenu to the preview pane context menu. The submenu is available only for text/plain parts or parts with a source code (we support about 40 various types). Using the 'highlight' utility, the formatter processes the part and highlights the source code it contains. (discussion in bug #680026)
Diffstat (limited to 'em-format')
-rw-r--r--em-format/e-mail-formatter.h2
-rw-r--r--em-format/e-mail-parser-text-plain.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/em-format/e-mail-formatter.h b/em-format/e-mail-formatter.h
index c0c21c13b0..9b4e84d262 100644
--- a/em-format/e-mail-formatter.h
+++ b/em-format/e-mail-formatter.h
@@ -96,6 +96,8 @@ struct _EMailFormatterContext {
EMailFormatterMode mode;
guint32 flags;
+
+ gchar *uri;
};
struct _EMailFormatter {
diff --git a/em-format/e-mail-parser-text-plain.c b/em-format/e-mail-parser-text-plain.c
index 00a7b53b18..1795d019a9 100644
--- a/em-format/e-mail-parser-text-plain.c
+++ b/em-format/e-mail-parser-text-plain.c
@@ -98,8 +98,7 @@ process_part (EMailParser *parser,
}
type = camel_mime_part_get_content_type (part);
- if (camel_content_type_is (type, "text", "*") &&
- (!camel_content_type_is (type, "text", "calendar"))) {
+ if (!camel_content_type_is (type, "text", "calendar")) {
g_string_append_printf (part_id, ".plain_text.%d", part_number);