[evolution/wip/webkit-composer: 338/966] Make ESpellChecker extensible.



commit b41f091448f1334eff490686fed786d9092a4e1b
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Jan 20 10:22:07 2013 -0500

    Make ESpellChecker extensible.

 e-util/e-spell-checker.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-spell-checker.c b/e-util/e-spell-checker.c
index b22b3b9..a1be8f6 100644
--- a/e-util/e-spell-checker.c
+++ b/e-util/e-spell-checker.c
@@ -23,6 +23,7 @@
 #include "e-spell-checker.h"
 #include "e-spell-dictionary.h"
 
+#include <libebackend/libebackend.h>
 #include <webkit/webkitspellchecker.h>
 #include <pango/pango.h>
 #include <gtk/gtk.h>
@@ -60,6 +61,8 @@ G_DEFINE_TYPE_EXTENDED (
        G_TYPE_OBJECT,
        0,
        G_IMPLEMENT_INTERFACE (
+               E_TYPE_EXTENSIBLE, NULL)
+       G_IMPLEMENT_INTERFACE (
                WEBKIT_TYPE_SPELL_CHECKER,
                e_spell_checker_init_webkit_checker))
 
@@ -379,6 +382,15 @@ spell_checker_finalize (GObject *object)
 }
 
 static void
+spell_checker_constructed (GObject *object)
+{
+       /* Chain up to parent's constructed() method. */
+       G_OBJECT_CLASS (e_spell_checker_parent_class)->constructed (object);
+
+       e_extensible_load_extensions (E_EXTENSIBLE (object));
+}
+
+static void
 e_spell_checker_class_init (ESpellCheckerClass *class)
 {
        GObjectClass *object_class;
@@ -389,6 +401,7 @@ e_spell_checker_class_init (ESpellCheckerClass *class)
        object_class->get_property = spell_checker_get_property;
        object_class->dispose = spell_checker_dispose;
        object_class->finalize = spell_checker_finalize;
+       object_class->constructed = spell_checker_constructed;
 
        g_object_class_install_property (
                object_class,


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