Logo Search packages:      
Sourcecode: inkscape version File versions

void Inkscape::Preferences::mergeStyle ( Glib::ustring const &  pref_path,
SPCSSAttr *  style 
)

Merge a CSS style with the current preference value.

This method is similar to setStyle(), except that it merges the style rather than replacing it. This means that if style doesn't have a property set, it is left unchanged in the style stored in the preferences.

Definition at line 358 of file preferences.cpp.

References getStyle().

Referenced by sp_desktop_set_style().

{
    SPCSSAttr *current = getStyle(pref_path);
    sp_repr_css_merge(current, style);
    gchar *css_str = sp_repr_css_write_string(current);
    _setRawValue(pref_path, css_str);
    g_free(css_str);
    sp_repr_css_attr_unref(current);
}


Generated by  Doxygen 1.6.0   Back to index