summaryrefslogtreecommitdiffstats
path: root/src/extension/extension.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-11-23 23:36:49 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-11-23 23:36:49 +0000
commit0969085ddf607a7a98cf7fd6d9b10da5fbebe62d (patch)
tree59b2bc9ed3412ab2de4c703ef30342dfe2401704 /src/extension/extension.cpp
parentrefactor from lastApplied (diff)
parentFixed a bug pointed by suv running from comand line, also removed another des... (diff)
downloadinkscape-0969085ddf607a7a98cf7fd6d9b10da5fbebe62d.tar.gz
inkscape-0969085ddf607a7a98cf7fd6d9b10da5fbebe62d.zip
fixing to trunk
(bzr r12588.1.34)
Diffstat (limited to 'src/extension/extension.cpp')
-rw-r--r--src/extension/extension.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp
index d63ec7485..6a22eb585 100644
--- a/src/extension/extension.cpp
+++ b/src/extension/extension.cpp
@@ -111,6 +111,14 @@ Extension::Extension (Inkscape::XML::Node * in_repr, Implementation::Implementat
if (!strcmp(chname, "dependency")) {
_deps.push_back(new Dependency(child_repr));
} /* dependency */
+ if (!strcmp(chname, "script")) {
+ for (Inkscape::XML::Node *child = child_repr->firstChild(); child != NULL ; child = child->next()) {
+ if (child->type() == Inkscape::XML::ELEMENT_NODE) {
+ _deps.push_back(new Dependency(child));
+ break;
+ } /* skip non-element nodes (see LP #1372200) */
+ }
+ } /* check command as a dependency (see LP #505920) */
if (!strcmp(chname, "options")) {
silent = !strcmp( child_repr->attribute("silent"), "true" );
}
@@ -262,6 +270,18 @@ Extension::check (void)
const char * inx_failure = _(" This is caused by an improper .inx file for this extension."
" An improper .inx file could have been caused by a faulty installation of Inkscape.");
+
+ // No need to include Windows only extensions
+ // See LP bug #1307554 for details - https://bugs.launchpad.net/inkscape/+bug/1307554
+#ifndef WIN32
+ const char* win_ext[] = {"com.vaxxine.print.win32"};
+ std::vector<std::string> v (win_ext, win_ext + sizeof(win_ext)/sizeof(win_ext[0]));
+ std::string ext_id(id);
+ if (std::find(v.begin(), v.end(), ext_id) != v.end()) {
+ printFailure(Glib::ustring(_("the extension is designed for Windows only.")) + inx_failure);
+ retval = false;
+ }
+#endif
if (id == NULL) {
printFailure(Glib::ustring(_("an ID was not defined for it.")) + inx_failure);
retval = false;