[gimp] Bug 753683 - default path location
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 753683 - default path location
- Date: Fri, 12 Feb 2016 22:10:13 +0000 (UTC)
commit 336785ab51eee35d5635f6a70cb5816c00d0fb04
Author: Michael Natterer <mitch gimp org>
Date: Fri Feb 12 23:09:03 2016 +0100
Bug 753683 - default path location
Change the default folder to "Desktop" on OS X because it's expected
on the platform.
app/widgets/gimpfiledialog.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/app/widgets/gimpfiledialog.c b/app/widgets/gimpfiledialog.c
index 1609985..fd0c7c6 100644
--- a/app/widgets/gimpfiledialog.c
+++ b/app/widgets/gimpfiledialog.c
@@ -447,20 +447,27 @@ gimp_file_dialog_real_get_default_folder (GimpFileDialog *dialog)
}
else
{
- /* The default folder is "Documents" for all file dialogs.
- * Children can reimplement this. */
file = g_object_get_data (G_OBJECT (dialog->gimp),
- "gimp-documents-folder");
+ "gimp-default-folder");
if (! file)
{
gchar *path;
- /* Make sure it ends in '/' */
+ /* Make sure the paths end with G_DIR_SEPARATOR_S */
+
+#ifdef PLATFORM_OSX
+ /* See bug 753683, "Desktop" is expected on OS X */
+ path = g_build_path (G_DIR_SEPARATOR_S,
+ g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP),
+ G_DIR_SEPARATOR_S,
+ NULL);
+#else
path = g_build_path (G_DIR_SEPARATOR_S,
g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS),
G_DIR_SEPARATOR_S,
NULL);
+#endif
/* Paranoia fallback, see bug #722400 */
if (! path)
@@ -473,7 +480,7 @@ gimp_file_dialog_real_get_default_folder (GimpFileDialog *dialog)
g_free (path);
g_object_set_data_full (G_OBJECT (dialog->gimp),
- "gimp-documents-folder",
+ "gimp-default-folder",
file, (GDestroyNotify) g_object_unref);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]