From 1e561035e2bc85942ae08005f4041709a15a9ce8 Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Tue, 19 Apr 2022 00:55:05 +0200 Subject: [PATCH] filechooser: Small fix for select folder mode When changing folders, we were making the select button insensitive when there is no folder selected. However, the select button should be usable to select the current folder. Fixes #4020 --- gtk/gtkfilechooserwidget.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index b365204d88..be084da421 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -2193,7 +2193,9 @@ update_default (GtkFileChooserWidget *impl) return; files = gtk_file_chooser_get_files (GTK_FILE_CHOOSER (impl)); - sensitive = (g_list_model_get_n_items (files) > 0 || impl->action == GTK_FILE_CHOOSER_ACTION_SAVE); + sensitive = (g_list_model_get_n_items (files) > 0 || + impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || + impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); gtk_widget_set_sensitive (button, sensitive); g_object_unref (files);