Merge branch 'filechooser-save-sensitive' into 'main'

filechooser: Small fix for save mode

Closes #4851

See merge request GNOME/gtk!4644
This commit is contained in:
Matthias Clasen 2022-04-17 03:31:39 +00:00
commit b927ad2c87

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);