aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-03-12 00:54:16 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-03-12 01:37:57 +0800
commitee18b469c70ff2f6b9b6cff60bcaa57207a6ed0b (patch)
tree3c97e9c5dc975fa4bb41c9bc3e76b0669cff9840 /e-util
parentbf2823d50fd7f4f0a134e8cf5ab7bce808ab220e (diff)
downloadgsoc2013-evolution-ee18b469c70ff2f6b9b6cff60bcaa57207a6ed0b.tar
gsoc2013-evolution-ee18b469c70ff2f6b9b6cff60bcaa57207a6ed0b.tar.gz
gsoc2013-evolution-ee18b469c70ff2f6b9b6cff60bcaa57207a6ed0b.tar.bz2
gsoc2013-evolution-ee18b469c70ff2f6b9b6cff60bcaa57207a6ed0b.tar.lz
gsoc2013-evolution-ee18b469c70ff2f6b9b6cff60bcaa57207a6ed0b.tar.xz
gsoc2013-evolution-ee18b469c70ff2f6b9b6cff60bcaa57207a6ed0b.tar.zst
gsoc2013-evolution-ee18b469c70ff2f6b9b6cff60bcaa57207a6ed0b.zip
Make ESpellEntry extensible.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-spell-entry.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/e-util/e-spell-entry.c b/e-util/e-spell-entry.c
index 740a0c3c19..e18ad00d39 100644
--- a/e-util/e-spell-entry.c
+++ b/e-util/e-spell-entry.c
@@ -22,6 +22,8 @@
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
+#include <libebackend/libebackend.h>
+
#include <editor/gtkhtml-spell-language.h>
#include <editor/gtkhtml-spell-checker.h>
@@ -49,7 +51,12 @@ enum {
PROP_CHECKING_ENABLED
};
-G_DEFINE_TYPE (ESpellEntry, e_spell_entry, GTK_TYPE_ENTRY);
+G_DEFINE_TYPE_WITH_CODE (
+ ESpellEntry,
+ e_spell_entry,
+ GTK_TYPE_ENTRY,
+ G_IMPLEMENT_INTERFACE (
+ E_TYPE_EXTENSIBLE, NULL))
static gboolean
word_misspelled (ESpellEntry *entry,
@@ -785,6 +792,15 @@ spell_entry_finalize (GObject *object)
G_OBJECT_CLASS (e_spell_entry_parent_class)->finalize (object);
}
+static void
+spell_entry_constructed (GObject *object)
+{
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_spell_entry_parent_class)->constructed (object);
+
+ e_extensible_load_extensions (E_EXTENSIBLE (object));
+}
+
static gboolean
spell_entry_draw (GtkWidget *widget,
cairo_t *cr)
@@ -828,6 +844,7 @@ e_spell_entry_class_init (ESpellEntryClass *class)
object_class->get_property = spell_entry_get_property;
object_class->dispose = spell_entry_dispose;
object_class->finalize = spell_entry_finalize;
+ object_class->constructed = spell_entry_constructed;
widget_class = GTK_WIDGET_CLASS (class);
widget_class->draw = spell_entry_draw;