[evolution] Make ESpellEntry extensible.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Make ESpellEntry extensible.
- Date: Mon, 11 Mar 2013 18:23:24 +0000 (UTC)
commit ee18b469c70ff2f6b9b6cff60bcaa57207a6ed0b
Author: Matthew Barnes <mbarnes redhat com>
Date: Mon Mar 11 12:54:16 2013 -0400
Make ESpellEntry extensible.
e-util/e-spell-entry.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-spell-entry.c b/e-util/e-spell-entry.c
index 740a0c3..e18ad00 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]