diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-04-09 13:39:40 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-04-09 13:39:40 +0000 |
| commit | f0ad38f6fd0d18f48d92df4b55ff8352747e6b2c (patch) | |
| tree | 9ead777c363db217d978be2f71126e023f6f48e3 /src | |
| parent | Remove unused field "gui_tip" (diff) | |
| download | inkscape-f0ad38f6fd0d18f48d92df4b55ff8352747e6b2c.tar.gz inkscape-f0ad38f6fd0d18f48d92df4b55ff8352747e6b2c.zip | |
Remove unused field "scope"
(bzr r15633.1.2)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/bluredge.cpp | 4 | ||||
| -rw-r--r-- | src/extension/param/bool.cpp | 3 | ||||
| -rw-r--r-- | src/extension/param/bool.h | 1 | ||||
| -rw-r--r-- | src/extension/param/color.cpp | 3 | ||||
| -rw-r--r-- | src/extension/param/color.h | 1 | ||||
| -rw-r--r-- | src/extension/param/description.cpp | 3 | ||||
| -rw-r--r-- | src/extension/param/description.h | 1 | ||||
| -rw-r--r-- | src/extension/param/enum.cpp | 3 | ||||
| -rw-r--r-- | src/extension/param/enum.h | 1 | ||||
| -rw-r--r-- | src/extension/param/float.cpp | 3 | ||||
| -rw-r--r-- | src/extension/param/float.h | 1 | ||||
| -rw-r--r-- | src/extension/param/int.cpp | 3 | ||||
| -rw-r--r-- | src/extension/param/int.h | 1 | ||||
| -rw-r--r-- | src/extension/param/notebook.cpp | 22 | ||||
| -rw-r--r-- | src/extension/param/notebook.h | 1 | ||||
| -rw-r--r-- | src/extension/param/parameter.cpp | 42 | ||||
| -rw-r--r-- | src/extension/param/parameter.h | 12 | ||||
| -rw-r--r-- | src/extension/param/radiobutton.cpp | 3 | ||||
| -rw-r--r-- | src/extension/param/radiobutton.h | 1 | ||||
| -rw-r--r-- | src/extension/param/string.cpp | 3 | ||||
| -rw-r--r-- | src/extension/param/string.h | 1 | ||||
| -rw-r--r-- | src/extension/prefdialog.cpp | 2 |
22 files changed, 27 insertions, 88 deletions
diff --git a/src/extension/internal/bluredge.cpp b/src/extension/internal/bluredge.cpp index 8aa982810..d1fe357da 100644 --- a/src/extension/internal/bluredge.cpp +++ b/src/extension/internal/bluredge.cpp @@ -131,8 +131,8 @@ BlurEdge::init (void) "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI "\">\n" "<name>" N_("Inset/Outset Halo") "</name>\n" "<id>org.inkscape.effect.bluredge</id>\n" - "<param name=\"blur-width\" _gui-text=\"" N_("Width:") "\" gui-description=\"" N_("Width in px of the halo") "\" scope=\"document\" type=\"float\" min=\"1.0\" max=\"50.0\">1.0</param>\n" - "<param name=\"num-steps\" _gui-text=\"" N_("Number of steps:") "\" gui-description=\"" N_("Number of inset/outset copies of the object to make") "\" scope=\"document\" type=\"int\" min=\"5\" max=\"100\">11</param>\n" + "<param name=\"blur-width\" _gui-text=\"" N_("Width:") "\" gui-description=\"" N_("Width in px of the halo") "\" type=\"float\" min=\"1.0\" max=\"50.0\">1.0</param>\n" + "<param name=\"num-steps\" _gui-text=\"" N_("Number of steps:") "\" gui-description=\"" N_("Number of inset/outset copies of the object to make") "\" type=\"int\" min=\"5\" max=\"100\">11</param>\n" "<effect>\n" "<object-type>all</object-type>\n" "<effects-menu>\n" diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp index 612bf0331..05f896a2d 100644 --- a/src/extension/param/bool.cpp +++ b/src/extension/param/bool.cpp @@ -27,12 +27,11 @@ namespace Extension { ParamBool::ParamBool(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml) - : Parameter(name, guitext, desc, scope, gui_hidden, indent, ext) + : Parameter(name, guitext, desc, gui_hidden, indent, ext) , _value(false) { const char * defaultval = NULL; diff --git a/src/extension/param/bool.h b/src/extension/param/bool.h index 8a7887cc6..de6542d64 100644 --- a/src/extension/param/bool.h +++ b/src/extension/param/bool.h @@ -35,7 +35,6 @@ public: ParamBool(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, diff --git a/src/extension/param/color.cpp b/src/extension/param/color.cpp index 6f6582b82..064a465b7 100644 --- a/src/extension/param/color.cpp +++ b/src/extension/param/color.cpp @@ -55,12 +55,11 @@ guint32 ParamColor::set( guint32 in, SPDocument * /*doc*/, Inkscape::XML::Node * ParamColor::ParamColor(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml) - : Parameter(name, guitext, desc, scope, gui_hidden, indent, ext) + : Parameter(name, guitext, desc, gui_hidden, indent, ext) , _changeSignal(0) { const char * defaulthex = NULL; diff --git a/src/extension/param/color.h b/src/extension/param/color.h index 184d57b28..222eb13f3 100644 --- a/src/extension/param/color.h +++ b/src/extension/param/color.h @@ -34,7 +34,6 @@ public: ParamColor(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, diff --git a/src/extension/param/description.cpp b/src/extension/param/description.cpp index 0f3c92dd8..48e95aa2a 100644 --- a/src/extension/param/description.cpp +++ b/src/extension/param/description.cpp @@ -31,13 +31,12 @@ namespace Extension { ParamDescription::ParamDescription(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml, AppearanceMode mode) - : Parameter(name, guitext, desc, scope, gui_hidden, indent, ext) + : Parameter(name, guitext, desc, gui_hidden, indent, ext) , _value(NULL) , _mode(mode) , _preserve_whitespace(false) diff --git a/src/extension/param/description.h b/src/extension/param/description.h index c065e5415..64fbef5e5 100644 --- a/src/extension/param/description.h +++ b/src/extension/param/description.h @@ -32,7 +32,6 @@ public: ParamDescription(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp index d93ed4b5a..377bb0f57 100644 --- a/src/extension/param/enum.cpp +++ b/src/extension/param/enum.cpp @@ -49,12 +49,11 @@ public: ParamComboBox::ParamComboBox(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml) - : Parameter(name, guitext, desc, scope, gui_hidden, indent, ext) + : Parameter(name, guitext, desc, gui_hidden, indent, ext) , _value(NULL) , choices(NULL) { diff --git a/src/extension/param/enum.h b/src/extension/param/enum.h index b54815227..e66274485 100644 --- a/src/extension/param/enum.h +++ b/src/extension/param/enum.h @@ -40,7 +40,6 @@ public: ParamComboBox(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, diff --git a/src/extension/param/float.cpp b/src/extension/param/float.cpp index 574c147b6..8c54d4a4a 100644 --- a/src/extension/param/float.cpp +++ b/src/extension/param/float.cpp @@ -30,13 +30,12 @@ namespace Extension { ParamFloat::ParamFloat(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml, AppearanceMode mode) - : Parameter(name, guitext, desc, scope, gui_hidden, indent, ext) + : Parameter(name, guitext, desc, gui_hidden, indent, ext) , _value(0.0) , _mode(mode) , _min(0.0) diff --git a/src/extension/param/float.h b/src/extension/param/float.h index b81b7ff08..0f0078dae 100644 --- a/src/extension/param/float.h +++ b/src/extension/param/float.h @@ -32,7 +32,6 @@ public: ParamFloat(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, diff --git a/src/extension/param/int.cpp b/src/extension/param/int.cpp index c76493a26..e179484d3 100644 --- a/src/extension/param/int.cpp +++ b/src/extension/param/int.cpp @@ -30,13 +30,12 @@ namespace Extension { ParamInt::ParamInt(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml, AppearanceMode mode) - : Parameter(name, guitext, desc, scope, gui_hidden, indent, ext) + : Parameter(name, guitext, desc, gui_hidden, indent, ext) , _value(0) , _mode(mode) , _min(0) diff --git a/src/extension/param/int.h b/src/extension/param/int.h index ae307c371..7b6588139 100644 --- a/src/extension/param/int.h +++ b/src/extension/param/int.h @@ -32,7 +32,6 @@ public: ParamInt(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, diff --git a/src/extension/param/notebook.cpp b/src/extension/param/notebook.cpp index 2e216e967..c61733d26 100644 --- a/src/extension/param/notebook.cpp +++ b/src/extension/param/notebook.cpp @@ -57,7 +57,6 @@ public: ParamNotebookPage(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml); @@ -73,11 +72,10 @@ public: ParamNotebookPage::ParamNotebookPage(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml) - : Parameter(name, guitext, desc, scope, gui_hidden, /*indent*/ 0, ext) + : Parameter(name, guitext, desc, gui_hidden, /*indent*/ 0, ext) { parameters = NULL; @@ -151,8 +149,6 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension: const char * name; const char * guitext; const char * desc; - const char * scope_str; - Parameter::_scope_t scope = Parameter::SCOPE_USER; bool gui_hidden = false; const char * gui_hide; @@ -163,7 +159,6 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension: desc = in_repr->attribute("gui-description"); if (desc == NULL) desc = in_repr->attribute("_gui-description"); - scope_str = in_repr->attribute("scope"); gui_hide = in_repr->attribute("gui-hidden"); if (gui_hide != NULL) { if (strcmp(gui_hide, "1") == 0 || @@ -178,17 +173,7 @@ ParamNotebookPage::makepage (Inkscape::XML::Node * in_repr, Inkscape::Extension: return NULL; } - if (scope_str != NULL) { - if (!strcmp(scope_str, "user")) { - scope = Parameter::SCOPE_USER; - } else if (!strcmp(scope_str, "document")) { - scope = Parameter::SCOPE_DOCUMENT; - } else if (!strcmp(scope_str, "node")) { - scope = Parameter::SCOPE_NODE; - } - } - - ParamNotebookPage * page = new ParamNotebookPage(name, guitext, desc, scope, gui_hidden, in_ext, in_repr); + ParamNotebookPage * page = new ParamNotebookPage(name, guitext, desc, gui_hidden, in_ext, in_repr); /* Note: page could equal NULL */ return page; @@ -243,12 +228,11 @@ Gtk::Widget * ParamNotebookPage::get_widget(SPDocument * doc, Inkscape::XML::Nod ParamNotebook::ParamNotebook(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml) - : Parameter(name, guitext, desc, scope, gui_hidden, indent, ext) + : Parameter(name, guitext, desc, gui_hidden, indent, ext) { pages = NULL; diff --git a/src/extension/param/notebook.h b/src/extension/param/notebook.h index 0b3a2ba85..cfecdbbb3 100644 --- a/src/extension/param/notebook.h +++ b/src/extension/param/notebook.h @@ -44,7 +44,6 @@ public: ParamNotebook(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp index a0488142e..8d77830c4 100644 --- a/src/extension/param/parameter.cpp +++ b/src/extension/param/parameter.cpp @@ -105,37 +105,23 @@ Parameter *Parameter::make(Inkscape::XML::Node *in_repr, Inkscape::Extension::Ex } const gchar* appearance = in_repr->attribute("appearance"); - Parameter::_scope_t scope = Parameter::SCOPE_USER; - { - const char *scope_str = in_repr->attribute("scope"); - if (scope_str != NULL) { - if (!strcmp(scope_str, "user")) { - scope = Parameter::SCOPE_USER; - } else if (!strcmp(scope_str, "document")) { - scope = Parameter::SCOPE_DOCUMENT; - } else if (!strcmp(scope_str, "node")) { - scope = Parameter::SCOPE_NODE; - } - } - } - Parameter * param = NULL; if (!strcmp(type, "boolean")) { - param = new ParamBool(name, guitext, desc, scope, gui_hidden, indent, in_ext, in_repr); + param = new ParamBool(name, guitext, desc, gui_hidden, indent, in_ext, in_repr); } else if (!strcmp(type, "int")) { if (appearance && !strcmp(appearance, "full")) { - param = new ParamInt(name, guitext, desc, scope, gui_hidden, indent, in_ext, in_repr, ParamInt::FULL); + param = new ParamInt(name, guitext, desc, gui_hidden, indent, in_ext, in_repr, ParamInt::FULL); } else { - param = new ParamInt(name, guitext, desc, scope, gui_hidden, indent, in_ext, in_repr, ParamInt::MINIMAL); + param = new ParamInt(name, guitext, desc, gui_hidden, indent, in_ext, in_repr, ParamInt::MINIMAL); } } else if (!strcmp(type, "float")) { if (appearance && !strcmp(appearance, "full")) { - param = new ParamFloat(name, guitext, desc, scope, gui_hidden, indent, in_ext, in_repr, ParamFloat::FULL); + param = new ParamFloat(name, guitext, desc, gui_hidden, indent, in_ext, in_repr, ParamFloat::FULL); } else { - param = new ParamFloat(name, guitext, desc, scope, gui_hidden, indent, in_ext, in_repr, ParamFloat::MINIMAL); + param = new ParamFloat(name, guitext, desc, gui_hidden, indent, in_ext, in_repr, ParamFloat::MINIMAL); } } else if (!strcmp(type, "string")) { - param = new ParamString(name, guitext, desc, scope, gui_hidden, indent, in_ext, in_repr); + param = new ParamString(name, guitext, desc, gui_hidden, indent, in_ext, in_repr); gchar const * max_length = in_repr->attribute("max_length"); if (max_length != NULL) { ParamString * ps = dynamic_cast<ParamString *>(param); @@ -150,19 +136,19 @@ Parameter *Parameter::make(Inkscape::XML::Node *in_repr, Inkscape::Extension::Ex appearance_mode = ParamDescription::URL; } } - param = new ParamDescription(name, guitext, desc, scope, gui_hidden, indent, in_ext, in_repr, appearance_mode); + param = new ParamDescription(name, guitext, desc, gui_hidden, indent, in_ext, in_repr, appearance_mode); } else if (!strcmp(type, "enum")) { - param = new ParamComboBox(name, guitext, desc, scope, gui_hidden, indent, in_ext, in_repr); + param = new ParamComboBox(name, guitext, desc, gui_hidden, indent, in_ext, in_repr); } else if (!strcmp(type, "notebook")) { - param = new ParamNotebook(name, guitext, desc, scope, gui_hidden, indent, in_ext, in_repr); + param = new ParamNotebook(name, guitext, desc, gui_hidden, indent, in_ext, in_repr); } else if (!strcmp(type, "optiongroup")) { if (appearance && !strcmp(appearance, "minimal")) { - param = new ParamRadioButton(name, guitext, desc, scope, gui_hidden, indent, in_ext, in_repr, ParamRadioButton::MINIMAL); + param = new ParamRadioButton(name, guitext, desc, gui_hidden, indent, in_ext, in_repr, ParamRadioButton::MINIMAL); } else { - param = new ParamRadioButton(name, guitext, desc, scope, gui_hidden, indent, in_ext, in_repr, ParamRadioButton::FULL); + param = new ParamRadioButton(name, guitext, desc, gui_hidden, indent, in_ext, in_repr, ParamRadioButton::FULL); } } else if (!strcmp(type, "color")) { - param = new ParamColor(name, guitext, desc, scope, gui_hidden, indent, in_ext, in_repr); + param = new ParamColor(name, guitext, desc, gui_hidden, indent, in_ext, in_repr); } // Note: param could equal NULL @@ -309,9 +295,8 @@ Parameter::set_color (guint32 in, SPDocument * doc, Inkscape::XML::Node * node) /** Oop, now that we need a parameter, we need it's name. */ -Parameter::Parameter(gchar const * name, gchar const * guitext, gchar const * desc, const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext) : +Parameter::Parameter(gchar const * name, gchar const * guitext, gchar const * desc, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext) : _desc(0), - _scope(scope), _text(0), _gui_hidden(gui_hidden), _indent(indent), @@ -338,7 +323,6 @@ Parameter::Parameter(gchar const * name, gchar const * guitext, gchar const * de /** Oop, now that we need a parameter, we need it's name. */ Parameter::Parameter (gchar const * name, gchar const * guitext, Inkscape::Extension::Extension * ext) : _desc(0), - _scope(Parameter::SCOPE_USER), _text(0), _gui_hidden(false), _indent(0), diff --git a/src/extension/param/parameter.h b/src/extension/param/parameter.h index 8888fb15b..4994a6971 100644 --- a/src/extension/param/parameter.h +++ b/src/extension/param/parameter.h @@ -47,19 +47,10 @@ extern Glib::ustring const extension_pref_root; */ class Parameter { -protected: - /** List of possible scopes. */ - typedef enum { - SCOPE_USER, /**< Parameter value is saved in the user's configuration file. (default) */ - SCOPE_DOCUMENT, /**< Parameter value is saved in the document. */ - SCOPE_NODE /**< Parameter value is attached to the node. */ - } _scope_t; - public: Parameter(gchar const *name, gchar const *guitext, gchar const *desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext); @@ -175,9 +166,6 @@ protected: /** Description of the parameter. */ gchar * _desc; - /** Scope of the parameter. */ - _scope_t _scope; - /** Text for the GUI selection of this. */ gchar * _text; diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp index 37d580381..166167fda 100644 --- a/src/extension/param/radiobutton.cpp +++ b/src/extension/param/radiobutton.cpp @@ -60,13 +60,12 @@ public: ParamRadioButton::ParamRadioButton(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml, AppearanceMode mode) - : Parameter(name, guitext, desc, scope, gui_hidden, indent, ext) + : Parameter(name, guitext, desc, gui_hidden, indent, ext) , _value(0) , _mode(mode) , choices(0) diff --git a/src/extension/param/radiobutton.h b/src/extension/param/radiobutton.h index 185ec6a26..f41852baa 100644 --- a/src/extension/param/radiobutton.h +++ b/src/extension/param/radiobutton.h @@ -37,7 +37,6 @@ public: ParamRadioButton(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, diff --git a/src/extension/param/string.cpp b/src/extension/param/string.cpp index ad2968503..22893cd0a 100644 --- a/src/extension/param/string.cpp +++ b/src/extension/param/string.cpp @@ -79,12 +79,11 @@ void ParamString::string(std::string &string) const ParamString::ParamString(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml) - : Parameter(name, guitext, desc, scope, gui_hidden, indent, ext) + : Parameter(name, guitext, desc, gui_hidden, indent, ext) , _value(NULL) { const char * defaultval = NULL; diff --git a/src/extension/param/string.h b/src/extension/param/string.h index e2721582b..2dc1bd483 100644 --- a/src/extension/param/string.h +++ b/src/extension/param/string.h @@ -26,7 +26,6 @@ public: ParamString(const gchar * name, const gchar * guitext, const gchar * desc, - const Parameter::_scope_t scope, bool gui_hidden, int indent, Inkscape::Extension::Extension * ext, diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 2bdbb081e..92ddd3050 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -246,7 +246,7 @@ PrefDialog::on_response (int signal) { #include "internal/clear-n_.h" -const char * PrefDialog::live_param_xml = "<param name=\"__live_effect__\" type=\"boolean\" _gui-text=\"" N_("Live preview") "\" gui-description=\"" N_("Is the effect previewed live on canvas?") "\" scope=\"user\">false</param>"; +const char * PrefDialog::live_param_xml = "<param name=\"__live_effect__\" type=\"boolean\" _gui-text=\"" N_("Live preview") "\" gui-description=\"" N_("Is the effect previewed live on canvas?") "\">false</param>"; }; }; /* namespace Inkscape, Extension */ |
