Commit 4100a848 authored by Alan Jenkins's avatar Alan Jenkins Committed by Matthias Clasen

shortcutsgroup: fix leak of title

like previous commit, albeit simpler this time

https://bugzilla.gnome.org/show_bug.cgi?id=772859
parent e2f5425a
......@@ -265,6 +265,24 @@ gtk_shortcuts_group_finalize (GObject *object)
G_OBJECT_CLASS (gtk_shortcuts_group_parent_class)->finalize (object);
}
static void
gtk_shortcuts_group_dispose (GObject *object)
{
GtkShortcutsGroup *self = GTK_SHORTCUTS_GROUP (object);
/*
* Since we overload forall(), the inherited destroy() won't work as normal.
* Remove internal widgets ourself.
*/
if (self->title)
{
gtk_widget_destroy (GTK_WIDGET (self->title));
self->title = NULL;
}
G_OBJECT_CLASS (gtk_shortcuts_group_parent_class)->dispose (object);
}
static void
gtk_shortcuts_group_class_init (GtkShortcutsGroupClass *klass)
{
......@@ -275,6 +293,7 @@ gtk_shortcuts_group_class_init (GtkShortcutsGroupClass *klass)
object_class->finalize = gtk_shortcuts_group_finalize;
object_class->get_property = gtk_shortcuts_group_get_property;
object_class->set_property = gtk_shortcuts_group_set_property;
object_class->dispose = gtk_shortcuts_group_dispose;
widget_class->direction_changed = gtk_shortcuts_group_direction_changed;
container_class->add = gtk_shortcuts_group_add;
......
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