Merge branch 'wip/otte/for-5496' into 'main'

filedialog: Never set the chooser's file

Closes #5496

See merge request GNOME/gtk!5393
This commit is contained in:
Matthias Clasen 2023-01-06 13:34:55 +00:00
commit f76270167c

View File

@ -959,9 +959,7 @@ create_file_chooser (GtkFileDialog *self,
file_chooser_set_shortcut_folders (GTK_FILE_CHOOSER (chooser), self->shortcut_folders);
if (self->initial_folder)
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser), self->initial_folder, NULL);
if (self->initial_file)
gtk_file_chooser_set_file (GTK_FILE_CHOOSER (chooser), self->initial_file, NULL);
else if (self->initial_name)
if (self->initial_name && action == GTK_FILE_CHOOSER_ACTION_SAVE)
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (chooser), self->initial_name);
return chooser;