diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2019-04-30 20:40:33 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mail@diedenrezi.nl> | 2019-04-30 20:40:33 +0000 |
| commit | d137944b06575b9e79d0a3e79a3e5f5b8f6665e2 (patch) | |
| tree | 6017a86cc0040ca9d7615c879036bd320f6e5de7 /src/inkscape-main.cpp | |
| parent | Fix disappearing and antialiasing of grid lines (diff) | |
| parent | Set spacing in About Dialog (diff) | |
| download | inkscape-d137944b06575b9e79d0a3e79a3e5f5b8f6665e2.tar.gz inkscape-d137944b06575b9e79d0a3e79a3e5f5b8f6665e2.zip | |
Merge branch 'master' of gitlab.com:inkscape/inkscape
Diffstat (limited to 'src/inkscape-main.cpp')
| -rw-r--r-- | src/inkscape-main.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/inkscape-main.cpp b/src/inkscape-main.cpp index beb632fbd..aac164b37 100644 --- a/src/inkscape-main.cpp +++ b/src/inkscape-main.cpp @@ -30,15 +30,23 @@ static void set_extensions_env() g_free(program_dir); // add share/inkscape/extensions to PYTHONPATH so the inkex module is found by extensions in user folder + auto new_pythonpath = std::string(INKSCAPE_EXTENSIONDIR); + + // add old PYTHONPATH gchar const *pythonpath = g_getenv("PYTHONPATH"); - gchar *new_pythonpath; if (pythonpath) { - new_pythonpath = g_strdup_printf("%s" G_SEARCHPATH_SEPARATOR_S "%s", INKSCAPE_EXTENSIONDIR, pythonpath); - } else { - new_pythonpath = g_strdup(INKSCAPE_EXTENSIONDIR); + new_pythonpath.append(G_SEARCHPATH_SEPARATOR_S).append(pythonpath); } - g_setenv("PYTHONPATH", new_pythonpath, true); - g_free(new_pythonpath); + + // add share/inkscape/extensions/inkex/deprecated-simple + new_pythonpath.append(G_SEARCHPATH_SEPARATOR_S) + .append(INKSCAPE_EXTENSIONDIR) + .append(G_DIR_SEPARATOR_S) + .append("inkex") + .append(G_DIR_SEPARATOR_S) + .append("deprecated-simple"); + + g_setenv("PYTHONPATH", new_pythonpath.c_str(), true); #ifdef _WIN32 // add inkscape directory to DLL search path so dynamically linked extension modules find their libraries |
