diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2011-06-08 18:23:27 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2011-06-08 18:23:27 +0000 |
| commit | cff58b6bd80f0fb13ab65daea0d92eafd5213ff2 (patch) | |
| tree | 4f1fa71c613e6a03cd0f290a1f4ea549083d1572 /src/extension | |
| parent | Fix const on new icon. (diff) | |
| download | inkscape-cff58b6bd80f0fb13ab65daea0d92eafd5213ff2.tar.gz inkscape-cff58b6bd80f0fb13ab65daea0d92eafd5213ff2.zip | |
Save a copy dialog now opens in current directory if this option is set for save as... dialog. (there is also the possibility to manually change the preferences file to change this option independently from save as... dialog)
Fixed bugs:
- https://launchpad.net/bugs/791098
(bzr r10263)
Diffstat (limited to 'src/extension')
| -rw-r--r-- | src/extension/system.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/extension/system.cpp b/src/extension/system.cpp index aa5731985..b3b64ca7d 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -590,10 +590,11 @@ Glib::ustring get_file_save_path (SPDocument *doc, FileSaveMethod method) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); Glib::ustring path; + bool use_current_dir = true; switch (method) { case FILE_SAVE_METHOD_SAVE_AS: { - bool use_current_dir = prefs->getBool("/dialogs/save_as/use_current_dir", true); + use_current_dir = prefs->getBool("/dialogs/save_as/use_current_dir", true); if (doc->getURI() && use_current_dir) { path = Glib::path_get_dirname(doc->getURI()); } else { @@ -605,7 +606,12 @@ get_file_save_path (SPDocument *doc, FileSaveMethod method) { path = prefs->getString("/dialogs/save_as/path"); break; case FILE_SAVE_METHOD_SAVE_COPY: - path = prefs->getString("/dialogs/save_copy/path"); + use_current_dir = prefs->getBool("/dialogs/save_copy/use_current_dir", prefs->getBool("/dialogs/save_as/use_current_dir", true)); + if (doc->getURI() && use_current_dir) { + path = Glib::path_get_dirname(doc->getURI()); + } else { + path = prefs->getString("/dialogs/save_copy/path"); + } break; case FILE_SAVE_METHOD_INKSCAPE_SVG: if (doc->getURI()) { |
