places view: Disconnect from volume monitor

Just unreffing the volume monitor object won't stop it from emitting
signals that we are connected to. Disconnect from the signals in
finalize.
This commit is contained in:
Matthias Clasen 2015-07-20 21:19:58 -04:00
parent 99d4ec2676
commit 8102425f03

View File

@ -368,12 +368,16 @@ activate_row (GtkPlacesView *view,
}
}
static void update_places (GtkPlacesView *view);
static void
gtk_places_view_finalize (GObject *object)
{
GtkPlacesView *self = (GtkPlacesView *)object;
GtkPlacesViewPrivate *priv = gtk_places_view_get_instance_private (self);
g_signal_handlers_disconnect_by_func (priv->volume_monitor, update_places, object);
if (priv->entry_pulse_timeout_id > 0)
g_source_remove (priv->entry_pulse_timeout_id);