[evolution] Make EMailPart and its subclasses extensible.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Make EMailPart and its subclasses extensible.
- Date: Sat, 8 Jun 2013 04:28:36 +0000 (UTC)
commit bcfd1a92572941ebbcc503bb11461506a05416dc
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat May 25 15:36:25 2013 -0400
Make EMailPart and its subclasses extensible.
em-format/e-mail-part.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/em-format/e-mail-part.c b/em-format/e-mail-part.c
index b4ba2b3..c7b0745 100644
--- a/em-format/e-mail-part.c
+++ b/em-format/e-mail-part.c
@@ -58,10 +58,12 @@ enum {
PROP_PART_LIST
};
-G_DEFINE_TYPE (
+G_DEFINE_TYPE_WITH_CODE (
EMailPart,
e_mail_part,
- G_TYPE_OBJECT)
+ G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (
+ E_TYPE_EXTENSIBLE, NULL))
static void
mail_part_validity_pair_free (gpointer ptr)
@@ -228,6 +230,15 @@ mail_part_finalize (GObject *object)
}
static void
+mail_part_constructed (GObject *object)
+{
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_mail_part_parent_class)->constructed (object);
+
+ e_extensible_load_extensions (E_EXTENSIBLE (object));
+}
+
+static void
e_mail_part_class_init (EMailPartClass *class)
{
GObjectClass *object_class;
@@ -239,6 +250,7 @@ e_mail_part_class_init (EMailPartClass *class)
object_class->get_property = mail_part_get_property;
object_class->dispose = mail_part_dispose;
object_class->finalize = mail_part_finalize;
+ object_class->constructed = mail_part_constructed;
g_object_class_install_property (
object_class,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]