Commit b1ae9e5c authored by Matthew Barnes's avatar Matthew Barnes
Browse files

prefer-plain: Unref objects in dispose(), not finalize().

parent 6f451f9f
......@@ -355,6 +355,23 @@ e_mail_display_popup_prefer_plain_type_register (GTypeModule *type_module)
e_mail_display_popup_prefer_plain_register_type (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)
{
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment