From: buliabyak Date: Fri, 18 Aug 2006 06:07:48 +0000 (+0000) Subject: disconnect signals on destroying X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=36bc7dd88d084a2beb99e61b046e7fffde6e21c5;p=inkscape.git disconnect signals on destroying --- diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index 9ede6f27e..6b15bb370 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -348,6 +348,13 @@ sp_desktop_widget_destroy (GtkObject *object) SPDesktopWidget *dtw = SP_DESKTOP_WIDGET (object); if (dtw->desktop) { + g_signal_handlers_disconnect_by_func(G_OBJECT (dtw->zoom_status), (gpointer) G_CALLBACK(sp_dtw_zoom_input), dtw); + g_signal_handlers_disconnect_by_func(G_OBJECT (dtw->zoom_status), (gpointer) G_CALLBACK(sp_dtw_zoom_output), dtw); + gtk_signal_disconnect_by_data (GTK_OBJECT (dtw->zoom_status), dtw->zoom_status); + g_signal_handlers_disconnect_by_func (G_OBJECT (dtw->zoom_status), (gpointer) G_CALLBACK (sp_dtw_zoom_value_changed), dtw); + g_signal_handlers_disconnect_by_func (G_OBJECT (dtw->zoom_status), (gpointer) G_CALLBACK (sp_dtw_zoom_populate_popup), dtw); + g_signal_handlers_disconnect_by_func (G_OBJECT (dtw->canvas), (gpointer) G_CALLBACK (sp_desktop_widget_event), dtw); + dtw->layer_selector->unreference(); inkscape_remove_desktop (dtw->desktop); // clears selection too dtw->modified_connection.disconnect();