Commit 73179d37 authored by Timm Bäder's avatar Timm Bäder Committed by Matthias Clasen

listbox: Manually unparent placeholder in dispose

We can't make the placeholder a non-internal child as that breaks
applications that previously relied on foreach() to only return
GtkListBoxRow instances. Instead, unparent the placeholder manually in
dispose.

https://bugzilla.gnome.org/show_bug.cgi?id=782494
parent 866bd834
......@@ -408,6 +408,20 @@ gtk_list_box_finalize (GObject *obj)
G_OBJECT_CLASS (gtk_list_box_parent_class)->finalize (obj);
}
static void
gtk_list_box_dispose (GObject *object)
{
GtkListBoxPrivate *priv = BOX_PRIV (object);
if (priv->placeholder)
{
gtk_widget_unparent (priv->placeholder);
priv->placeholder = NULL;
}
G_OBJECT_CLASS (gtk_list_box_parent_class)->dispose (object);
}
static void
gtk_list_box_class_init (GtkListBoxClass *klass)
{
......@@ -421,6 +435,7 @@ gtk_list_box_class_init (GtkListBoxClass *klass)
object_class->get_property = gtk_list_box_get_property;
object_class->set_property = gtk_list_box_set_property;
object_class->finalize = gtk_list_box_finalize;
object_class->dispose = gtk_list_box_dispose;
widget_class->enter_notify_event = gtk_list_box_enter_notify_event;
widget_class->leave_notify_event = gtk_list_box_leave_notify_event;
widget_class->motion_notify_event = gtk_list_box_motion_notify_event;
......
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