diff --git a/src/control/jobs/control_jobs.c b/src/control/jobs/control_jobs.c index 9d8c7488ffcd..0679ffa335a5 100644 --- a/src/control/jobs/control_jobs.c +++ b/src/control/jobs/control_jobs.c @@ -2153,6 +2153,8 @@ void dt_control_move_images() _("select directory"), GTK_WINDOW(win), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_select as destination"), _("_cancel")); + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(filechooser), TRUE); + dt_conf_get_folder_to_file_chooser("ui_last/move_path", GTK_FILE_CHOOSER(filechooser)); if(gtk_native_dialog_run(GTK_NATIVE_DIALOG(filechooser)) == GTK_RESPONSE_ACCEPT) { @@ -2211,6 +2213,8 @@ void dt_control_copy_images() _("_select as destination"), _("_cancel")); + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(filechooser), TRUE); + dt_conf_get_folder_to_file_chooser("ui_last/copy_path", GTK_FILE_CHOOSER(filechooser)); if(gtk_native_dialog_run(GTK_NATIVE_DIALOG(filechooser)) == GTK_RESPONSE_ACCEPT) diff --git a/src/gui/accelerators.c b/src/gui/accelerators.c index b18bb3e9bf50..edd3cd4bd865 100644 --- a/src/gui/accelerators.c +++ b/src/gui/accelerators.c @@ -2682,6 +2682,7 @@ static void _export_clicked(GtkButton *button, gpointer user_data) _("select file to export"), GTK_WINDOW(win), GTK_FILE_CHOOSER_ACTION_SAVE, _("_export"), _("_cancel")); + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(chooser), TRUE); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(chooser), TRUE); dt_conf_get_folder_to_file_chooser("ui_last/export_path", GTK_FILE_CHOOSER(chooser)); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(chooser), "shortcutsrc"); diff --git a/src/gui/preferences.c b/src/gui/preferences.c index f058afcc9bd6..0a2896470a27 100644 --- a/src/gui/preferences.c +++ b/src/gui/preferences.c @@ -1267,6 +1267,8 @@ static void export_preset(GtkButton *button, _("select directory"), GTK_WINDOW(win), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_save"), _("_cancel")); + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(filechooser), TRUE); + dt_conf_get_folder_to_file_chooser("ui_last/export_path", GTK_FILE_CHOOSER(filechooser)); if(gtk_native_dialog_run(GTK_NATIVE_DIALOG(filechooser)) == GTK_RESPONSE_ACCEPT) diff --git a/src/gui/presets.c b/src/gui/presets.c index 75fea663f63a..3b083c939539 100644 --- a/src/gui/presets.c +++ b/src/gui/presets.c @@ -1,6 +1,6 @@ /* This file is part of darktable, - Copyright (C) 2010-2024 darktable developers. + Copyright (C) 2010-2025 darktable developers. darktable is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -423,6 +423,9 @@ static void _edit_preset_response(GtkDialog *dialog, GtkFileChooserNative *filechooser = gtk_file_chooser_native_new( _("select directory"), GTK_WINDOW(dialog), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_select as output destination"), _("_cancel")); + + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(filechooser), TRUE); + dt_conf_get_folder_to_file_chooser("ui_last/export_path", GTK_FILE_CHOOSER(filechooser)); diff --git a/src/imageio/storage/disk.c b/src/imageio/storage/disk.c index cf9cbb9c0ae5..8b3fe090ab2e 100644 --- a/src/imageio/storage/disk.c +++ b/src/imageio/storage/disk.c @@ -1,6 +1,6 @@ /* This file is part of darktable, - Copyright (C) 2010-2024 darktable developers. + Copyright (C) 2010-2025 darktable developers. darktable is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -197,6 +197,8 @@ static void button_clicked(GtkWidget *widget, _("select directory"), GTK_WINDOW(win), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_select as output destination"), _("_cancel")); + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(filechooser), TRUE); + gchar *old = g_strdup(gtk_entry_get_text(d->entry)); gchar *dirname; gchar *filename; diff --git a/src/imageio/storage/gallery.c b/src/imageio/storage/gallery.c index d003b617d074..9f0aafba93a7 100644 --- a/src/imageio/storage/gallery.c +++ b/src/imageio/storage/gallery.c @@ -1,6 +1,6 @@ /* This file is part of darktable, - Copyright (C) 2011-2024 darktable developers. + Copyright (C) 2011-2025 darktable developers. darktable is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -148,6 +148,8 @@ static void button_clicked(GtkWidget *widget, _("select directory"), GTK_WINDOW(win), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_select as output destination"), _("_cancel")); + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(filechooser), TRUE); + gchar *old = g_strdup(gtk_entry_get_text(d->entry)); char *c = g_strstr_len(old, -1, "$"); if(c) *c = '\0'; diff --git a/src/imageio/storage/latex.c b/src/imageio/storage/latex.c index 93b14e02d611..3198538b7f64 100644 --- a/src/imageio/storage/latex.c +++ b/src/imageio/storage/latex.c @@ -1,6 +1,6 @@ /* This file is part of darktable, - Copyright (C) 2012-2024 darktable developers. + Copyright (C) 2012-2025 darktable developers. darktable is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -144,6 +144,8 @@ static void button_clicked(GtkWidget *widget, dt_imageio_module_storage_t *self) _("select directory"), GTK_WINDOW(win), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_select as output destination"), _("_cancel")); + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(filechooser), TRUE); + gchar *old = g_strdup(gtk_entry_get_text(d->entry)); char *c = g_strstr_len(old, -1, "$"); if(c) *c = '\0'; diff --git a/src/libs/collect.c b/src/libs/collect.c index ef92831726ec..e131d1317bc5 100644 --- a/src/libs/collect.c +++ b/src/libs/collect.c @@ -432,6 +432,8 @@ static void view_popup_menu_onSearchFilmroll(GtkWidget *menuitem, GTK_WINDOW(win), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_open"), _("_cancel")); + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(filechooser), TRUE); + if(tree_path != NULL) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(filechooser), tree_path); else diff --git a/src/libs/import.c b/src/libs/import.c index 21704909fcd8..374f25cc0ab3 100644 --- a/src/libs/import.c +++ b/src/libs/import.c @@ -1,6 +1,6 @@ /* This file is part of darktable, - Copyright (C) 2011-2024 darktable developers. + Copyright (C) 2011-2025 darktable developers. darktable is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1862,6 +1862,8 @@ static void _lib_import_select_folder(GtkWidget *widget, _("select directory"), GTK_WINDOW(win), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_open"), _("_cancel")); + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(filechooser), TRUE); + // run the native dialog dt_conf_get_folder_to_file_chooser("ui_last/import_last_place", GTK_FILE_CHOOSER(filechooser)); @@ -1975,6 +1977,8 @@ static void _browse_basedir_clicked(GtkWidget *widget, _("select directory"), GTK_WINDOW(topwindow), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_open"), _("_cancel")); + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(filechooser), TRUE); + gchar *old = g_strdup(gtk_entry_get_text(basedir)); char *c = g_strstr_len(old, -1, "$"); if(c) *c = '\0'; diff --git a/src/libs/styles.c b/src/libs/styles.c index 71ff1d109e50..2ce4b30af471 100644 --- a/src/libs/styles.c +++ b/src/libs/styles.c @@ -1,6 +1,6 @@ /* This file is part of darktable, - Copyright (C) 2010-2024 darktable developers. + Copyright (C) 2010-2025 darktable developers. darktable is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -451,6 +451,8 @@ static void _export_clicked(GtkWidget *w, dt_lib_styles_t *d) _("select directory"), GTK_WINDOW(win), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_save"), _("_cancel")); + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(filechooser), TRUE); + dt_conf_get_folder_to_file_chooser("ui_last/export_path", GTK_FILE_CHOOSER(filechooser)); gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(filechooser), FALSE); diff --git a/src/libs/tagging.c b/src/libs/tagging.c index 07e70a8e7859..26ad27237560 100644 --- a/src/libs/tagging.c +++ b/src/libs/tagging.c @@ -1,6 +1,6 @@ /* This file is part of darktable, - Copyright (C) 2010-2024 darktable developers. + Copyright (C) 2010-2025 darktable developers. darktable is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2628,6 +2628,8 @@ static void _export_button_clicked(GtkButton *button, dt_lib_module_t *self) _("select file to export to"), GTK_WINDOW(win), GTK_FILE_CHOOSER_ACTION_SAVE, _("_export"), _("_cancel")); + gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(filechooser), TRUE); + gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(filechooser), TRUE); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(filechooser), last_dirname); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(filechooser), export_filename);