diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-12-08 01:44:32 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-12-08 03:01:05 +0800 |
commit | c10235e6dd09d93fc6bbdeb8ef4d800be7c6f6d5 (patch) | |
tree | 458a2e3b37312d69627c7385eed5562da013f4a5 /em-format/e-mail-part-utils.c | |
parent | cab6eac8f14974ea1c2fedaf9143e98cf630c489 (diff) | |
download | gsoc2013-evolution-c10235e6dd09d93fc6bbdeb8ef4d800be7c6f6d5.tar.gz gsoc2013-evolution-c10235e6dd09d93fc6bbdeb8ef4d800be7c6f6d5.tar.zst gsoc2013-evolution-c10235e6dd09d93fc6bbdeb8ef4d800be7c6f6d5.zip |
EMailParserExtension: Convert get_flags() to an enum field.
Of the parser extensions that override get_flags(), they all return a
fixed set of flags. So we don't need an instance of the extension to
obtain its flags. Just make it an EMailParserExtensionFlags field in
the class structure.
Diffstat (limited to 'em-format/e-mail-part-utils.c')
-rw-r--r-- | em-format/e-mail-part-utils.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/em-format/e-mail-part-utils.c b/em-format/e-mail-part-utils.c index 6f8013d7a8..665a7b5996 100644 --- a/em-format/e-mail-part-utils.c +++ b/em-format/e-mail-part-utils.c @@ -533,15 +533,17 @@ e_mail_part_is_inline (CamelMimePart *mime_part, { const gchar *disposition; EMailParserExtension *extension; + EMailParserExtensionClass *class; if ((extensions == NULL) || g_queue_is_empty (extensions)) return FALSE; extension = g_queue_peek_head (extensions); + class = E_MAIL_PARSER_EXTENSION_GET_CLASS (extension); + /* Some types need to override the disposition. * e.g. application/x-pkcs7-mime */ - if (e_mail_parser_extension_get_flags (extension) & - E_MAIL_PARSER_EXTENSION_INLINE_DISPOSITION) + if (class->flags & E_MAIL_PARSER_EXTENSION_INLINE_DISPOSITION) return TRUE; disposition = camel_mime_part_get_disposition (mime_part); @@ -549,6 +551,5 @@ e_mail_part_is_inline (CamelMimePart *mime_part, return g_ascii_strcasecmp (disposition, "inline") == 0; /* Otherwise, use the default for this handler type. */ - return (e_mail_parser_extension_get_flags (extension) & - E_MAIL_PARSER_EXTENSION_INLINE) != 0; + return (class->flags & E_MAIL_PARSER_EXTENSION_INLINE) != 0; } |