diff options
| author | Ted Gould <ted@gould.cx> | 2008-04-21 22:57:53 +0000 |
|---|---|---|
| committer | gouldtj <gouldtj@users.sourceforge.net> | 2008-04-21 22:57:53 +0000 |
| commit | 6e412e5d2a83d5d4a835a4baa5a82514604408ac (patch) | |
| tree | 6035587de110b08f9f3bc2338323a970e6cdb045 /src/extension/system.cpp | |
| parent | Show the name of the swatch that is currently under the pointer in the status... (diff) | |
| download | inkscape-6e412e5d2a83d5d4a835a4baa5a82514604408ac.tar.gz inkscape-6e412e5d2a83d5d4a835a4baa5a82514604408ac.zip | |
r19076@shi: ted | 2008-04-21 15:42:45 -0700
Core of having a real namespace for Inkscape extensions.
r19077@shi: ted | 2008-04-21 15:50:12 -0700
First layer of adding NS
r19078@shi: ted | 2008-04-21 15:56:03 -0700
Whew, doing the rest of them.
(bzr r5483)
Diffstat (limited to 'src/extension/system.cpp')
| -rw-r--r-- | src/extension/system.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/extension/system.cpp b/src/extension/system.cpp index b9976595a..16e13c94d 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -20,6 +20,7 @@ #include <interface.h> +#include "extension.h" #include "db.h" #include "input.h" #include "output.h" @@ -390,8 +391,8 @@ build_from_reprdoc(Inkscape::XML::Document *doc, Implementation::Implementation /* sp_repr_print(repr); */ - if (strcmp(repr->name(), "inkscape-extension")) { - g_warning("Extension definition started with <%s> instead of <inkscape-extension>. Extension will not be created.\n", repr->name()); + if (strcmp(repr->name(), INKSCAPE_EXTENSION_NS "inkscape-extension")) { + g_warning("Extension definition started with <%s> instead of <" INKSCAPE_EXTENSION_NS "inkscape-extension>. Extension will not be created.\n", repr->name()); return NULL; } @@ -399,19 +400,19 @@ build_from_reprdoc(Inkscape::XML::Document *doc, Implementation::Implementation while (child_repr != NULL) { char const *element_name = child_repr->name(); /* printf("Child: %s\n", child_repr->name()); */ - if (!strcmp(element_name, "input")) { + if (!strcmp(element_name, INKSCAPE_EXTENSION_NS "input")) { module_functional_type = MODULE_INPUT; - } else if (!strcmp(element_name, "output")) { + } else if (!strcmp(element_name, INKSCAPE_EXTENSION_NS "output")) { module_functional_type = MODULE_OUTPUT; - } else if (!strcmp(element_name, "effect")) { + } else if (!strcmp(element_name, INKSCAPE_EXTENSION_NS "effect")) { module_functional_type = MODULE_FILTER; - } else if (!strcmp(element_name, "print")) { + } else if (!strcmp(element_name, INKSCAPE_EXTENSION_NS "print")) { module_functional_type = MODULE_PRINT; - } else if (!strcmp(element_name, "path-effect")) { + } else if (!strcmp(element_name, INKSCAPE_EXTENSION_NS "path-effect")) { module_functional_type = MODULE_PATH_EFFECT; - } else if (!strcmp(element_name, "script")) { + } else if (!strcmp(element_name, INKSCAPE_EXTENSION_NS "script")) { module_implementation_type = MODULE_EXTENSION; - } else if (!strcmp(element_name, "xslt")) { + } else if (!strcmp(element_name, INKSCAPE_EXTENSION_NS "xslt")) { module_implementation_type = MODULE_XSLT; #if 0 } else if (!strcmp(element_name, "plugin")) { @@ -496,7 +497,7 @@ build_from_file(gchar const *filename) { /* TODO: Need to define namespace here, need to write the DTD in general for this stuff */ - Inkscape::XML::Document *doc = sp_repr_read_file(filename, NULL); + Inkscape::XML::Document *doc = sp_repr_read_file(filename, INKSCAPE_EXTENSION_URI); Extension *ext = build_from_reprdoc(doc, NULL); if (ext != NULL) Inkscape::GC::release(doc); @@ -517,7 +518,7 @@ build_from_file(gchar const *filename) Extension * build_from_mem(gchar const *buffer, Implementation::Implementation *in_imp) { - Inkscape::XML::Document *doc = sp_repr_read_mem(buffer, strlen(buffer), NULL); + Inkscape::XML::Document *doc = sp_repr_read_mem(buffer, strlen(buffer), INKSCAPE_EXTENSION_URI); Extension *ext = build_from_reprdoc(doc, in_imp); Inkscape::GC::release(doc); return ext; |
