aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-formatter-quote-message-rfc822.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-12-07 22:37:37 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-12-08 03:01:05 +0800
commit00b211b0f515d6b6d9147c1ca568d0c4b42af699 (patch)
treef12c1f0180a6c76918f0f6b379d64246f689105f /em-format/e-mail-formatter-quote-message-rfc822.c
parent54455ca1ad6cae527544fed12d0de4ae95341082 (diff)
downloadgsoc2013-evolution-00b211b0f515d6b6d9147c1ca568d0c4b42af699.tar.gz
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-formatter-quote-message-rfc822.c')
-rw-r--r--em-format/e-mail-formatter-quote-message-rfc822.c37
1 files changed, 10 insertions, 27 deletions
diff --git a/em-format/e-mail-formatter-quote-message-rfc822.c b/em-format/e-mail-formatter-quote-message-rfc822.c
index 19f77c0792..93e4caac9b 100644
--- a/em-format/e-mail-formatter-quote-message-rfc822.c
+++ b/em-format/e-mail-formatter-quote-message-rfc822.c
@@ -35,24 +35,13 @@
#include <string.h>
-typedef struct _EMailFormatterQuoteMessageRFC822 {
- GObject parent;
-} EMailFormatterQuoteMessageRFC822;
+typedef EMailFormatterExtension EMailFormatterQuoteMessageRFC822;
+typedef EMailFormatterExtensionClass EMailFormatterQuoteMessageRFC822Class;
-typedef struct _EMailFormatterQuoteMessageRFC822Class {
- GObjectClass parent_class;
-} EMailFormatterQuoteMessageRFC822Class;
-
-static void e_mail_formatter_quote_formatter_extension_interface_init (EMailFormatterExtensionInterface *iface);
-
-G_DEFINE_TYPE_EXTENDED (
+G_DEFINE_TYPE (
EMailFormatterQuoteMessageRFC822,
e_mail_formatter_quote_message_rfc822,
- G_TYPE_OBJECT,
- 0,
- G_IMPLEMENT_INTERFACE (
- E_TYPE_MAIL_FORMATTER_EXTENSION,
- e_mail_formatter_quote_formatter_extension_interface_init));
+ E_TYPE_MAIL_FORMATTER_EXTENSION)
static const gchar *formatter_mime_types[] = {
"message/rfc822",
@@ -160,21 +149,15 @@ emfqe_message_rfc822_get_description (EMailFormatterExtension *extension)
}
static void
-e_mail_formatter_quote_message_rfc822_class_init (EMailFormatterQuoteMessageRFC822Class *class)
+e_mail_formatter_quote_message_rfc822_class_init (EMailFormatterExtensionClass *class)
{
+ class->mime_types = formatter_mime_types;
+ class->format = emfqe_message_rfc822_format;
+ class->get_display_name = emfqe_message_rfc822_get_display_name;
+ class->get_description = emfqe_message_rfc822_get_description;
}
static void
-e_mail_formatter_quote_formatter_extension_interface_init (EMailFormatterExtensionInterface *iface)
+e_mail_formatter_quote_message_rfc822_init (EMailFormatterExtension *extension)
{
- iface->mime_types = formatter_mime_types;
- iface->format = emfqe_message_rfc822_format;
- iface->get_display_name = emfqe_message_rfc822_get_display_name;
- iface->get_description = emfqe_message_rfc822_get_description;
-}
-
-static void
-e_mail_formatter_quote_message_rfc822_init (EMailFormatterQuoteMessageRFC822 *formatter)
-{
-
}