summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2e6bdbb)
raw | patch | inline | side by side (parent: 2e6bdbb)
author | JucaBlues <JucaBlues@users.sourceforge.net> | |
Fri, 14 Aug 2009 03:52:51 +0000 (03:52 +0000) | ||
committer | JucaBlues <JucaBlues@users.sourceforge.net> | |
Fri, 14 Aug 2009 03:52:51 +0000 (03:52 +0000) |
A complete sanitizer should be implemented later.
src/ui/dialog/document-properties.cpp | patch | blob | history |
index bb9ab4d02676343fb26ced97b0d0841e4530a19f..c21f646291619477140f1f96c0f106a4733a8664 100644 (file)
_menu.show_all();
}
+//this is a quick workaround:
+static gchar* sanitize_name(gchar* name){
+ gchar* c=name;
+ while (*c != '\0'){
+ if (*c == ' ') *c = '-';
+ if (*c == '_') *c = '-';
+ c++;
+ }
+ return name;
+}
+
void
DocumentProperties::linkSelectedProfile()
{
}
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc());
Inkscape::XML::Node *cprofRepr = xml_doc->createElement("svg:color-profile");
- cprofRepr->setAttribute("name", (gchar*) _menu.get_active()->get_data("name"));
+// cprofRepr->setAttribute("inkscape:name", (gchar*) _menu.get_active()->get_data("name"));
+ cprofRepr->setAttribute("name", sanitize_name((gchar*) _menu.get_active()->get_data("name")));
cprofRepr->setAttribute("xlink:href", (gchar*) _menu.get_active()->get_data("filepath"));
// Checks whether there is a defs element. Creates it when needed