summaryrefslogtreecommitdiffstats
path: root/src/extension/param/parameter.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2011-10-28 19:41:31 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2011-10-28 19:41:31 +0000
commitefbfc732bbed46c3e615fcd88294a02ee98b7530 (patch)
tree13f5812e3c192ba8cce4b174c798bc12ffad4c1a /src/extension/param/parameter.cpp
parentfix initialization. add todo comment about gui-hidden not being used. (diff)
downloadinkscape-efbfc732bbed46c3e615fcd88294a02ee98b7530.tar.gz
inkscape-efbfc732bbed46c3e615fcd88294a02ee98b7530.zip
one constructor cannot call the other to initialize the object. See C++faq-lite 10.3
(bzr r10699)
Diffstat (limited to 'src/extension/param/parameter.cpp')
-rw-r--r--src/extension/param/parameter.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp
index 0a88fdda8..106cd76a6 100644
--- a/src/extension/param/parameter.cpp
+++ b/src/extension/param/parameter.cpp
@@ -307,11 +307,27 @@ Parameter::Parameter (const gchar * name, const gchar * guitext, const gchar * d
_gui_tip = g_strdup(gui_tip);
}
+ if (guitext != NULL) {
+ _text = g_strdup(guitext);
+ } else {
+ _text = g_strdup(name);
+ }
+
+ return;
+}
- if (guitext != NULL)
+/** \brief Oop, now that we need a parameter, we need it's name. */
+Parameter::Parameter (const gchar * name, const gchar * guitext, Inkscape::Extension::Extension * ext) :
+ extension(ext), _name(NULL), _desc(NULL), _scope(Parameter::SCOPE_USER), _text(NULL), _gui_hidden(false), _gui_tip(NULL)
+{
+ if (name != NULL) {
+ _name = g_strdup(name);
+ }
+ if (guitext != NULL) {
_text = g_strdup(guitext);
- else
+ } else {
_text = g_strdup(name);
+ }
return;
}