diff options
| author | Albin Sunnanbo <albin@sunnanbo.com> | 2008-03-13 14:23:42 +0000 |
|---|---|---|
| committer | albinsunnanbo <albinsunnanbo@users.sourceforge.net> | 2008-03-13 14:23:42 +0000 |
| commit | a6ede22d67ad3af2fff7911525f39f767d94f6e4 (patch) | |
| tree | 7e053354b60ae6c2e1ecea1e7bc424c390dd516f /src/extension/init.cpp | |
| parent | disable snapindicator for now to fix pen tool (diff) | |
| download | inkscape-a6ede22d67ad3af2fff7911525f39f767d94f6e4.tar.gz inkscape-a6ede22d67ad3af2fff7911525f39f767d94f6e4.zip | |
BUG 168896, fix init.cpp.patch Native windows dialogs breaks some extensions (including Save as XAML)
(bzr r5081)
Diffstat (limited to 'src/extension/init.cpp')
| -rw-r--r-- | src/extension/init.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/extension/init.cpp b/src/extension/init.cpp index 0964ab4f4..97179f3d8 100644 --- a/src/extension/init.cpp +++ b/src/extension/init.cpp @@ -234,7 +234,29 @@ init() if (Inkscape::Extension::Extension::search_path.size() == 0) { Inkscape::Extension::Extension::search_path.push_back(profile_path("extensions")); + +#ifdef WIN32 +/* + * The native Windows Save dialogs change the current directory of Inkscape to the path selected in the dialog + * Putting relative paths in the search_path breaks things after the Save dialog ha been shown + * Especially the XAML-save: https://bugs.launchpad.net/inkscape/+bug/168896 + * This code inserts an absolute path based on the current working dir when Inkscape starts. + * Only included in WIN32 to avoid messing around with other platforms for the moment + * After testing on other platforms this code can be enabled on other platforms (it "should" not break anything). + */ + gchar * cwd = g_get_current_dir(); + gchar * fname = g_build_filename( + cwd, + g_strdup(INKSCAPE_EXTENSIONDIR), + NULL); + Glib::ustring filename = fname; + Inkscape::Extension::Extension::search_path.push_back(g_strdup(filename.c_str())); + g_free(cwd); + g_free(fname); +#else Inkscape::Extension::Extension::search_path.push_back(g_strdup(INKSCAPE_EXTENSIONDIR)); +#endif + } for (unsigned int i=0; i<Inkscape::Extension::Extension::search_path.size(); i++) { |
