aboutsummaryrefslogtreecommitdiffstats
path: root/modules/text-highlight/e-mail-parser-text-highlight.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-12-08 01:32:32 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-12-08 03:01:05 +0800
commitcab6eac8f14974ea1c2fedaf9143e98cf630c489 (patch)
tree38cd8e6e510b6c461f7537c64aea88a11c385f4f /modules/text-highlight/e-mail-parser-text-highlight.c
parent3ae26f0ab68776e230a2be58939e5bf69c8fa2d5 (diff)
downloadgsoc2013-evolution-cab6eac8f14974ea1c2fedaf9143e98cf630c489.tar.gz
gsoc2013-evolution-cab6eac8f14974ea1c2fedaf9143e98cf630c489.tar.zst
gsoc2013-evolution-cab6eac8f14974ea1c2fedaf9143e98cf630c489.zip
Convert EMailParserExtension to an abstract class.
With the previous changes, all parser extensions derive from GObjectClass and implement the EMailParserExtensionInterface. Simplify things further by making EMailParserExtension an abstract base class so parser extensions are now just direct subclasses and need not bother with implementing GObject interfaces.
Diffstat (limited to 'modules/text-highlight/e-mail-parser-text-highlight.c')
-rw-r--r--modules/text-highlight/e-mail-parser-text-highlight.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/modules/text-highlight/e-mail-parser-text-highlight.c b/modules/text-highlight/e-mail-parser-text-highlight.c
index cf8ff5f11a..99d920fe0b 100644
--- a/modules/text-highlight/e-mail-parser-text-highlight.c
+++ b/modules/text-highlight/e-mail-parser-text-highlight.c
@@ -34,24 +34,19 @@
#define d(x)
-typedef GObject EMailParserTextHighlight;
-typedef GObjectClass EMailParserTextHighlightClass;
+typedef EMailParserExtension EMailParserTextHighlight;
+typedef EMailParserExtensionClass EMailParserTextHighlightClass;
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);
-static void e_mail_parser_parser_extension_interface_init (EMailParserExtensionInterface *iface);
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (
+G_DEFINE_DYNAMIC_TYPE (
EMailParserTextHighlight,
e_mail_parser_text_highlight,
- G_TYPE_OBJECT,
- 0,
- G_IMPLEMENT_INTERFACE_DYNAMIC (
- E_TYPE_MAIL_PARSER_EXTENSION,
- e_mail_parser_parser_extension_interface_init));
+ E_TYPE_MAIL_PARSER_EXTENSION)
G_DEFINE_DYNAMIC_TYPE (
EMailParserTextHighlightLoader,
@@ -99,24 +94,19 @@ empe_text_highlight_parse (EMailParserExtension *extension,
}
static void
-e_mail_parser_parser_extension_interface_init (EMailParserExtensionInterface *iface)
-{
- iface->mime_types = get_mime_types ();
- iface->parse = empe_text_highlight_parse;
-}
-
-static void
-e_mail_parser_text_highlight_class_init (EMailParserTextHighlightClass *class)
+e_mail_parser_text_highlight_class_init (EMailParserExtensionClass *class)
{
+ class->mime_types = get_mime_types ();
+ class->parse = empe_text_highlight_parse;
}
void
-e_mail_parser_text_highlight_class_finalize (EMailParserTextHighlightClass *class)
+e_mail_parser_text_highlight_class_finalize (EMailParserExtensionClass *class)
{
}
static void
-e_mail_parser_text_highlight_init (EMailParserTextHighlight *parser)
+e_mail_parser_text_highlight_init (EMailParserExtension *extension)
{
}