[evolution] e_mail_formatter_base_init(): Register internal extension types.



commit e6305c503a150fd9b4bbc310980019b0d90ef118
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Dec 7 14:55:20 2012 -0500

    e_mail_formatter_base_init(): Register internal extension types.

 em-format/e-mail-formatter.c |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)
---
diff --git a/em-format/e-mail-formatter.c b/em-format/e-mail-formatter.c
index 2c100cb..5ab7f5c 100644
--- a/em-format/e-mail-formatter.c
+++ b/em-format/e-mail-formatter.c
@@ -24,8 +24,6 @@
 #include "e-mail-formatter-utils.h"
 #include "e-mail-part.h"
 
-#include "e-mail-format-extensions.h"
-
 #include <e-util/e-util.h>
 #include <libebackend/libebackend.h>
 #include <gdk/gdk.h>
@@ -33,6 +31,21 @@
 
 #define d(x)
 
+/* internal formatter extensions */
+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_image_get_type (void);
+GType e_mail_formatter_message_rfc822_get_type (void);
+GType e_mail_formatter_secure_button_get_type (void);
+GType e_mail_formatter_source_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);
+
+void e_mail_formatter_internal_extensions_load (EMailExtensionRegistry *ereg);
+
 struct _EMailFormatterPrivate {
 	EMailImageLoadingPolicy image_loading_policy;
 
@@ -499,11 +512,24 @@ mail_formatter_set_style (EMailFormatter *formatter,
 static void
 e_mail_formatter_base_init (EMailFormatterClass *class)
 {
+	/* Register internal extensions. */
+	g_type_ensure (e_mail_formatter_attachment_get_type ());
+	g_type_ensure (e_mail_formatter_attachment_bar_get_type ());
+	g_type_ensure (e_mail_formatter_error_get_type ());
+	g_type_ensure (e_mail_formatter_headers_get_type ());
+	g_type_ensure (e_mail_formatter_image_get_type ());
+	g_type_ensure (e_mail_formatter_message_rfc822_get_type ());
+	g_type_ensure (e_mail_formatter_secure_button_get_type ());
+	g_type_ensure (e_mail_formatter_source_get_type ());
+	g_type_ensure (e_mail_formatter_text_enriched_get_type ());
+	g_type_ensure (e_mail_formatter_text_html_get_type ());
+	g_type_ensure (e_mail_formatter_text_plain_get_type ());
+
 	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_EXTENSION_REGISTRY (class->extension_registry));
 
 	e_extensible_load_extensions (
 		E_EXTENSIBLE (class->extension_registry));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]