diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-12-07 22:37:37 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-12-08 03:01:05 +0800 |
commit | 00b211b0f515d6b6d9147c1ca568d0c4b42af699 (patch) | |
tree | f12c1f0180a6c76918f0f6b379d64246f689105f /em-format/e-mail-format-extensions.c | |
parent | 54455ca1ad6cae527544fed12d0de4ae95341082 (diff) | |
download | gsoc2013-evolution-00b211b0f515d6b6d9147c1ca568d0c4b42af699.tar gsoc2013-evolution-00b211b0f515d6b6d9147c1ca568d0c4b42af699.tar.gz gsoc2013-evolution-00b211b0f515d6b6d9147c1ca568d0c4b42af699.tar.bz2 gsoc2013-evolution-00b211b0f515d6b6d9147c1ca568d0c4b42af699.tar.lz gsoc2013-evolution-00b211b0f515d6b6d9147c1ca568d0c4b42af699.tar.xz gsoc2013-evolution-00b211b0f515d6b6d9147c1ca568d0c4b42af699.tar.zst gsoc2013-evolution-00b211b0f515d6b6d9147c1ca568d0c4b42af699.zip |
Convert EMailFormatterExtension to an abstract class.
With the previous changes, all formatter extensions derive from
GObjectClass and implement the EMailFormatterExtensionInterface.
Simplify things further by making EMailFormatterExtension an abstract
base class so formatter extensions are now just direct subclasses and
need not bother with implementing GObject interfaces.
Diffstat (limited to 'em-format/e-mail-format-extensions.c')
-rw-r--r-- | em-format/e-mail-format-extensions.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/em-format/e-mail-format-extensions.c b/em-format/e-mail-format-extensions.c index 01162bc9ea..117d51a90e 100644 --- a/em-format/e-mail-format-extensions.c +++ b/em-format/e-mail-format-extensions.c @@ -98,13 +98,9 @@ load (EMailExtensionRegistry *ereg, extension_class = g_type_class_ref (extension_type); interface_type = E_TYPE_MAIL_FORMATTER_EXTENSION; - if (g_type_is_a (extension_type, interface_type)) { - EMailFormatterExtensionInterface *interface; - - interface = g_type_interface_peek ( - extension_class, interface_type); - mime_types = interface->mime_types; - } + 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)) { |