mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
widgetpaintable: Don't emit signals on dispose
This commit is contained in:
parent
d3be32f8ea
commit
5dd5ff5236
@ -190,12 +190,24 @@ gtk_widget_paintable_get_property (GObject *object,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_widget_paintable_unset_widget (GtkWidgetPaintable *self)
|
||||||
|
{
|
||||||
|
if (self->widget == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
self->widget->priv->paintables = g_slist_remove (self->widget->priv->paintables,
|
||||||
|
self);
|
||||||
|
|
||||||
|
self->widget = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_widget_paintable_dispose (GObject *object)
|
gtk_widget_paintable_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
GtkWidgetPaintable *self = GTK_WIDGET_PAINTABLE (object);
|
GtkWidgetPaintable *self = GTK_WIDGET_PAINTABLE (object);
|
||||||
|
|
||||||
gtk_widget_paintable_set_widget (self, NULL);
|
gtk_widget_paintable_unset_widget (self);
|
||||||
|
|
||||||
G_OBJECT_CLASS (gtk_widget_paintable_parent_class)->dispose (object);
|
G_OBJECT_CLASS (gtk_widget_paintable_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
@ -311,11 +323,7 @@ gtk_widget_paintable_set_widget (GtkWidgetPaintable *self,
|
|||||||
if (self->widget == widget)
|
if (self->widget == widget)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (self->widget)
|
gtk_widget_paintable_unset_widget (self);
|
||||||
{
|
|
||||||
self->widget->priv->paintables = g_slist_remove (self->widget->priv->paintables,
|
|
||||||
self);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We do not ref the widget to not cause ref cycles when a widget
|
/* We do not ref the widget to not cause ref cycles when a widget
|
||||||
* is told to observe itself or one of its parent.
|
* is told to observe itself or one of its parent.
|
||||||
|
Loading…
Reference in New Issue
Block a user