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

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

Callback to set guidetolerance attribute from adjustment and guide_snap_units widgets.

Definition at line 533 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));

    SPUnitSelector *us = (SPUnitSelector *) gtk_object_get_data(GTK_OBJECT(dialog),
                                                                "guide_snap_units");

    Inkscape::SVGOStringStream os;
    os << adjustment->value << sp_unit_selector_get_unit(us)->abbr;

    sp_repr_set_attr(repr, "guidetolerance", os.str().c_str());
}


Generated by  Doxygen 1.6.0   Back to index