aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-05-26 03:36:25 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-08 03:47:14 +0800
commitbcfd1a92572941ebbcc503bb11461506a05416dc (patch)
tree42dc9d5aed17b9a7e6ecdafdc5ab8e5696d61e34
parent9a1265ea24d786846b10169716bde1b686d5b172 (diff)
downloadgsoc2013-evolution-bcfd1a92572941ebbcc503bb11461506a05416dc.tar
gsoc2013-evolution-bcfd1a92572941ebbcc503bb11461506a05416dc.tar.gz
gsoc2013-evolution-bcfd1a92572941ebbcc503bb11461506a05416dc.tar.bz2
gsoc2013-evolution-bcfd1a92572941ebbcc503bb11461506a05416dc.tar.lz
gsoc2013-evolution-bcfd1a92572941ebbcc503bb11461506a05416dc.tar.xz
gsoc2013-evolution-bcfd1a92572941ebbcc503bb11461506a05416dc.tar.zst
gsoc2013-evolution-bcfd1a92572941ebbcc503bb11461506a05416dc.zip
Make EMailPart and its subclasses extensible.
-rw-r--r--em-format/e-mail-part.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/em-format/e-mail-part.c b/em-format/e-mail-part.c
index b4ba2b3eb7..c7b07452eb 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,