aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-08-12 05:56:49 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-08-12 05:56:49 +0800
commitb1ae9e5c83bf58aad30e2ca9f11364f77bfdd6cc (patch)
tree63a148b767d5a11fa28245229be118510ea3ffb2
parent6f451f9f65c4d80d157f0898dcaffd7d561876a4 (diff)
downloadgsoc2013-evolution-b1ae9e5c83bf58aad30e2ca9f11364f77bfdd6cc.tar
gsoc2013-evolution-b1ae9e5c83bf58aad30e2ca9f11364f77bfdd6cc.tar.gz
gsoc2013-evolution-b1ae9e5c83bf58aad30e2ca9f11364f77bfdd6cc.tar.bz2
gsoc2013-evolution-b1ae9e5c83bf58aad30e2ca9f11364f77bfdd6cc.tar.lz
gsoc2013-evolution-b1ae9e5c83bf58aad30e2ca9f11364f77bfdd6cc.tar.xz
gsoc2013-evolution-b1ae9e5c83bf58aad30e2ca9f11364f77bfdd6cc.tar.zst
gsoc2013-evolution-b1ae9e5c83bf58aad30e2ca9f11364f77bfdd6cc.zip
prefer-plain: Unref objects in dispose(), not finalize().
-rw-r--r--modules/prefer-plain/e-mail-display-popup-prefer-plain.c19
-rw-r--r--modules/prefer-plain/e-mail-parser-prefer-plain.c8
2 files changed, 22 insertions, 5 deletions
diff --git a/modules/prefer-plain/e-mail-display-popup-prefer-plain.c b/modules/prefer-plain/e-mail-display-popup-prefer-plain.c
index e84fbfafe1..889885cecc 100644
--- a/modules/prefer-plain/e-mail-display-popup-prefer-plain.c
+++ b/modules/prefer-plain/e-mail-display-popup-prefer-plain.c
@@ -356,6 +356,23 @@ e_mail_display_popup_prefer_plain_type_register (GTypeModule *type_module)
}
static void
+e_mail_display_popup_prefer_plain_dispose (GObject *object)
+{
+ EMailDisplayPopupPreferPlain *extension;
+
+ extension = E_MAIL_DISPLAY_POPUP_PREFER_PLAIN (object);
+
+ if (extension->action_group != NULL) {
+ g_object_unref (extension->action_group);
+ extension->action_group = NULL;
+ }
+
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_mail_display_popup_prefer_plain_parent_class)->
+ dispose (object);
+}
+
+static void
e_mail_display_popup_prefer_plain_finalize (GObject *object)
{
EMailDisplayPopupPreferPlain *extension;
@@ -364,7 +381,6 @@ e_mail_display_popup_prefer_plain_finalize (GObject *object)
g_free (extension->text_html_id);
g_free (extension->text_plain_id);
- g_object_unref (extension->action_group);
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (e_mail_display_popup_prefer_plain_parent_class)->
@@ -381,6 +397,7 @@ e_mail_display_popup_prefer_plain_class_init (EMailDisplayPopupPreferPlainClass
extension_class->extensible_type = E_TYPE_MAIL_DISPLAY;
object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = e_mail_display_popup_prefer_plain_dispose;
object_class->finalize = e_mail_display_popup_prefer_plain_finalize;
}
diff --git a/modules/prefer-plain/e-mail-parser-prefer-plain.c b/modules/prefer-plain/e-mail-parser-prefer-plain.c
index 01c3365939..714e4e462e 100644
--- a/modules/prefer-plain/e-mail-parser-prefer-plain.c
+++ b/modules/prefer-plain/e-mail-parser-prefer-plain.c
@@ -411,7 +411,7 @@ e_mail_parser_prefer_plain_set_property (GObject *object,
}
static void
-e_mail_parser_prefer_plain_finalize (GObject *object)
+e_mail_parser_prefer_plain_dispose (GObject *object)
{
EMailParserPreferPlain *parser;
@@ -419,9 +419,9 @@ e_mail_parser_prefer_plain_finalize (GObject *object)
g_clear_object (&parser->settings);
- /* Chain up to parent's finalize() method. */
+ /* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (e_mail_parser_prefer_plain_parent_class)->
- finalize (object);
+ dispose (object);
}
static void
@@ -434,7 +434,7 @@ e_mail_parser_prefer_plain_class_init (EMailParserPreferPlainClass *class)
object_class->constructed = e_mail_parser_prefer_plain_constructed;
object_class->get_property = e_mail_parser_prefer_plain_get_property;
object_class->set_property = e_mail_parser_prefer_plain_set_property;
- object_class->finalize = e_mail_parser_prefer_plain_finalize;
+ object_class->dispose = e_mail_parser_prefer_plain_dispose;
extension_class = E_EXTENSION_CLASS (class);
extension_class->extensible_type = E_TYPE_MAIL_PARSER_EXTENSION_REGISTRY;