Code

disconnect signals on destroying
authorbuliabyak <buliabyak@users.sourceforge.net>
Fri, 18 Aug 2006 06:07:48 +0000 (06:07 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Fri, 18 Aug 2006 06:07:48 +0000 (06:07 +0000)
src/widgets/desktop-widget.cpp

index 9ede6f27e02adef4a0ecbbd544167a7c26335050..6b15bb370a0b081576b18f5f8e2eeb38e8caa0f5 100644 (file)
@@ -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();