diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-12-07 01:57:33 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-12-08 03:01:04 +0800 |
commit | 9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79 (patch) | |
tree | 8849353e617afe5207095fb6100a33e79989c9bc /em-format/e-mail-parser-message-rfc822.c | |
parent | 3924dc759dbf38df0f9ff6941990dcf242478617 (diff) | |
download | gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar.gz gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar.zst gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.zip |
EMailExtension: Replace mime_types() method with a string array.
In all implementations for EMailExtension, the MIME type list is a
static string array -- with the single exception of the text-highlight
module, where the MIME type list is dynamically assembled once.
Replace the mime_types() method with a "mime_types" string array in the
EMailExtensionInterface struct. Then the list of MIME types supported
by the class implementing the EMailExtensionInterface can be obtained
without requiring an instance of the class.
Diffstat (limited to 'em-format/e-mail-parser-message-rfc822.c')
-rw-r--r-- | em-format/e-mail-parser-message-rfc822.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/em-format/e-mail-parser-message-rfc822.c b/em-format/e-mail-parser-message-rfc822.c index 70bf8c89ed..8ddf4806b9 100644 --- a/em-format/e-mail-parser-message-rfc822.c +++ b/em-format/e-mail-parser-message-rfc822.c @@ -58,9 +58,11 @@ G_DEFINE_TYPE_EXTENDED ( E_TYPE_MAIL_PARSER_EXTENSION, e_mail_parser_parser_extension_interface_init)); -static const gchar * parser_mime_types[] = { "message/rfc822", - "message/news", - NULL }; +static const gchar *parser_mime_types[] = { + "message/rfc822", + "message/news", + NULL +}; static gboolean empe_msg_rfc822_parse (EMailParserExtension *extension, @@ -143,12 +145,6 @@ empe_msg_rfc822_get_flags (EMailParserExtension *extension) E_MAIL_PARSER_EXTENSION_COMPOUND_TYPE; } -static const gchar ** -empe_msg_rfc822_mime_types (EMailExtension *extension) -{ - return parser_mime_types; -} - static void e_mail_parser_message_rfc822_class_init (EMailParserMessageRFC822Class *class) { @@ -164,7 +160,7 @@ e_mail_parser_parser_extension_interface_init (EMailParserExtensionInterface *if static void e_mail_parser_mail_extension_interface_init (EMailExtensionInterface *iface) { - iface->mime_types = empe_msg_rfc822_mime_types; + iface->mime_types = parser_mime_types; } static void |