aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-parser-extension.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-02-01 22:15:23 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-02-01 22:36:45 +0800
commitce3d24ef62437762e2e0b930cadb5c00580a4596 (patch)
treef026863a5fc7adf640ed49e2c45e4b8e0e24b4fe /em-format/e-mail-parser-extension.h
parent9a0b1266b5686d4985fec8a0dae7fdf00b1b8dd9 (diff)
downloadgsoc2013-evolution-ce3d24ef62437762e2e0b930cadb5c00580a4596.tar
gsoc2013-evolution-ce3d24ef62437762e2e0b930cadb5c00580a4596.tar.gz
gsoc2013-evolution-ce3d24ef62437762e2e0b930cadb5c00580a4596.tar.bz2
gsoc2013-evolution-ce3d24ef62437762e2e0b930cadb5c00580a4596.tar.lz
gsoc2013-evolution-ce3d24ef62437762e2e0b930cadb5c00580a4596.tar.xz
gsoc2013-evolution-ce3d24ef62437762e2e0b930cadb5c00580a4596.tar.zst
gsoc2013-evolution-ce3d24ef62437762e2e0b930cadb5c00580a4596.zip
Add a priority field for mail formatter and parser extensions.
Add a priority field to EMailFormatterExtension and EMailParserExtension class structs. Extension classes can then explicitly specify a priority with respect to other extension classes with the same MIME type, so that the order of extension registration doesn't matter. Priority field defaults to G_PRIORITY_DEFAULT. Built-in formatters and extensions will use G_PRIORITY_LOW. We can get more sophisticated with priority values if we need to, but this should suffice for now.
Diffstat (limited to 'em-format/e-mail-parser-extension.h')
-rw-r--r--em-format/e-mail-parser-extension.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/em-format/e-mail-parser-extension.h b/em-format/e-mail-parser-extension.h
index 2b486a6dda..c011df62ab 100644
--- a/em-format/e-mail-parser-extension.h
+++ b/em-format/e-mail-parser-extension.h
@@ -81,6 +81,10 @@ struct _EMailParserExtensionClass {
* wildcard (e.g. "text/ *"). */
const gchar **mime_types;
+ /* This is used to prioritize extensions with identical MIME
+ * types. Lower values win. Defaults to G_PRIORITY_DEFAULT. */
+ gint priority;
+
/* See the flag descriptions above. */
EMailParserExtensionFlags flags;