summaryrefslogtreecommitdiffstats
path: root/src/extension/param/parameter.cpp
diff options
context:
space:
mode:
authorMarcin Floryan <mfloryan@mm.waw.pl>2008-04-15 16:17:21 +0000
committermfloryan <mfloryan@users.sourceforge.net>2008-04-15 16:17:21 +0000
commita9178b177e16f6981499ae3f42e804a9a27fe121 (patch)
tree06d350b808e96bbd3ea2f7ccb8c3d6e4396dbb01 /src/extension/param/parameter.cpp
parenti18n: Added some comments for translators. (diff)
downloadinkscape-a9178b177e16f6981499ae3f42e804a9a27fe121.tar.gz
inkscape-a9178b177e16f6981499ae3f42e804a9a27fe121.zip
Fixes Bug #216584 (Effects/Color/Replace color not accepting UC) and also implements max_length attribute for string parameters in inx files.
(bzr r5450)
Diffstat (limited to 'src/extension/param/parameter.cpp')
-rw-r--r--src/extension/param/parameter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp
index 7e071e7e3..b356c297e 100644
--- a/src/extension/param/parameter.cpp
+++ b/src/extension/param/parameter.cpp
@@ -128,6 +128,11 @@ Parameter::make (Inkscape::XML::Node * in_repr, Inkscape::Extension::Extension *
param = new ParamFloat(name, guitext, desc, scope, gui_hidden, gui_tip, in_ext, in_repr);
} else if (!strcmp(type, "string")) {
param = new ParamString(name, guitext, desc, scope, gui_hidden, gui_tip, in_ext, in_repr);
+ const gchar * max_length = in_repr->attribute("max_length");
+ if (max_length != NULL) {
+ ParamString * ps = dynamic_cast<ParamString *>(param);
+ ps->setMaxLength(atoi(max_length));
+ }
} else if (!strcmp(type, "description")) {
param = new ParamDescription(name, guitext, desc, scope, gui_hidden, gui_tip, in_ext, in_repr);
} else if (!strcmp(type, "enum")) {