Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

static void sp_dtw_grid_emp_spacing_changed ( GtkAdjustment *  adjustment,
GtkWidget *  dialog 
) [static]

Callback to set gridempspacing attribute from adjustment widget.

Definition at line 506 of file desktop-properties.cpp.

References sp_repr_set_attr().

Referenced by sp_desktop_dialog().

{
    if (gtk_object_get_data(GTK_OBJECT(dlg), "update")) {
        return;
    }

    SPDesktop *dt = SP_ACTIVE_DESKTOP;
    if (!dt) {
        return;
    }

    Inkscape::XML::Node *repr = SP_OBJECT_REPR(SP_DT_NAMEDVIEW(dt));

    Inkscape::SVGOStringStream os;
    int value = int(adjustment->value);
    os << value;

    sp_repr_set_attr(repr, "gridempspacing", os.str().c_str());
    sp_document_done(SP_DT_DOCUMENT(dt));
}


Generated by  Doxygen 1.6.0   Back to index