filechooser: Small fix for save mode

When changing folders, we were making the select
button insensitive when there's no files around.
That doesn't make sense in save mode when we don't
want to select a file but create one.

Fixes: #4851
This commit is contained in:
Matthias Clasen 2022-04-16 22:00:22 -04:00
parent da5bb6ff22
commit aa9cac695d

View File

@ -2193,7 +2193,7 @@ update_default (GtkFileChooserWidget *impl)
return;
files = gtk_file_chooser_get_files (GTK_FILE_CHOOSER (impl));
sensitive = (g_list_model_get_n_items (files) > 0);
sensitive = (g_list_model_get_n_items (files) > 0 || impl->action == GTK_FILE_CHOOSER_ACTION_SAVE);
gtk_widget_set_sensitive (button, sensitive);
g_object_unref (files);