From: cilix42 Date: Wed, 12 Aug 2009 13:18:51 +0000 (+0000) Subject: Don't open 'Save as ...' dialog inside the application bundle on OS X when it is... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=de98252e0eb65d5237b33bbb2717b19fa6b8a983;p=inkscape.git Don't open 'Save as ...' dialog inside the application bundle on OS X when it is invoked for the first time --- diff --git a/src/extension/system.cpp b/src/extension/system.cpp index 2251ac7b6..365ea925b 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -568,7 +568,6 @@ get_file_save_extension (Inkscape::Extension::FileSaveMethod method) { break; } - // this is probably unnecessary, but just to be on the safe side ... if(extension.empty()) extension = SP_MODULE_KEY_OUTPUT_SVG_INKSCAPE; @@ -591,14 +590,17 @@ get_file_save_path (SPDocument *doc, FileSaveMethod method) { if (doc->uri) { path = Glib::path_get_dirname(doc->uri); } else { - // FIXME: should we use the save_as path here or the current directory or even something else? + // FIXME: should we use the save_as path here or something else? Maybe we should + // leave this as a choice to the user. path = prefs->getString("/dialogs/save_as/path"); } } - // this is probably unnecessary, but just to be on the safe side ... if(path.empty()) - path = g_get_current_dir(); // is this the most sensible solution? + path = g_get_home_dir(); // Is this the most sensible solution? Note that we should avoid + // g_get_current_dir because this leads to problems on OS X where + // Inkscape opens the dialog inside application bundle when it is + // invoked for the first teim. return path; }