mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 06:10:21 +00:00
filedialog: Never set the chooser's file
Instead, get by with setting the name and hope the filechooser figures things out by itself. Fixes #5496
This commit is contained in:
parent
9b1bee99b8
commit
446e6a8d62
@ -959,9 +959,7 @@ create_file_chooser (GtkFileDialog *self,
|
|||||||
file_chooser_set_shortcut_folders (GTK_FILE_CHOOSER (chooser), self->shortcut_folders);
|
file_chooser_set_shortcut_folders (GTK_FILE_CHOOSER (chooser), self->shortcut_folders);
|
||||||
if (self->initial_folder)
|
if (self->initial_folder)
|
||||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser), self->initial_folder, NULL);
|
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (chooser), self->initial_folder, NULL);
|
||||||
if (self->initial_file)
|
if (self->initial_name && action == GTK_FILE_CHOOSER_ACTION_SAVE)
|
||||||
gtk_file_chooser_set_file (GTK_FILE_CHOOSER (chooser), self->initial_file, NULL);
|
|
||||||
else if (self->initial_name)
|
|
||||||
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (chooser), self->initial_name);
|
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (chooser), self->initial_name);
|
||||||
|
|
||||||
return chooser;
|
return chooser;
|
||||||
|
Loading…
Reference in New Issue
Block a user