From 9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 6 Dec 2012 12:57:33 -0500 Subject: 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. --- em-format/e-mail-parser-multipart-signed.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'em-format/e-mail-parser-multipart-signed.c') diff --git a/em-format/e-mail-parser-multipart-signed.c b/em-format/e-mail-parser-multipart-signed.c index 60fac35c7f..45b29ff8aa 100644 --- a/em-format/e-mail-parser-multipart-signed.c +++ b/em-format/e-mail-parser-multipart-signed.c @@ -53,9 +53,11 @@ G_DEFINE_TYPE_EXTENDED ( E_TYPE_MAIL_PARSER_EXTENSION, e_mail_parser_parser_extension_interface_init)); -static const gchar * parser_mime_types[] = { "multipart/signed", - "application/pgp-signature", - NULL }; +static const gchar *parser_mime_types[] = { + "multipart/signed", + "application/pgp-signature", + NULL +}; static gboolean empe_mp_signed_parse (EMailParserExtension *extension, @@ -217,12 +219,6 @@ empe_mp_signed_parse (EMailParserExtension *extension, return TRUE; } -static const gchar ** -empe_mp_signed_mime_types (EMailExtension *extension) -{ - return parser_mime_types; -} - static void e_mail_parser_multipart_signed_class_init (EMailParserMultipartSignedClass *class) { @@ -237,7 +233,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_mp_signed_mime_types; + iface->mime_types = parser_mime_types; } static void -- cgit v1.2.3