diff options
| author | Josh Andler <scislac@gmail.com> | 2009-10-02 21:17:41 +0000 |
|---|---|---|
| committer | scislac <scislac@users.sourceforge.net> | 2009-10-02 21:17:41 +0000 |
| commit | dc1d762c9e37b7932411fe513d5222c2928a2251 (patch) | |
| tree | e68873141ed41230548ca73f9ec3862682d85e63 /src/extension/system.cpp | |
| parent | Dutch basic tutorial update (SVG file). (diff) | |
| download | inkscape-dc1d762c9e37b7932411fe513d5222c2928a2251.tar.gz inkscape-dc1d762c9e37b7932411fe513d5222c2928a2251.zip | |
Patch by Max to add option for better Save As behavior.
(bzr r8697)
Diffstat (limited to 'src/extension/system.cpp')
| -rw-r--r-- | src/extension/system.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/extension/system.cpp b/src/extension/system.cpp index 43e7af494..f41217959 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -588,6 +588,15 @@ get_file_save_path (SPDocument *doc, FileSaveMethod method) { Glib::ustring path; switch (method) { case FILE_SAVE_METHOD_SAVE_AS: + { + bool use_current_dir = prefs->getBool("/dialogs/save_as/use_current_dir"); + if (doc->uri && use_current_dir) { + path = Glib::path_get_dirname(doc->uri); + } else { + path = prefs->getString("/dialogs/save_as/path"); + } + break; + } case FILE_SAVE_METHOD_TEMPORARY: path = prefs->getString("/dialogs/save_as/path"); break; |
