r20101 - gnucash/trunk/src/app-utils - Bug 639322 part 3: provide users with a sensible first time "Save As..." path on Windows
Geert Janssens
gjanssens at code.gnucash.org
Fri Jan 14 16:47:45 EST 2011
Author: gjanssens
Date: 2011-01-14 16:47:44 -0500 (Fri, 14 Jan 2011)
New Revision: 20101
Trac: http://svn.gnucash.org/trac/changeset/20101
Modified:
gnucash/trunk/src/app-utils/gnc-ui-util.c
Log:
Bug 639322 part 3: provide users with a sensible first time "Save As..." path on Windows
While $HOME is fine on linux, on Windows the most sensible location is "My Documents"
(or its translated equivalent).
Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c 2011-01-14 21:47:35 UTC (rev 20100)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c 2011-01-14 21:47:44 UTC (rev 20101)
@@ -183,7 +183,11 @@
dir = gnc_gconf_get_string (gconf_section, KEY_LAST_PATH, NULL);
if (!dir)
+#ifdef G_OS_WIN32
+ dir = g_strdup (g_get_user_data_dir ()); /* equivalent of "My Documents" */
+#else
dir = g_strdup (g_get_home_dir ());
+#endif
return dir;
}
More information about the gnucash-changes
mailing list