aboutsummaryrefslogtreecommitdiffstats
path: root/modules/vcard-inline/e-mail-parser-vcard-inline.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-12-07 01:57:33 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-12-08 03:01:04 +0800
commit9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79 (patch)
tree8849353e617afe5207095fb6100a33e79989c9bc /modules/vcard-inline/e-mail-parser-vcard-inline.c
parent3924dc759dbf38df0f9ff6941990dcf242478617 (diff)
downloadgsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar
gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar.gz
gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar.bz2
gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar.lz
gsoc2013-evolution-9d34f72ec1b99d58ee1c3a6d1a964a6dde166f79.tar.xz
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 'modules/vcard-inline/e-mail-parser-vcard-inline.c')
-rw-r--r--modules/vcard-inline/e-mail-parser-vcard-inline.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/modules/vcard-inline/e-mail-parser-vcard-inline.c b/modules/vcard-inline/e-mail-parser-vcard-inline.c
index 84f4f2f538..0f0014265b 100644
--- a/modules/vcard-inline/e-mail-parser-vcard-inline.c
+++ b/modules/vcard-inline/e-mail-parser-vcard-inline.c
@@ -72,8 +72,12 @@ G_DEFINE_DYNAMIC_TYPE_EXTENDED (
E_TYPE_MAIL_PARSER_EXTENSION,
e_mail_parser_parser_extension_interface_init));
-static const gchar * parser_mime_types[] = { "text/vcard", "text/x-vcard",
- "text/directory", NULL };
+static const gchar *parser_mime_types[] = {
+ "text/vcard",
+ "text/x-vcard",
+ "text/directory",
+ NULL
+};
static void
mail_part_vcard_inline_free (EMailPart *mail_part)
@@ -376,12 +380,6 @@ empe_vcard_inline_get_flags (EMailParserExtension *extension)
return E_MAIL_PARSER_EXTENSION_INLINE_DISPOSITION;
}
-static const gchar **
-empe_mime_types (EMailExtension *extension)
-{
- return parser_mime_types;
-}
-
void
e_mail_parser_vcard_inline_type_register (GTypeModule *type_module)
{
@@ -391,7 +389,7 @@ e_mail_parser_vcard_inline_type_register (GTypeModule *type_module)
static void
e_mail_parser_mail_extension_interface_init (EMailExtensionInterface *iface)
{
- iface->mime_types = empe_mime_types;
+ iface->mime_types = parser_mime_types;
}
static void