diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-12-08 05:30:18 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-12-08 06:40:28 +0800 |
commit | bf30024dd7973006bf99d0ae509a7f0022368a41 (patch) | |
tree | d6ce797885082ba6ee3878db5054bdbaa6d691f4 | |
parent | 7c656866a2a3cf9110a8db5d57a156638c8c3fe0 (diff) | |
download | gsoc2013-evolution-bf30024dd7973006bf99d0ae509a7f0022368a41.tar.gz gsoc2013-evolution-bf30024dd7973006bf99d0ae509a7f0022368a41.tar.zst gsoc2013-evolution-bf30024dd7973006bf99d0ae509a7f0022368a41.zip |
Teach EMailExtensionRegistry to find extensions.
Now we have the following extension points in the GType hierarchy:
E_TYPE_MAIL_FORMATTER_EXTENSION
E_TYPE_MAIL_FORMATTER_PRINT_EXTENSION
E_TYPE_MAIL_FORMATTER_QUOTE_EXTENSION
E_TYPE_MAIL_PARSER_EXTENSION
A registry just needs to be given one of these extension points, and it
can use g_type_children() to find and load all registered extensions.
This eliminates e-mail-format-extensions.[ch] as well as the dynamic
loaders I added a few commits back. Dynamically loaded extensions are
now easier to register, at the cost of internal extensions being a tad
more cumbersome to register. Fair tradeoff, imo.
This also makes e_mail_extension_registry_add_extension() a private
function used only by e_mail_formatter_extension_registry_load() and
e_mail_parser_extension_registry_load().
60 files changed, 201 insertions, 785 deletions
diff --git a/em-format/Makefile.am b/em-format/Makefile.am index 6e45b0f6f1..164f3004b5 100644 --- a/em-format/Makefile.am +++ b/em-format/Makefile.am @@ -40,8 +40,6 @@ libemformat_la_SOURCES = \ $(emformatinclude_HEADERS) \ e-mail-extension-registry.c \ e-mail-inline-filter.c \ - e-mail-format-extensions.c \ - e-mail-format-extensions.h \ e-mail-formatter.c \ e-mail-formatter-print.c \ e-mail-formatter-quote.c \ diff --git a/em-format/e-mail-extension-registry.c b/em-format/e-mail-extension-registry.c index d786f939a0..e6a78e4e88 100644 --- a/em-format/e-mail-extension-registry.c +++ b/em-format/e-mail-extension-registry.c @@ -19,7 +19,8 @@ #include <glib-object.h> #include "e-mail-extension-registry.h" -#include "e-mail-format-extensions.h" +#include "e-mail-formatter-extension.h" +#include "e-mail-parser-extension.h" #include <libebackend/libebackend.h> #include <camel/camel.h> @@ -59,6 +60,49 @@ destroy_queue (GQueue *queue) } static void +mail_extension_registry_add_extension (EMailExtensionRegistry *registry, + const gchar **mime_types, + GType extension_type) +{ + GObject *extension; + gint ii; + + if (mime_types == NULL) { + g_critical ( + "%s does not define any MIME types", + g_type_name (extension_type)); + return; + } + + extension = g_object_new (extension_type, NULL); + + for (ii = 0; mime_types[ii] != NULL; ii++) { + GQueue *queue; + + queue = g_hash_table_lookup ( + registry->priv->table, mime_types[ii]); + if (queue == NULL) { + queue = g_queue_new (); + g_hash_table_insert ( + registry->priv->table, + (gpointer) mime_types[ii], + queue); + } + + g_queue_push_head (queue, g_object_ref (extension)); + + if (camel_debug ("emformat:registry")) { + printf ( + "Added extension '%s' for type '%s'\n", + g_type_name (extension_type), + mime_types[ii]); + } + } + + g_object_unref (extension); +} + +static void mail_extension_registry_finalize (GObject *object) { EMailExtensionRegistryPrivate *priv; @@ -97,55 +141,6 @@ e_mail_extension_registry_init (EMailExtensionRegistry *registry) } /** - * e_mail_extension_registry_add_extension: - * @registry: an #EMailExtensionRegistry - * @mime_types: a %NULL-terminated array of MIME types - * @extension_type: the #GType of the extension being added - * - * Creates an instance of @extension_type and registers the instance for - * all provided MIME types. - */ -void -e_mail_extension_registry_add_extension (EMailExtensionRegistry *registry, - const gchar **mime_types, - GType extension_type) -{ - GObject *extension; - gint ii; - - g_return_if_fail (E_IS_MAIL_EXTENSION_REGISTRY (registry)); - g_return_if_fail (mime_types != NULL); - g_return_if_fail (extension_type != G_TYPE_INVALID); - - extension = g_object_new (extension_type, NULL); - - for (ii = 0; mime_types[ii] != NULL; ii++) { - GQueue *queue; - - queue = g_hash_table_lookup ( - registry->priv->table, mime_types[ii]); - if (queue == NULL) { - queue = g_queue_new (); - g_hash_table_insert ( - registry->priv->table, - (gpointer) mime_types[ii], - queue); - } - - g_queue_push_head (queue, g_object_ref (extension)); - - if (camel_debug ("emformat:registry")) { - printf ( - "Added extension '%s' for type '%s'\n", - g_type_name (extension_type), - mime_types[ii]); - } - } - - g_object_unref (extension); -} - -/** * e_mail_extension_registry_get_for_mime_type: * @regstry: An #EMailExtensionRegistry * @mime_type: A string with mime-type to look up @@ -225,6 +220,36 @@ e_mail_parser_extension_registry_init (EMailParserExtensionRegistry *registry) { } +void +e_mail_parser_extension_registry_load (EMailParserExtensionRegistry *registry) +{ + GType *children; + GType base_extension_type; + guint ii, n_children; + + g_return_if_fail (E_IS_MAIL_PARSER_EXTENSION_REGISTRY (registry)); + + base_extension_type = E_TYPE_MAIL_PARSER_EXTENSION; + children = g_type_children (base_extension_type, &n_children); + + for (ii = 0; ii < n_children; ii++) { + EMailParserExtensionClass *class; + + if (G_TYPE_IS_ABSTRACT (children[ii])) + continue; + + class = g_type_class_ref (children[ii]); + + mail_extension_registry_add_extension ( + E_MAIL_EXTENSION_REGISTRY (registry), + class->mime_types, children[ii]); + + g_type_class_unref (class); + } + + g_free (children); +} + /******************************************************************************/ G_DEFINE_TYPE_WITH_CODE ( @@ -243,3 +268,32 @@ e_mail_formatter_extension_registry_init (EMailFormatterExtensionRegistry *regis { } +void +e_mail_formatter_extension_registry_load (EMailFormatterExtensionRegistry *registry, + GType base_extension_type) +{ + GType *children; + guint ii, n_children; + + g_return_if_fail (E_IS_MAIL_FORMATTER_EXTENSION_REGISTRY (registry)); + + children = g_type_children (base_extension_type, &n_children); + + for (ii = 0; ii < n_children; ii++) { + EMailFormatterExtensionClass *class; + + if (G_TYPE_IS_ABSTRACT (children[ii])) + continue; + + class = g_type_class_ref (children[ii]); + + mail_extension_registry_add_extension ( + E_MAIL_EXTENSION_REGISTRY (registry), + class->mime_types, children[ii]); + + g_type_class_unref (class); + } + + g_free (children); +} + diff --git a/em-format/e-mail-extension-registry.h b/em-format/e-mail-extension-registry.h index 21011ef286..7002eb0385 100644 --- a/em-format/e-mail-extension-registry.h +++ b/em-format/e-mail-extension-registry.h @@ -57,10 +57,6 @@ struct _EMailExtensionRegistryClass { GType e_mail_extension_registry_get_type (void) G_GNUC_CONST; -void e_mail_extension_registry_add_extension - (EMailExtensionRegistry *registry, - const gchar **mime_types, - GType extension_type); GQueue * e_mail_extension_registry_get_for_mime_type (EMailExtensionRegistry *registry, const gchar *mime_type); @@ -108,6 +104,8 @@ struct _EMailParserExtensionRegistryClass { GType e_mail_parser_extension_registry_get_type (void) G_GNUC_CONST; +void e_mail_parser_extension_registry_load + (EMailParserExtensionRegistry *registry); G_END_DECLS @@ -149,6 +147,9 @@ struct _EMailFormatterExtensionRegistryClass { GType e_mail_formatter_extension_registry_get_type (void) G_GNUC_CONST; +void e_mail_formatter_extension_registry_load + (EMailFormatterExtensionRegistry *registry, + GType base_extension_type); G_END_DECLS diff --git a/em-format/e-mail-format-extensions.c b/em-format/e-mail-format-extensions.c deleted file mode 100644 index 8ba36702a8..0000000000 --- a/em-format/e-mail-format-extensions.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * e-mail-format-extensions.c - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see <http://www.gnu.org/licenses/> - * - */ - -#include "e-mail-format-extensions.h" - -#include "em-format/e-mail-parser-extension.h" -#include "em-format/e-mail-formatter-extension.h" - -typedef GType (*TypeFunc) (void); - -TypeFunc parser_funcs[] = { - e_mail_parser_application_mbox_get_type, - e_mail_parser_attachment_bar_get_type, - e_mail_parser_headers_get_type, - e_mail_parser_message_get_type, - e_mail_parser_secure_button_get_type, - e_mail_parser_source_get_type, - e_mail_parser_image_get_type, - e_mail_parser_inline_pgp_encrypted_get_type, - e_mail_parser_inline_pgp_signed_get_type, - e_mail_parser_message_delivery_status_get_type, - e_mail_parser_message_external_get_type, - e_mail_parser_message_rfc822_get_type, - e_mail_parser_multipart_alternative_get_type, - e_mail_parser_multipart_apple_double_get_type, - e_mail_parser_multipart_digest_get_type, - e_mail_parser_multipart_encrypted_get_type, - e_mail_parser_multipart_mixed_get_type, - e_mail_parser_multipart_related_get_type, - e_mail_parser_multipart_signed_get_type, - e_mail_parser_text_enriched_get_type, - e_mail_parser_text_html_get_type, - e_mail_parser_text_plain_get_type, -#ifdef ENABLE_SMIME - e_mail_parser_application_smime_get_type, -#endif - NULL -}; - -TypeFunc formatter_funcs[] = { - e_mail_formatter_attachment_get_type, - e_mail_formatter_attachment_bar_get_type, - e_mail_formatter_error_get_type, - e_mail_formatter_headers_get_type, - e_mail_formatter_secure_button_get_type, - e_mail_formatter_source_get_type, - e_mail_formatter_image_get_type, - e_mail_formatter_message_rfc822_get_type, - e_mail_formatter_text_enriched_get_type, - e_mail_formatter_text_html_get_type, - e_mail_formatter_text_plain_get_type, - NULL -}; - -TypeFunc quote_formatter_funcs[] = { - e_mail_formatter_quote_attachment_get_type, - e_mail_formatter_quote_headers_get_type, - e_mail_formatter_quote_message_rfc822_get_type, - e_mail_formatter_quote_text_enriched_get_type, - e_mail_formatter_quote_text_html_get_type, - e_mail_formatter_quote_text_plain_get_type, - NULL -}; - -TypeFunc print_formatter_funcs[] = { - e_mail_formatter_print_headers_get_type, - NULL -}; - -static void -load (EMailExtensionRegistry *ereg, - TypeFunc *func_array) -{ - gint ii; - - for (ii = 0; func_array[ii] != NULL; ii++) { - GType extension_type; - GType interface_type; - gpointer extension_class; - const gchar **mime_types = NULL; - - extension_type = func_array[ii](); - extension_class = g_type_class_ref (extension_type); - - interface_type = E_TYPE_MAIL_FORMATTER_EXTENSION; - if (g_type_is_a (extension_type, interface_type)) - mime_types = ((EMailFormatterExtensionClass *) - extension_class)->mime_types; - - interface_type = E_TYPE_MAIL_PARSER_EXTENSION; - if (g_type_is_a (extension_type, interface_type)) - mime_types = ((EMailParserExtensionClass *) - extension_class)->mime_types; - - if (mime_types != NULL) - e_mail_extension_registry_add_extension ( - ereg, mime_types, extension_type); - else - g_critical ( - "%s does not define any MIME types", - g_type_name (extension_type)); - - g_type_class_unref (extension_class); - } -} - -void -e_mail_parser_internal_extensions_load (EMailExtensionRegistry *ereg) -{ - load (ereg, parser_funcs); -} - -void -e_mail_formatter_internal_extensions_load (EMailExtensionRegistry *ereg) -{ - load (ereg, formatter_funcs); -} - -void -e_mail_formatter_quote_internal_extensions_load (EMailExtensionRegistry *ereg) -{ - load (ereg, quote_formatter_funcs); -} - -void -e_mail_formatter_print_internal_extensions_load (EMailExtensionRegistry *ereg) -{ - load (ereg, print_formatter_funcs); -} diff --git a/em-format/e-mail-format-extensions.h b/em-format/e-mail-format-extensions.h deleted file mode 100644 index 74638ef499..0000000000 --- a/em-format/e-mail-format-extensions.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * extensions.h - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see <http://www.gnu.org/licenses/> - * - */ - -#ifndef EXTENSIONS_H_ -#define EXTENSIONS_H_ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <em-format/e-mail-extension-registry.h> -#include <em-format/e-mail-part.h> -#include <widgets/misc/e-attachment-view.h> - -G_BEGIN_DECLS - -void e_mail_formatter_internal_extensions_load (EMailExtensionRegistry *ereg); -void e_mail_parser_internal_extensions_load (EMailExtensionRegistry *ereg); -void e_mail_formatter_quote_internal_extensions_load (EMailExtensionRegistry *ereg); -void e_mail_formatter_print_internal_extensions_load (EMailExtensionRegistry *ereg); - -GType e_mail_formatter_attachment_get_type (void); -GType e_mail_formatter_attachment_bar_get_type - (void); -GType e_mail_formatter_error_get_type (void); -GType e_mail_formatter_headers_get_type (void); -GType e_mail_formatter_secure_button_get_type - (void); -GType e_mail_formatter_source_get_type (void); -GType e_mail_formatter_image_get_type (void); -GType e_mail_formatter_message_rfc822_get_type (void); -GType e_mail_formatter_text_enriched_get_type (void); -GType e_mail_formatter_text_html_get_type (void); -GType e_mail_formatter_text_plain_get_type (void); - -GType e_mail_parser_application_mbox_get_type (void); -GType e_mail_parser_attachment_bar_get_type (void); -GType e_mail_parser_headers_get_type (void); -GType e_mail_parser_message_get_type (void); -GType e_mail_parser_secure_button_get_type (void); -GType e_mail_parser_source_get_type (void); -GType e_mail_parser_image_get_type (void); -GType e_mail_parser_inline_pgp_encrypted_get_type (void); -GType e_mail_parser_inline_pgp_signed_get_type (void); -GType e_mail_parser_message_delivery_status_get_type (void); -GType e_mail_parser_message_external_get_type (void); -GType e_mail_parser_message_rfc822_get_type (void); -GType e_mail_parser_multipart_alternative_get_type (void); -GType e_mail_parser_multipart_apple_double_get_type (void); -GType e_mail_parser_multipart_digest_get_type (void); -GType e_mail_parser_multipart_encrypted_get_type (void); -GType e_mail_parser_multipart_mixed_get_type (void); -GType e_mail_parser_multipart_related_get_type (void); -GType e_mail_parser_multipart_signed_get_type (void); -GType e_mail_parser_text_enriched_get_type (void); -GType e_mail_parser_text_html_get_type (void); -GType e_mail_parser_text_plain_get_type (void); -#ifdef ENABLE_SMIME -GType e_mail_parser_application_smime_get_type (void); -#endif - -GType e_mail_formatter_quote_attachment_get_type (void); -GType e_mail_formatter_quote_headers_get_type (void); -GType e_mail_formatter_quote_message_rfc822_get_type (void); -GType e_mail_formatter_quote_text_enriched_get_type (void); -GType e_mail_formatter_quote_text_html_get_type (void); -GType e_mail_formatter_quote_text_plain_get_type (void); - -GType e_mail_formatter_print_headers_get_type (void); - -G_END_DECLS - -#endif /* EXTENSIONS_H_ */ diff --git a/em-format/e-mail-formatter-attachment-bar.c b/em-format/e-mail-formatter-attachment-bar.c index 0404d9cfe5..d0e52cb37e 100644 --- a/em-format/e-mail-formatter-attachment-bar.c +++ b/em-format/e-mail-formatter-attachment-bar.c @@ -19,7 +19,6 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif -#include "e-mail-format-extensions.h" #include "e-mail-part-attachment-bar.h" #include <misc/e-attachment-bar.h> @@ -31,6 +30,8 @@ typedef EMailFormatterExtension EMailFormatterAttachmentBar; typedef EMailFormatterExtensionClass EMailFormatterAttachmentBarClass; +GType e_mail_formatter_attachment_bar_get_type (void); + G_DEFINE_TYPE ( EMailFormatterAttachmentBar, e_mail_formatter_attachment_bar, diff --git a/em-format/e-mail-formatter-attachment.c b/em-format/e-mail-formatter-attachment.c index fa0e585a14..663bf841b4 100644 --- a/em-format/e-mail-formatter-attachment.c +++ b/em-format/e-mail-formatter-attachment.c @@ -20,7 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" #include "e-mail-part-attachment.h" #include "e-mail-part-attachment-bar.h" @@ -43,6 +42,8 @@ typedef EMailFormatterExtension EMailFormatterAttachment; typedef EMailFormatterExtensionClass EMailFormatterAttachmentClass; +GType e_mail_formatter_attachment_get_type (void); + G_DEFINE_TYPE ( EMailFormatterAttachment, e_mail_formatter_attachment, diff --git a/em-format/e-mail-formatter-error.c b/em-format/e-mail-formatter-error.c index f3bf6f6a86..16cfccb049 100644 --- a/em-format/e-mail-formatter-error.c +++ b/em-format/e-mail-formatter-error.c @@ -19,7 +19,6 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif -#include "e-mail-format-extensions.h" #include <glib/gi18n-lib.h> @@ -32,6 +31,8 @@ typedef EMailFormatterExtension EMailFormatterError; typedef EMailFormatterExtensionClass EMailFormatterErrorClass; +GType e_mail_formatter_error_get_type (void); + G_DEFINE_TYPE ( EMailFormatterError, e_mail_formatter_error, diff --git a/em-format/e-mail-formatter-headers.c b/em-format/e-mail-formatter-headers.c index 8759ece199..56026b2025 100644 --- a/em-format/e-mail-formatter-headers.c +++ b/em-format/e-mail-formatter-headers.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <glib/gi18n-lib.h> #include <em-format/e-mail-formatter-extension.h> @@ -40,6 +38,8 @@ typedef EMailFormatterExtension EMailFormatterHeaders; typedef EMailFormatterExtensionClass EMailFormatterHeadersClass; +GType e_mail_formatter_headers_get_type (void); + G_DEFINE_TYPE ( EMailFormatterHeaders, e_mail_formatter_headers, diff --git a/em-format/e-mail-formatter-image.c b/em-format/e-mail-formatter-image.c index f06bff1897..68bef6a64c 100644 --- a/em-format/e-mail-formatter-image.c +++ b/em-format/e-mail-formatter-image.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-formatter-extension.h> #include <em-format/e-mail-part-utils.h> @@ -36,6 +34,8 @@ typedef EMailFormatterExtension EMailFormatterImage; typedef EMailFormatterExtensionClass EMailFormatterImageClass; +GType e_mail_formatter_image_get_type (void); + G_DEFINE_TYPE ( EMailFormatterImage, e_mail_formatter_image, diff --git a/em-format/e-mail-formatter-message-rfc822.c b/em-format/e-mail-formatter-message-rfc822.c index 41b89f461b..261dfe8d1b 100644 --- a/em-format/e-mail-formatter-message-rfc822.c +++ b/em-format/e-mail-formatter-message-rfc822.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <glib/gi18n-lib.h> #include <glib-object.h> @@ -38,6 +36,8 @@ typedef EMailFormatterExtension EMailFormatterMessageRFC822; typedef EMailFormatterExtensionClass EMailFormatterMessageRFC822Class; +GType e_mail_formatter_message_rfc822_get_type (void); + G_DEFINE_TYPE ( EMailFormatterMessageRFC822, e_mail_formatter_message_rfc822, diff --git a/em-format/e-mail-formatter-print-headers.c b/em-format/e-mail-formatter-print-headers.c index 17e1f78291..8d183a0e9f 100644 --- a/em-format/e-mail-formatter-print-headers.c +++ b/em-format/e-mail-formatter-print-headers.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <glib/gi18n-lib.h> #include <em-format/e-mail-formatter-print.h> @@ -37,6 +35,8 @@ typedef EMailFormatterExtension EMailFormatterPrintHeaders; typedef EMailFormatterExtensionClass EMailFormatterPrintHeadersClass; +GType e_mail_formatter_print_headers_get_type (void); + G_DEFINE_TYPE ( EMailFormatterPrintHeaders, e_mail_formatter_print_headers, diff --git a/em-format/e-mail-formatter-print.c b/em-format/e-mail-formatter-print.c index 7016b2fb78..4466bed31a 100644 --- a/em-format/e-mail-formatter-print.c +++ b/em-format/e-mail-formatter-print.c @@ -239,9 +239,9 @@ e_mail_formatter_print_base_init (EMailFormatterPrintClass *class) /* Register internal extensions. */ g_type_ensure (e_mail_formatter_print_headers_get_type ()); - e_mail_formatter_print_internal_extensions_load ( - E_MAIL_EXTENSION_REGISTRY ( - E_MAIL_FORMATTER_CLASS (class)->extension_registry)); + e_mail_formatter_extension_registry_load ( + E_MAIL_FORMATTER_CLASS (class)->extension_registry, + E_TYPE_MAIL_FORMATTER_PRINT_EXTENSION); E_MAIL_FORMATTER_CLASS (class)->text_html_flags = CAMEL_MIME_FILTER_TOHTML_CONVERT_NL | diff --git a/em-format/e-mail-formatter-quote-attachment.c b/em-format/e-mail-formatter-quote-attachment.c index 6613c27b8d..5086a3fd0f 100644 --- a/em-format/e-mail-formatter-quote-attachment.c +++ b/em-format/e-mail-formatter-quote-attachment.c @@ -20,7 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" #include "e-mail-part-attachment.h" #include <em-format/e-mail-formatter-quote.h> @@ -35,6 +34,8 @@ typedef EMailFormatterExtension EMailFormatterQuoteAttachment; typedef EMailFormatterExtensionClass EMailFormatterQuoteAttachmentClass; +GType e_mail_formatter_quote_attachment_get_type (void); + G_DEFINE_TYPE ( EMailFormatterQuoteAttachment, e_mail_formatter_quote_attachment, diff --git a/em-format/e-mail-formatter-quote-headers.c b/em-format/e-mail-formatter-quote-headers.c index a97c5b1964..4af48418dd 100644 --- a/em-format/e-mail-formatter-quote-headers.c +++ b/em-format/e-mail-formatter-quote-headers.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <glib/gi18n-lib.h> #include <em-format/e-mail-formatter-quote.h> @@ -37,6 +35,8 @@ typedef EMailFormatterExtension EMailFormatterQuoteHeaders; typedef EMailFormatterExtensionClass EMailFormatterQuoteHeadersClass; +GType e_mail_formatter_quote_headers_get_type (void); + G_DEFINE_TYPE ( EMailFormatterQuoteHeaders, e_mail_formatter_quote_headers, diff --git a/em-format/e-mail-formatter-quote-message-rfc822.c b/em-format/e-mail-formatter-quote-message-rfc822.c index cb33fc1c01..e891bce69f 100644 --- a/em-format/e-mail-formatter-quote-message-rfc822.c +++ b/em-format/e-mail-formatter-quote-message-rfc822.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <glib/gi18n-lib.h> #include <glib-object.h> @@ -37,6 +35,8 @@ typedef EMailFormatterExtension EMailFormatterQuoteMessageRFC822; typedef EMailFormatterExtensionClass EMailFormatterQuoteMessageRFC822Class; +GType e_mail_formatter_quote_message_rfc822_get_type (void); + G_DEFINE_TYPE ( EMailFormatterQuoteMessageRFC822, e_mail_formatter_quote_message_rfc822, diff --git a/em-format/e-mail-formatter-quote-text-enriched.c b/em-format/e-mail-formatter-quote-text-enriched.c index 82f6dc06e5..9bbbc534c4 100644 --- a/em-format/e-mail-formatter-quote-text-enriched.c +++ b/em-format/e-mail-formatter-quote-text-enriched.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-formatter-quote.h> #include <em-format/e-mail-inline-filter.h> #include <e-util/e-util.h> @@ -32,6 +30,8 @@ typedef EMailFormatterExtension EMailFormatterQuoteTextEnriched; typedef EMailFormatterExtensionClass EMailFormatterQuoteTextEnrichedClass; +GType e_mail_formatter_quote_text_enriched_get_type (void); + G_DEFINE_TYPE ( EMailFormatterQuoteTextEnriched, e_mail_formatter_quote_text_enriched, diff --git a/em-format/e-mail-formatter-quote-text-html.c b/em-format/e-mail-formatter-quote-text-html.c index ac414ea939..4d3a71f4af 100644 --- a/em-format/e-mail-formatter-quote-text-html.c +++ b/em-format/e-mail-formatter-quote-text-html.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-formatter-quote.h> #include <em-format/e-mail-stripsig-filter.h> #include <em-format/e-mail-part-utils.h> @@ -35,6 +33,8 @@ typedef EMailFormatterExtension EMailFormatterQuoteTextHTML; typedef EMailFormatterExtensionClass EMailFormatterQuoteTextHTMLClass; +GType e_mail_formatter_quote_text_html_get_type (void); + G_DEFINE_TYPE ( EMailFormatterQuoteTextHTML, e_mail_formatter_quote_text_html, diff --git a/em-format/e-mail-formatter-quote-text-plain.c b/em-format/e-mail-formatter-quote-text-plain.c index b3525e72d5..5f14c8ea1e 100644 --- a/em-format/e-mail-formatter-quote-text-plain.c +++ b/em-format/e-mail-formatter-quote-text-plain.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-formatter-quote.h> #include <em-format/e-mail-part-utils.h> #include <em-format/e-mail-stripsig-filter.h> @@ -33,6 +31,8 @@ typedef EMailFormatterExtension EMailFormatterQuoteTextPlain; typedef EMailFormatterExtensionClass EMailFormatterQuoteTextPlainClass; +GType e_mail_formatter_quote_text_plain_get_type (void); + G_DEFINE_TYPE ( EMailFormatterQuoteTextPlain, e_mail_formatter_quote_text_plain, diff --git a/em-format/e-mail-formatter-quote.c b/em-format/e-mail-formatter-quote.c index a8833eef9d..1a2d84deba 100644 --- a/em-format/e-mail-formatter-quote.c +++ b/em-format/e-mail-formatter-quote.c @@ -170,9 +170,9 @@ e_mail_formatter_quote_base_init (EMailFormatterQuoteClass *class) g_type_ensure (e_mail_formatter_quote_text_html_get_type ()); g_type_ensure (e_mail_formatter_quote_text_plain_get_type ()); - e_mail_formatter_quote_internal_extensions_load ( - E_MAIL_EXTENSION_REGISTRY ( - E_MAIL_FORMATTER_CLASS (class)->extension_registry)); + e_mail_formatter_extension_registry_load ( + E_MAIL_FORMATTER_CLASS (class)->extension_registry, + E_TYPE_MAIL_FORMATTER_QUOTE_EXTENSION); E_MAIL_FORMATTER_CLASS (class)->text_html_flags = CAMEL_MIME_FILTER_TOHTML_PRE | diff --git a/em-format/e-mail-formatter-secure-button.c b/em-format/e-mail-formatter-secure-button.c index 164cb19198..f5f51d2242 100644 --- a/em-format/e-mail-formatter-secure-button.c +++ b/em-format/e-mail-formatter-secure-button.c @@ -19,7 +19,6 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif -#include "e-mail-format-extensions.h" #include <glib/gi18n-lib.h> @@ -37,6 +36,8 @@ typedef EMailFormatterExtension EMailFormatterSecureButton; typedef EMailFormatterExtensionClass EMailFormatterSecureButtonClass; +GType e_mail_formatter_secure_button_get_type (void); + G_DEFINE_TYPE ( EMailFormatterSecureButton, e_mail_formatter_secure_button, diff --git a/em-format/e-mail-formatter-source.c b/em-format/e-mail-formatter-source.c index 26e9d92d7b..b37af49026 100644 --- a/em-format/e-mail-formatter-source.c +++ b/em-format/e-mail-formatter-source.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-formatter-extension.h> #include <em-format/e-mail-formatter.h> #include <em-format/e-mail-inline-filter.h> @@ -33,6 +31,8 @@ typedef EMailFormatterExtension EMailFormatterSource; typedef EMailFormatterExtensionClass EMailFormatterSourceClass; +GType e_mail_formatter_source_get_type (void); + G_DEFINE_TYPE ( EMailFormatterSource, e_mail_formatter_source, diff --git a/em-format/e-mail-formatter-text-enriched.c b/em-format/e-mail-formatter-text-enriched.c index ce2769d229..be3b1b029b 100644 --- a/em-format/e-mail-formatter-text-enriched.c +++ b/em-format/e-mail-formatter-text-enriched.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-formatter-extension.h> #include <em-format/e-mail-formatter.h> #include <em-format/e-mail-inline-filter.h> @@ -33,6 +31,8 @@ typedef EMailFormatterExtension EMailFormatterTextEnriched; typedef EMailFormatterExtensionClass EMailFormatterTextEnrichedClass; +GType e_mail_formatter_text_enriched_get_type (void); + G_DEFINE_TYPE ( EMailFormatterTextEnriched, e_mail_formatter_text_enriched, diff --git a/em-format/e-mail-formatter-text-html.c b/em-format/e-mail-formatter-text-html.c index c3b190fea2..aabfa72a98 100644 --- a/em-format/e-mail-formatter-text-html.c +++ b/em-format/e-mail-formatter-text-html.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-formatter-extension.h> #include <em-format/e-mail-formatter.h> #include <em-format/e-mail-inline-filter.h> @@ -37,6 +35,8 @@ typedef EMailFormatterExtension EMailFormatterTextHTML; typedef EMailFormatterExtensionClass EMailFormatterTextHTMLClass; +GType e_mail_formatter_text_html_get_type (void); + G_DEFINE_TYPE ( EMailFormatterTextHTML, e_mail_formatter_text_html, diff --git a/em-format/e-mail-formatter-text-plain.c b/em-format/e-mail-formatter-text-plain.c index 9a3b31ac60..afe5ed200d 100644 --- a/em-format/e-mail-formatter-text-plain.c +++ b/em-format/e-mail-formatter-text-plain.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-formatter-extension.h> #include <em-format/e-mail-formatter.h> #include <em-format/e-mail-inline-filter.h> @@ -34,6 +32,8 @@ typedef EMailFormatterExtension EMailFormatterTextPlain; typedef EMailFormatterExtensionClass EMailFormatterTextPlainClass; +GType e_mail_formatter_text_plain_get_type (void); + G_DEFINE_TYPE ( EMailFormatterTextPlain, e_mail_formatter_text_plain, diff --git a/em-format/e-mail-formatter.c b/em-format/e-mail-formatter.c index 5ab7f5c2dc..bc671b8072 100644 --- a/em-format/e-mail-formatter.c +++ b/em-format/e-mail-formatter.c @@ -528,8 +528,9 @@ e_mail_formatter_base_init (EMailFormatterClass *class) class->extension_registry = g_object_new ( E_TYPE_MAIL_FORMATTER_EXTENSION_REGISTRY, NULL); - e_mail_formatter_internal_extensions_load ( - E_MAIL_EXTENSION_REGISTRY (class->extension_registry)); + e_mail_formatter_extension_registry_load ( + class->extension_registry, + E_TYPE_MAIL_FORMATTER_EXTENSION); e_extensible_load_extensions ( E_EXTENSIBLE (class->extension_registry)); diff --git a/em-format/e-mail-parser-application-mbox.c b/em-format/e-mail-parser-application-mbox.c index 36fa6d5f01..7007b89624 100644 --- a/em-format/e-mail-parser-application-mbox.c +++ b/em-format/e-mail-parser-application-mbox.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <glib-object.h> #include <glib/gi18n-lib.h> @@ -37,6 +35,8 @@ typedef EMailParserExtension EMailParserApplicationMBox; typedef EMailParserExtensionClass EMailParserApplicationMBoxClass; +GType e_mail_parser_application_mbox_get_type (void); + G_DEFINE_TYPE ( EMailParserApplicationMBox, e_mail_parser_application_mbox, diff --git a/em-format/e-mail-parser-application-smime.c b/em-format/e-mail-parser-application-smime.c index 21593d326e..4f42b26825 100644 --- a/em-format/e-mail-parser-application-smime.c +++ b/em-format/e-mail-parser-application-smime.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <glib-object.h> #include <glib/gi18n-lib.h> @@ -37,6 +35,8 @@ typedef EMailParserExtension EMailParserApplicationSMIME; typedef EMailParserExtensionClass EMailParserApplicationSMIMEClass; +GType e_mail_parser_application_smime_get_type (void); + G_DEFINE_TYPE ( EMailParserApplicationSMIME, e_mail_parser_application_smime, diff --git a/em-format/e-mail-parser-attachment-bar.c b/em-format/e-mail-parser-attachment-bar.c index 8b4489ec8b..a8939371c5 100644 --- a/em-format/e-mail-parser-attachment-bar.c +++ b/em-format/e-mail-parser-attachment-bar.c @@ -19,7 +19,6 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif -#include "e-mail-format-extensions.h" #include <glib/gi18n-lib.h> #include "e-mail-part-attachment-bar.h" @@ -45,6 +44,8 @@ mail_part_attachment_bar_free (EMailPart *part) typedef EMailParserExtension EMailParserAttachmentBar; typedef EMailParserExtensionClass EMailParserAttachmentBarClass; +GType e_mail_parser_attachment_bar_get_type (void); + G_DEFINE_TYPE ( EMailParserAttachmentBar, e_mail_parser_attachment_bar, diff --git a/em-format/e-mail-parser-headers.c b/em-format/e-mail-parser-headers.c index 4646fd3107..d81089d384 100644 --- a/em-format/e-mail-parser-headers.c +++ b/em-format/e-mail-parser-headers.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <glib/gi18n-lib.h> #include <em-format/e-mail-parser-extension.h> @@ -36,6 +34,8 @@ typedef EMailParserExtension EMailParserHeaders; typedef EMailParserExtensionClass EMailParserHeadersClass; +GType e_mail_parser_headers_get_type (void); + G_DEFINE_TYPE ( EMailParserHeaders, e_mail_parser_headers, diff --git a/em-format/e-mail-parser-image.c b/em-format/e-mail-parser-image.c index 976cfe4463..4ad4b617bf 100644 --- a/em-format/e-mail-parser-image.c +++ b/em-format/e-mail-parser-image.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-part-utils.h> #include <em-format/e-mail-parser.h> @@ -33,6 +31,8 @@ typedef EMailParserExtension EMailParserImage; typedef EMailParserExtensionClass EMailParserImageClass; +GType e_mail_parser_image_get_type (void); + G_DEFINE_TYPE ( EMailParserImage, e_mail_parser_image, diff --git a/em-format/e-mail-parser-inlinepgp-encrypted.c b/em-format/e-mail-parser-inlinepgp-encrypted.c index 709446c2bb..5db01aeff6 100644 --- a/em-format/e-mail-parser-inlinepgp-encrypted.c +++ b/em-format/e-mail-parser-inlinepgp-encrypted.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <em-format/e-mail-part-utils.h> @@ -35,6 +33,8 @@ typedef EMailParserExtension EMailParserInlinePGPEncrypted; typedef EMailParserExtensionClass EMailParserInlinePGPEncryptedClass; +GType e_mail_parser_inline_pgp_encrypted_get_type (void); + G_DEFINE_TYPE ( EMailParserInlinePGPEncrypted, e_mail_parser_inline_pgp_encrypted, diff --git a/em-format/e-mail-parser-inlinepgp-signed.c b/em-format/e-mail-parser-inlinepgp-signed.c index 77df84743e..cec1db0594 100644 --- a/em-format/e-mail-parser-inlinepgp-signed.c +++ b/em-format/e-mail-parser-inlinepgp-signed.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <em-format/e-mail-part-utils.h> @@ -35,6 +33,8 @@ typedef EMailParserExtension EMailParserInlinePGPSigned; typedef EMailParserExtensionClass EMailParserInlinePGPSignedClass; +GType e_mail_parser_inline_pgp_signed_get_type (void); + G_DEFINE_TYPE ( EMailParserInlinePGPSigned, e_mail_parser_inline_pgp_signed, diff --git a/em-format/e-mail-parser-message-deliverystatus.c b/em-format/e-mail-parser-message-deliverystatus.c index 3acbff7ea3..e99adbc6a1 100644 --- a/em-format/e-mail-parser-message-deliverystatus.c +++ b/em-format/e-mail-parser-message-deliverystatus.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <glib-object.h> #include <em-format/e-mail-parser-extension.h> @@ -35,6 +33,8 @@ typedef EMailParserExtension EMailParserMessageDeliveryStatus; typedef EMailParserExtensionClass EMailParserMessageDeliveryStatusClass; +GType e_mail_parser_message_delivery_status_get_type (void); + G_DEFINE_TYPE ( EMailParserMessageDeliveryStatus, e_mail_parser_message_delivery_status, diff --git a/em-format/e-mail-parser-message-external.c b/em-format/e-mail-parser-message-external.c index 8c355fbd15..0c49497869 100644 --- a/em-format/e-mail-parser-message-external.c +++ b/em-format/e-mail-parser-message-external.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <e-util/e-util.h> @@ -35,6 +33,8 @@ typedef EMailParserExtension EMailParserMessageExternal; typedef EMailParserExtensionClass EMailParserMessageExternalClass; +GType e_mail_parser_message_external_get_type (void); + G_DEFINE_TYPE ( EMailParserMessageExternal, e_mail_parser_message_external, diff --git a/em-format/e-mail-parser-message-rfc822.c b/em-format/e-mail-parser-message-rfc822.c index 5239c3c743..2fbfb2d287 100644 --- a/em-format/e-mail-parser-message-rfc822.c +++ b/em-format/e-mail-parser-message-rfc822.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <glib/gi18n-lib.h> #include <glib-object.h> @@ -38,6 +36,8 @@ typedef EMailParserExtension EMailParserMessageRFC822; typedef EMailParserExtensionClass EMailParserMessageRFC822Class; +GType e_mail_parser_message_rfc822_get_type (void); + G_DEFINE_TYPE ( EMailParserMessageRFC822, e_mail_parser_message_rfc822, diff --git a/em-format/e-mail-parser-message.c b/em-format/e-mail-parser-message.c index 1039d9a8bd..3adbc55305 100644 --- a/em-format/e-mail-parser-message.c +++ b/em-format/e-mail-parser-message.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <glib/gi18n-lib.h> #include <em-format/e-mail-parser-extension.h> @@ -37,6 +35,8 @@ typedef EMailParserExtension EMailParserMessage; typedef EMailParserExtensionClass EMailParserMessageClass; +GType e_mail_parser_message_get_type (void); + G_DEFINE_TYPE ( EMailParserMessage, e_mail_parser_message, diff --git a/em-format/e-mail-parser-multipart-alternative.c b/em-format/e-mail-parser-multipart-alternative.c index d19137bd75..902812b02f 100644 --- a/em-format/e-mail-parser-multipart-alternative.c +++ b/em-format/e-mail-parser-multipart-alternative.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <em-format/e-mail-part-utils.h> @@ -34,6 +32,8 @@ typedef EMailParserExtension EMailParserMultipartAlternative; typedef EMailParserExtensionClass EMailParserMultipartAlternativeClass; +GType e_mail_parser_multipart_alternative_get_type (void); + G_DEFINE_TYPE ( EMailParserMultipartAlternative, e_mail_parser_multipart_alternative, diff --git a/em-format/e-mail-parser-multipart-appledouble.c b/em-format/e-mail-parser-multipart-appledouble.c index 3fe0181ef5..add3fad384 100644 --- a/em-format/e-mail-parser-multipart-appledouble.c +++ b/em-format/e-mail-parser-multipart-appledouble.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> @@ -30,6 +28,8 @@ typedef EMailParserExtension EMailParserMultipartAppleDouble; typedef EMailParserExtensionClass EMailParserMultipartAppleDoubleClass; +GType e_mail_parser_multipart_apple_double_get_type (void); + G_DEFINE_TYPE ( EMailParserMultipartAppleDouble, e_mail_parser_multipart_apple_double, diff --git a/em-format/e-mail-parser-multipart-digest.c b/em-format/e-mail-parser-multipart-digest.c index 6f22a44572..b62d066411 100644 --- a/em-format/e-mail-parser-multipart-digest.c +++ b/em-format/e-mail-parser-multipart-digest.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <e-util/e-util.h> @@ -33,6 +31,8 @@ typedef EMailParserExtension EMailParserMultipartDigest; typedef EMailParserExtensionClass EMailParserMultipartDigestClass; +GType e_mail_parser_multipart_digest_get_type (void); + G_DEFINE_TYPE ( EMailParserMultipartDigest, e_mail_parser_multipart_digest, diff --git a/em-format/e-mail-parser-multipart-encrypted.c b/em-format/e-mail-parser-multipart-encrypted.c index 6a08adc5ef..fa358013fb 100644 --- a/em-format/e-mail-parser-multipart-encrypted.c +++ b/em-format/e-mail-parser-multipart-encrypted.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <em-format/e-mail-part-utils.h> @@ -33,6 +31,8 @@ typedef EMailParserExtension EMailParserMultipartEncrypted; typedef EMailParserExtensionClass EMailParserMultipartEncryptedClass; +GType e_mail_parser_multipart_encrypted_get_type (void); + G_DEFINE_TYPE ( EMailParserMultipartEncrypted, e_mail_parser_multipart_encrypted, diff --git a/em-format/e-mail-parser-multipart-mixed.c b/em-format/e-mail-parser-multipart-mixed.c index 6a202bd889..8a2bfd930a 100644 --- a/em-format/e-mail-parser-multipart-mixed.c +++ b/em-format/e-mail-parser-multipart-mixed.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <e-util/e-util.h> @@ -34,6 +32,8 @@ typedef EMailParserExtension EMailParserMultipartMixed; typedef EMailParserExtensionClass EMailParserMultipartMixedClass; +GType e_mail_parser_multipart_mixed_get_type (void); + G_DEFINE_TYPE ( EMailParserMultipartMixed, e_mail_parser_multipart_mixed, diff --git a/em-format/e-mail-parser-multipart-related.c b/em-format/e-mail-parser-multipart-related.c index a9ae149241..a9beac570f 100644 --- a/em-format/e-mail-parser-multipart-related.c +++ b/em-format/e-mail-parser-multipart-related.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <em-format/e-mail-part-utils.h> @@ -34,6 +32,8 @@ typedef EMailParserExtension EMailParserMultipartRelated; typedef EMailParserExtensionClass EMailParserMultipartRelatedClass; +GType e_mail_parser_multipart_related_get_type (void); + G_DEFINE_TYPE ( EMailParserMultipartRelated, e_mail_parser_multipart_related, diff --git a/em-format/e-mail-parser-multipart-signed.c b/em-format/e-mail-parser-multipart-signed.c index 20a257758f..05e64a8df8 100644 --- a/em-format/e-mail-parser-multipart-signed.c +++ b/em-format/e-mail-parser-multipart-signed.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <em-format/e-mail-part-utils.h> @@ -33,6 +31,8 @@ typedef EMailParserExtension EMailParserMultipartSigned; typedef EMailParserExtensionClass EMailParserMultipartSignedClass; +GType e_mail_parser_multipart_signed_get_type (void); + G_DEFINE_TYPE ( EMailParserMultipartSigned, e_mail_parser_multipart_signed, diff --git a/em-format/e-mail-parser-secure-button.c b/em-format/e-mail-parser-secure-button.c index c590fba426..cb1f98ee7f 100644 --- a/em-format/e-mail-parser-secure-button.c +++ b/em-format/e-mail-parser-secure-button.c @@ -19,7 +19,6 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif -#include "e-mail-format-extensions.h" #include <glib/gi18n-lib.h> @@ -32,6 +31,8 @@ typedef EMailParserExtension EMailParserSecureButton; typedef EMailParserExtensionClass EMailParserSecureButtonClass; +GType e_mail_parser_secure_button_get_type (void); + G_DEFINE_TYPE ( EMailParserSecureButton, e_mail_parser_secure_button, diff --git a/em-format/e-mail-parser-source.c b/em-format/e-mail-parser-source.c index b41fdccdf6..0521650966 100644 --- a/em-format/e-mail-parser-source.c +++ b/em-format/e-mail-parser-source.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <e-util/e-util.h> @@ -32,6 +30,8 @@ typedef EMailParserExtension EMailParserSource; typedef EMailParserExtensionClass EMailParserSourceClass; +GType e_mail_parser_source_get_type (void); + G_DEFINE_TYPE ( EMailParserSource, e_mail_parser_source, diff --git a/em-format/e-mail-parser-text-enriched.c b/em-format/e-mail-parser-text-enriched.c index bc5ab75efa..18b72512c1 100644 --- a/em-format/e-mail-parser-text-enriched.c +++ b/em-format/e-mail-parser-text-enriched.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <em-format/e-mail-part-utils.h> @@ -33,6 +31,8 @@ typedef EMailParserExtension EMailParserTextEnriched; typedef EMailParserExtensionClass EMailParserTextEnrichedClass; +GType e_mail_parser_text_enriched_get_type (void); + G_DEFINE_TYPE ( EMailParserTextEnriched, e_mail_parser_text_enriched, diff --git a/em-format/e-mail-parser-text-html.c b/em-format/e-mail-parser-text-html.c index 0b2841683a..0014e2c4bc 100644 --- a/em-format/e-mail-parser-text-html.c +++ b/em-format/e-mail-parser-text-html.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <em-format/e-mail-part-utils.h> @@ -35,6 +33,8 @@ typedef EMailParserExtension EMailParserTextHTML; typedef EMailParserExtensionClass EMailParserTextHTMLClass; +GType e_mail_parser_text_html_get_type (void); + G_DEFINE_TYPE ( EMailParserTextHTML, e_mail_parser_text_html, diff --git a/em-format/e-mail-parser-text-plain.c b/em-format/e-mail-parser-text-plain.c index 354937aff2..f5e3064a91 100644 --- a/em-format/e-mail-parser-text-plain.c +++ b/em-format/e-mail-parser-text-plain.c @@ -20,8 +20,6 @@ #include <config.h> #endif -#include "e-mail-format-extensions.h" - #include <em-format/e-mail-parser-extension.h> #include <em-format/e-mail-parser.h> #include <em-format/e-mail-inline-filter.h> @@ -35,6 +33,8 @@ typedef EMailParserExtension EMailParserTextPlain; typedef EMailParserExtensionClass EMailParserTextPlainClass; +GType e_mail_parser_text_plain_get_type (void); + G_DEFINE_TYPE ( EMailParserTextPlain, e_mail_parser_text_plain, diff --git a/em-format/e-mail-parser.c b/em-format/e-mail-parser.c index a8b429f38e..4ba17bb681 100644 --- a/em-format/e-mail-parser.c +++ b/em-format/e-mail-parser.c @@ -237,8 +237,7 @@ e_mail_parser_base_init (EMailParserClass *class) class->extension_registry = g_object_new ( E_TYPE_MAIL_PARSER_EXTENSION_REGISTRY, NULL); - e_mail_parser_internal_extensions_load ( - E_MAIL_EXTENSION_REGISTRY (class->extension_registry)); + e_mail_parser_extension_registry_load (class->extension_registry); e_extensible_load_extensions (E_EXTENSIBLE (class->extension_registry)); } diff --git a/modules/audio-inline/e-mail-formatter-audio-inline.c b/modules/audio-inline/e-mail-formatter-audio-inline.c index 4520e377b6..cf31f1596d 100644 --- a/modules/audio-inline/e-mail-formatter-audio-inline.c +++ b/modules/audio-inline/e-mail-formatter-audio-inline.c @@ -45,18 +45,12 @@ typedef EExtension EMailFormatterAudioInlineLoader; typedef EExtensionClass EMailFormatterAudioInlineLoaderClass; GType e_mail_formatter_audio_inline_get_type (void); -GType e_mail_formatter_audio_inline_loader_get_type (void); G_DEFINE_DYNAMIC_TYPE ( EMailFormatterAudioInline, e_mail_formatter_audio_inline, E_TYPE_MAIL_FORMATTER_EXTENSION) -G_DEFINE_DYNAMIC_TYPE ( - EMailFormatterAudioInlineLoader, - e_mail_formatter_audio_inline_loader, - E_TYPE_EXTENSION) - static const gchar *formatter_mime_types[] = { "application/vnd.evolution.widget.audio-inline", "audio/ac3", @@ -331,44 +325,9 @@ e_mail_formatter_audio_inline_init (EMailFormatterExtension *extension) { } -static void -mail_formatter_audio_inline_loader_constructed (GObject *object) -{ - EExtensible *extensible; - - extensible = e_extension_get_extensible (E_EXTENSION (object)); - - e_mail_extension_registry_add_extension ( - E_MAIL_EXTENSION_REGISTRY (extensible), - formatter_mime_types, - e_mail_formatter_audio_inline_get_type ()); -} - -static void -e_mail_formatter_audio_inline_loader_class_init (EExtensionClass *class) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (class); - object_class->constructed = mail_formatter_audio_inline_loader_constructed; - - class->extensible_type = E_TYPE_MAIL_FORMATTER_EXTENSION_REGISTRY; -} - -static void -e_mail_formatter_audio_inline_loader_class_finalize (EExtensionClass *class) -{ -} - -static void -e_mail_formatter_audio_inline_loader_init (EExtension *extension) -{ -} - void e_mail_formatter_audio_inline_type_register (GTypeModule *type_module) { e_mail_formatter_audio_inline_register_type (type_module); - e_mail_formatter_audio_inline_loader_register_type (type_module); } diff --git a/modules/audio-inline/e-mail-parser-audio-inline.c b/modules/audio-inline/e-mail-parser-audio-inline.c index a4ef834e1e..1ebbf905ba 100644 --- a/modules/audio-inline/e-mail-parser-audio-inline.c +++ b/modules/audio-inline/e-mail-parser-audio-inline.c @@ -45,18 +45,12 @@ typedef EExtension EMailParserAudioInlineLoader; typedef EExtensionClass EMailParserAudioInlineLoaderClass; GType e_mail_parser_audio_inline_get_type (void); -GType e_mail_parser_audio_inline_loader_get_type (void); G_DEFINE_DYNAMIC_TYPE ( EMailParserAudioInline, e_mail_parser_audio_inline, E_TYPE_MAIL_PARSER_EXTENSION) -G_DEFINE_DYNAMIC_TYPE ( - EMailParserAudioInlineLoader, - e_mail_parser_audio_inline_loader, - E_TYPE_EXTENSION) - static const gchar *parser_mime_types[] = { "audio/ac3", "audio/x-ac3", @@ -164,44 +158,9 @@ e_mail_parser_audio_inline_init (EMailParserExtension *extension) { } -static void -mail_parser_audio_inline_loader_constructed (GObject *object) -{ - EExtensible *extensible; - - extensible = e_extension_get_extensible (E_EXTENSION (object)); - - e_mail_extension_registry_add_extension ( - E_MAIL_EXTENSION_REGISTRY (extensible), - parser_mime_types, - e_mail_parser_audio_inline_get_type ()); -} - -static void -e_mail_parser_audio_inline_loader_class_init (EExtensionClass *class) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (class); - object_class->constructed = mail_parser_audio_inline_loader_constructed; - - class->extensible_type = E_TYPE_MAIL_PARSER_EXTENSION_REGISTRY; -} - -static void -e_mail_parser_audio_inline_loader_class_finalize (EExtensionClass *class) -{ -} - -static void -e_mail_parser_audio_inline_loader_init (EExtension *extension) -{ -} - void e_mail_parser_audio_inline_type_register (GTypeModule *type_module) { e_mail_parser_audio_inline_register_type (type_module); - e_mail_parser_audio_inline_loader_register_type (type_module); } diff --git a/modules/itip-formatter/e-mail-formatter-itip.c b/modules/itip-formatter/e-mail-formatter-itip.c index 86132f4f7b..ca2a0c6f24 100644 --- a/modules/itip-formatter/e-mail-formatter-itip.c +++ b/modules/itip-formatter/e-mail-formatter-itip.c @@ -37,9 +37,6 @@ typedef EMailFormatterExtension EMailFormatterItip; typedef EMailFormatterExtensionClass EMailFormatterItipClass; -typedef EExtension EMailFormatterItipLoader; -typedef EExtensionClass EMailFormatterItipLoaderClass; - GType e_mail_formatter_itip_get_type (void); GType e_mail_formatter_itip_loader_get_type (void); @@ -48,11 +45,6 @@ G_DEFINE_DYNAMIC_TYPE ( e_mail_formatter_itip, E_TYPE_MAIL_FORMATTER_EXTENSION) -G_DEFINE_DYNAMIC_TYPE ( - EMailFormatterItipLoader, - e_mail_formatter_itip_loader, - E_TYPE_EXTENSION) - static const gchar *formatter_mime_types[] = { "text/calendar", "application/ics", @@ -155,43 +147,8 @@ e_mail_formatter_itip_init (EMailFormatterExtension *extension) { } -static void -mail_formatter_itip_loader_constructed (GObject *object) -{ - EExtensible *extensible; - - extensible = e_extension_get_extensible (E_EXTENSION (object)); - - e_mail_extension_registry_add_extension ( - E_MAIL_EXTENSION_REGISTRY (extensible), - formatter_mime_types, - e_mail_formatter_itip_get_type ()); -} - -static void -e_mail_formatter_itip_loader_class_init (EExtensionClass *class) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (class); - object_class->constructed = mail_formatter_itip_loader_constructed; - - class->extensible_type = E_TYPE_MAIL_FORMATTER_EXTENSION_REGISTRY; -} - -static void -e_mail_formatter_itip_loader_class_finalize (EExtensionClass *class) -{ -} - -static void -e_mail_formatter_itip_loader_init (EExtension *extension) -{ -} - void e_mail_formatter_itip_type_register (GTypeModule *type_module) { e_mail_formatter_itip_register_type (type_module); - e_mail_formatter_itip_loader_register_type (type_module); } diff --git a/modules/itip-formatter/e-mail-parser-itip.c b/modules/itip-formatter/e-mail-parser-itip.c index 554d863957..d0ab563dcc 100644 --- a/modules/itip-formatter/e-mail-parser-itip.c +++ b/modules/itip-formatter/e-mail-parser-itip.c @@ -51,18 +51,12 @@ typedef EExtension EMailParserItipLoader; typedef EExtensionClass EMailParserItipLoaderClass; GType e_mail_parser_itip_get_type (void); -GType e_mail_parser_itip_loader_get_type (void); G_DEFINE_DYNAMIC_TYPE ( EMailParserItip, e_mail_parser_itip, E_TYPE_MAIL_PARSER_EXTENSION) -G_DEFINE_DYNAMIC_TYPE ( - EMailParserItipLoader, - e_mail_parser_itip_loader, - E_TYPE_EXTENSION) - static const gchar *parser_mime_types[] = { "text/calendar", "application/ics", @@ -266,44 +260,9 @@ e_mail_parser_itip_init (EMailParserExtension *class) { } -static void -mail_parser_itip_loader_constructed (GObject *object) -{ - EExtensible *extensible; - - extensible = e_extension_get_extensible (E_EXTENSION (object)); - - e_mail_extension_registry_add_extension ( - E_MAIL_EXTENSION_REGISTRY (extensible), - parser_mime_types, - e_mail_parser_itip_get_type ()); -} - -static void -e_mail_parser_itip_loader_class_init (EExtensionClass *class) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (class); - object_class->constructed = mail_parser_itip_loader_constructed; - - class->extensible_type = E_TYPE_MAIL_PARSER_EXTENSION_REGISTRY; -} - -static void -e_mail_parser_itip_loader_class_finalize (EExtensionClass *class) -{ -} - -static void -e_mail_parser_itip_loader_init (EExtension *extension) -{ -} - void e_mail_parser_itip_type_register (GTypeModule *type_module) { e_mail_parser_itip_register_type (type_module); - e_mail_parser_itip_loader_register_type (type_module); } diff --git a/modules/prefer-plain/e-mail-parser-prefer-plain.c b/modules/prefer-plain/e-mail-parser-prefer-plain.c index d434c20bc8..1351b33c6c 100644 --- a/modules/prefer-plain/e-mail-parser-prefer-plain.c +++ b/modules/prefer-plain/e-mail-parser-prefer-plain.c @@ -51,7 +51,6 @@ struct _EMailParserPreferPlainClass { }; GType e_mail_parser_prefer_plain_get_type (void); -GType e_mail_parser_prefer_plain_loader_get_type (void); enum { PREFER_HTML, @@ -64,11 +63,6 @@ G_DEFINE_DYNAMIC_TYPE ( e_mail_parser_prefer_plain, E_TYPE_MAIL_PARSER_EXTENSION) -G_DEFINE_DYNAMIC_TYPE ( - EMailParserPreferPlainLoader, - e_mail_parser_prefer_plain_loader, - E_TYPE_EXTENSION) - static const gchar *parser_mime_types[] = { "multipart/alternative", "text/html", @@ -491,44 +485,9 @@ e_mail_parser_prefer_plain_init (EMailParserPreferPlain *parser) parser->show_suppressed = g_settings_get_boolean (parser->settings, "show-suppressed"); } -static void -mail_parser_prefer_plain_loader_constructed (GObject *object) -{ - EExtensible *extensible; - - extensible = e_extension_get_extensible (E_EXTENSION (object)); - - e_mail_extension_registry_add_extension ( - E_MAIL_EXTENSION_REGISTRY (extensible), - parser_mime_types, - e_mail_parser_prefer_plain_get_type ()); -} - -static void -e_mail_parser_prefer_plain_loader_class_init (EExtensionClass *class) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (class); - object_class->constructed = mail_parser_prefer_plain_loader_constructed; - - class->extensible_type = E_TYPE_MAIL_PARSER_EXTENSION_REGISTRY; -} - -static void -e_mail_parser_prefer_plain_loader_class_finalize (EExtensionClass *class) -{ -} - -static void -e_mail_parser_prefer_plain_loader_init (EExtension *extension) -{ -} - void e_mail_parser_prefer_plain_type_register (GTypeModule *type_module) { e_mail_parser_prefer_plain_register_type (type_module); - e_mail_parser_prefer_plain_loader_register_type (type_module); } diff --git a/modules/text-highlight/e-mail-formatter-text-highlight.c b/modules/text-highlight/e-mail-formatter-text-highlight.c index fc5ca1d482..dd5ed1d4d5 100644 --- a/modules/text-highlight/e-mail-formatter-text-highlight.c +++ b/modules/text-highlight/e-mail-formatter-text-highlight.c @@ -45,18 +45,12 @@ typedef EExtension EMailFormatterTextHighlightLoader; typedef EExtensionClass EMailFormatterTextHighlightLoaderClass; GType e_mail_formatter_text_highlight_get_type (void); -GType e_mail_formatter_text_highlight_loader_get_type (void); G_DEFINE_DYNAMIC_TYPE ( EMailFormatterTextHighlight, e_mail_formatter_text_highlight, E_TYPE_MAIL_FORMATTER_EXTENSION) -G_DEFINE_DYNAMIC_TYPE ( - EMailFormatterTextHighlightLoader, - e_mail_formatter_text_highlight_loader, - E_TYPE_EXTENSION) - static gchar * get_default_font (void) { @@ -375,44 +369,9 @@ e_mail_formatter_text_highlight_init (EMailFormatterExtension *extension) { } -static void -mail_formatter_text_highlight_loader_constructed (GObject *object) -{ - EExtensible *extensible; - - extensible = e_extension_get_extensible (E_EXTENSION (object)); - - e_mail_extension_registry_add_extension ( - E_MAIL_EXTENSION_REGISTRY (extensible), - get_mime_types (), - e_mail_formatter_text_highlight_get_type ()); -} - -static void -e_mail_formatter_text_highlight_loader_class_init (EExtensionClass *class) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (class); - object_class->constructed = mail_formatter_text_highlight_loader_constructed; - - class->extensible_type = E_TYPE_MAIL_FORMATTER_EXTENSION_REGISTRY; -} - -static void -e_mail_formatter_text_highlight_loader_class_finalize (EExtensionClass *class) -{ -} - -static void -e_mail_formatter_text_highlight_loader_init (EExtension *extension) -{ -} - void e_mail_formatter_text_highlight_type_register (GTypeModule *type_module) { e_mail_formatter_text_highlight_register_type (type_module); - e_mail_formatter_text_highlight_loader_register_type (type_module); } diff --git a/modules/text-highlight/e-mail-parser-text-highlight.c b/modules/text-highlight/e-mail-parser-text-highlight.c index 99d920fe0b..28d10409b1 100644 --- a/modules/text-highlight/e-mail-parser-text-highlight.c +++ b/modules/text-highlight/e-mail-parser-text-highlight.c @@ -41,18 +41,12 @@ typedef EExtension EMailParserTextHighlightLoader; typedef EExtensionClass EMailParserTextHighlightLoaderClass; GType e_mail_parser_text_highlight_get_type (void); -GType e_mail_parser_text_highlight_loader_get_type (void); G_DEFINE_DYNAMIC_TYPE ( EMailParserTextHighlight, e_mail_parser_text_highlight, E_TYPE_MAIL_PARSER_EXTENSION) -G_DEFINE_DYNAMIC_TYPE ( - EMailParserTextHighlightLoader, - e_mail_parser_text_highlight_loader, - E_TYPE_EXTENSION) - static gboolean empe_text_highlight_parse (EMailParserExtension *extension, EMailParser *parser, @@ -110,44 +104,9 @@ e_mail_parser_text_highlight_init (EMailParserExtension *extension) { } -static void -mail_parser_text_highlight_loader_constructed (GObject *object) -{ - EExtensible *extensible; - - extensible = e_extension_get_extensible (E_EXTENSION (object)); - - e_mail_extension_registry_add_extension ( - E_MAIL_EXTENSION_REGISTRY (extensible), - get_mime_types (), - e_mail_parser_text_highlight_get_type ()); -} - -static void -e_mail_parser_text_highlight_loader_class_init (EExtensionClass *class) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (class); - object_class->constructed = mail_parser_text_highlight_loader_constructed; - - class->extensible_type = E_TYPE_MAIL_PARSER_EXTENSION_REGISTRY; -} - -static void -e_mail_parser_text_highlight_loader_class_finalize (EExtensionClass *class) -{ -} - -static void -e_mail_parser_text_highlight_loader_init (EExtension *extension) -{ -} - void e_mail_parser_text_highlight_type_register (GTypeModule *type_module) { e_mail_parser_text_highlight_register_type (type_module); - e_mail_parser_text_highlight_loader_register_type (type_module); } diff --git a/modules/tnef-attachment/e-mail-parser-tnef-attachment.c b/modules/tnef-attachment/e-mail-parser-tnef-attachment.c index f2619ae1cc..6ff54b062c 100644 --- a/modules/tnef-attachment/e-mail-parser-tnef-attachment.c +++ b/modules/tnef-attachment/e-mail-parser-tnef-attachment.c @@ -65,18 +65,12 @@ typedef EExtension EMailParserTnefAttachmentLoader; typedef EExtensionClass EMailParserTnefAttachmentLoaderClass; GType e_mail_parser_tnef_attachment_get_type (void); -GType e_mail_parser_tnef_attachment_loader_get_type (void); G_DEFINE_DYNAMIC_TYPE ( EMailParserTnefAttachment, e_mail_parser_tnef_attachment, E_TYPE_MAIL_PARSER_EXTENSION) -G_DEFINE_DYNAMIC_TYPE ( - EMailParserTnefAttachmentLoader, - e_mail_parser_tnef_attachment_loader, - E_TYPE_EXTENSION) - static const gchar *parser_mime_types[] = { "application/vnd.ms-tnef", "application/ms-tnefl", @@ -281,45 +275,10 @@ e_mail_parser_tnef_attachment_init (EMailParserTnefAttachment *extension) { } -static void -mail_parser_tnef_attachment_loader_constructed (GObject *object) -{ - EExtensible *extensible; - - extensible = e_extension_get_extensible (E_EXTENSION (object)); - - e_mail_extension_registry_add_extension ( - E_MAIL_EXTENSION_REGISTRY (extensible), - parser_mime_types, - e_mail_parser_tnef_attachment_get_type ()); -} - -static void -e_mail_parser_tnef_attachment_loader_class_init (EExtensionClass *class) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (class); - object_class->constructed = mail_parser_tnef_attachment_loader_constructed; - - class->extensible_type = E_TYPE_MAIL_PARSER_EXTENSION_REGISTRY; -} - -static void -e_mail_parser_tnef_attachment_loader_class_finalize (EExtensionClass *class) -{ -} - -static void -e_mail_parser_tnef_attachment_loader_init (EExtension *extension) -{ -} - void e_mail_parser_tnef_attachment_type_register (GTypeModule *type_module) { e_mail_parser_tnef_attachment_register_type (type_module); - e_mail_parser_tnef_attachment_loader_register_type (type_module); } void diff --git a/modules/vcard-inline/e-mail-formatter-vcard-inline.c b/modules/vcard-inline/e-mail-formatter-vcard-inline.c index 873d9c7343..f7dc88e5b0 100644 --- a/modules/vcard-inline/e-mail-formatter-vcard-inline.c +++ b/modules/vcard-inline/e-mail-formatter-vcard-inline.c @@ -43,18 +43,12 @@ typedef EExtension EMailFormatterVCardInlineLoader; typedef EExtensionClass EMailFormatterVCardInlineLoaderClass; GType e_mail_formatter_vcard_inline_get_type (void); -GType e_mail_formatter_vcard_inline_loader_get_type (void); G_DEFINE_DYNAMIC_TYPE ( EMailFormatterVCardInline, e_mail_formatter_vcard_inline, E_TYPE_MAIL_FORMATTER_EXTENSION) -G_DEFINE_DYNAMIC_TYPE ( - EMailFormatterVCardInlineLoader, - e_mail_formatter_vcard_inline_loader, - E_TYPE_EXTENSION) - static const gchar *formatter_mime_types[] = { "text/vcard", "text/x-vcard", @@ -213,44 +207,9 @@ e_mail_formatter_vcard_inline_init (EMailFormatterExtension *extension) { } -static void -mail_formatter_vcard_inline_loader_constructed (GObject *object) -{ - EExtensible *extensible; - - extensible = e_extension_get_extensible (E_EXTENSION (object)); - - e_mail_extension_registry_add_extension ( - E_MAIL_EXTENSION_REGISTRY (extensible), - formatter_mime_types, - e_mail_formatter_vcard_inline_get_type ()); -} - -static void -e_mail_formatter_vcard_inline_loader_class_init (EExtensionClass *class) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (class); - object_class->constructed = mail_formatter_vcard_inline_loader_constructed; - - class->extensible_type = E_TYPE_MAIL_FORMATTER_EXTENSION_REGISTRY; -} - -static void -e_mail_formatter_vcard_inline_loader_class_finalize (EExtensionClass *class) -{ -} - -static void -e_mail_formatter_vcard_inline_loader_init (EExtension *extension) -{ -} - void e_mail_formatter_vcard_inline_type_register (GTypeModule *type_module) { e_mail_formatter_vcard_inline_register_type (type_module); - e_mail_formatter_vcard_inline_loader_register_type (type_module); } diff --git a/modules/vcard-inline/e-mail-parser-vcard-inline.c b/modules/vcard-inline/e-mail-parser-vcard-inline.c index 67f357440b..bd4050287a 100644 --- a/modules/vcard-inline/e-mail-parser-vcard-inline.c +++ b/modules/vcard-inline/e-mail-parser-vcard-inline.c @@ -55,18 +55,12 @@ typedef EExtension EMailParserVCardInlineLoader; typedef EExtensionClass EMailParserVCardInlineLoaderClass; GType e_mail_parser_vcard_inline_get_type (void); -GType e_mail_parser_vcard_inline_loader_get_type (void); G_DEFINE_DYNAMIC_TYPE ( EMailParserVCardInline, e_mail_parser_vcard_inline, E_TYPE_MAIL_PARSER_EXTENSION) -G_DEFINE_DYNAMIC_TYPE ( - EMailParserVCardInlineLoader, - e_mail_parser_vcard_inline_loader, - E_TYPE_EXTENSION) - static const gchar *parser_mime_types[] = { "text/vcard", "text/x-vcard", @@ -387,44 +381,9 @@ e_mail_parser_vcard_inline_init (EMailParserExtension *extension) { } -static void -mail_parser_vcard_inline_loader_constructed (GObject *object) -{ - EExtensible *extensible; - - extensible = e_extension_get_extensible (E_EXTENSION (object)); - - e_mail_extension_registry_add_extension ( - E_MAIL_EXTENSION_REGISTRY (extensible), - parser_mime_types, - e_mail_parser_vcard_inline_get_type ()); -} - -static void -e_mail_parser_vcard_inline_loader_class_init (EExtensionClass *class) -{ - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (class); - object_class->constructed = mail_parser_vcard_inline_loader_constructed; - - class->extensible_type = E_TYPE_MAIL_PARSER_EXTENSION_REGISTRY; -} - -static void -e_mail_parser_vcard_inline_loader_class_finalize (EExtensionClass *class) -{ -} - -static void -e_mail_parser_vcard_inline_loader_init (EExtension *extension) -{ -} - void e_mail_parser_vcard_inline_type_register (GTypeModule *type_module) { e_mail_parser_vcard_inline_register_type (type_module); - e_mail_parser_vcard_inline_loader_register_type (type_module); } |