diff options
| author | Martin Owens <doctormo@gmail.com> | 2017-07-02 14:47:03 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2017-07-02 14:47:03 +0000 |
| commit | 7dc5626af3eb924fa381c46491cd49178a78cd73 (patch) | |
| tree | e50a3b98ce1393b7a06efbd11425f8c458b0cbbb /src/extension/implementation/xslt.cpp | |
| parent | pyc files are generated when testing modules, ignore them (diff) | |
| download | inkscape-7dc5626af3eb924fa381c46491cd49178a78cd73.tar.gz inkscape-7dc5626af3eb924fa381c46491cd49178a78cd73.zip | |
Move directory scanners to new get_filenames(...) calls
Diffstat (limited to 'src/extension/implementation/xslt.cpp')
| -rw-r--r-- | src/extension/implementation/xslt.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/extension/implementation/xslt.cpp b/src/extension/implementation/xslt.cpp index 373378d97..94852a98e 100644 --- a/src/extension/implementation/xslt.cpp +++ b/src/extension/implementation/xslt.cpp @@ -23,6 +23,7 @@ #include "extension/input.h" #include "io/sys.h" +#include "io/resource.h" #include <unistd.h> #include <cstring> #include "document.h" @@ -62,30 +63,13 @@ Glib::ustring XSLT::solve_reldir(Inkscape::XML::Node *reprin) { } Glib::ustring reldir = s; - if (reldir == "extensions") { - - for (unsigned int i=0; - i < Inkscape::Extension::Extension::search_path.size(); - i++) { - - gchar * fname = g_build_filename( - Inkscape::Extension::Extension::search_path[i], - reprin->firstChild()->content(), - NULL); - Glib::ustring filename = fname; - g_free(fname); - - if ( Inkscape::IO::file_test(filename.c_str(), G_FILE_TEST_EXISTS) ) - return filename; - - } + using namespace Inkscape::IO::Resource; + return get_filename(EXTENSIONS, reprin->firstChild()->content()); } else { Glib::ustring str = reprin->firstChild()->content(); return str; } - - return ""; } bool XSLT::check(Inkscape::Extension::Extension *module) |
