Logo Search packages:      
Sourcecode: inkscape version File versions

static void sp_desktop_widget_destroy ( GtkObject *  object  )  [static]

Called before SPDesktopWidget destruction.

Definition at line 566 of file desktop-widget.cpp.

References SPDesktopWidget::canvas, SPDesktopWidget::desktop, SPDesktop::destroy(), SPDesktopWidget::layer_selector, SPDesktopWidget::modified_connection, Inkscape::GC::release(), sp_desktop_widget_event(), and SPDesktopWidget::zoom_status.

Referenced by sp_desktop_widget_class_init().

{
    SPDesktopWidget *dtw = SP_DESKTOP_WIDGET (object);

    if (dtw->desktop) {
        if ( watcher ) {
            watcher->remove(dtw);
        }
        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();
        dtw->desktop->destroy();
        Inkscape::GC::release (dtw->desktop);
        dtw->desktop = NULL;
    }

    dtw->modified_connection.~connection();

    if (GTK_OBJECT_CLASS (dtw_parent_class)->destroy) {
        (* GTK_OBJECT_CLASS (dtw_parent_class)->destroy) (object);
    }
}


Generated by  Doxygen 1.6.0   Back to index