X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fextension%2Fextension.cpp;h=b4cf06bda3b513490631118270c61b17cd5a7f78;hb=d9ca69e95d514a29403139d7de122abe26db5461;hp=1229749f5339d73acb616da57b36ce6a688d018f;hpb=8435052ef25dc903d1d438b137a9348ec681020b;p=inkscape.git diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index 1229749f5..b4cf06bda 100644 --- a/src/extension/extension.cpp +++ b/src/extension/extension.cpp @@ -57,7 +57,9 @@ Parameter * param_shared (const gchar * name, GSList * list); not related to the module directly. If the Repr does not include a name and an ID the module will be left in an errored state. */ -Extension::Extension (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp) : _help(NULL) +Extension::Extension (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp) + : _help(NULL) + , _gui(true) { repr = in_repr; Inkscape::GC::anchor(in_repr); @@ -79,6 +81,9 @@ Extension::Extension (Inkscape::XML::Node * in_repr, Implementation::Implementat /* TODO: Handle what happens if we don't have these two */ while (child_repr != NULL) { char const * chname = child_repr->name(); + if (!strncmp(chname, INKSCAPE_EXTENSION_NS_NC, strlen(INKSCAPE_EXTENSION_NS_NC))) { + chname += strlen(INKSCAPE_EXTENSION_NS); + } if (chname[0] == '_') /* Allow _ for translation of tags */ chname++; if (!strcmp(chname, "id")) { @@ -435,6 +440,14 @@ Extension::get_param_enum (const gchar * name, const SPDocument * doc, const Ink return param->get_enum(doc, node); } + +gchar const *Extension::get_param_optiongroup( gchar const * name, SPDocument const * doc, Inkscape::XML::Node const * node) +{ + Parameter* param = param_shared(name, parameters); + return param->get_optiongroup(doc, node); +} + + /** \return The value of the parameter identified by the name \brief Gets a parameter identified by name with the bool placed @@ -592,6 +605,13 @@ Extension::set_param_string (const gchar * name, const gchar * value, SPDocument return param->set_string(value, doc, node); } +gchar const * Extension::set_param_optiongroup(gchar const * name, gchar const * value, SPDocument * doc, Inkscape::XML::Node * node) +{ + Parameter * param = param_shared(name, parameters); + return param->set_optiongroup(value, doc, node); +} + + /** \return The passed in value \brief Sets a parameter identified by name with the string @@ -670,7 +690,7 @@ public: Gtk::Widget * Extension::autogui (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal * changeSignal) { - if (param_visible_count() == 0) return NULL; + if (!_gui || param_visible_count() == 0) return NULL; AutoGUI * agui = Gtk::manage(new AutoGUI());