summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserwidget.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-03-10 16:37:41 +0000
committerMatthias Clasen <mclasen@redhat.com>2023-03-10 16:37:41 +0000
commit5f2421812308c4b5555c8ad830bd5ce356196c49 (patch)
treee3cbf09643a3f397e1b78548c19507595112df1c /gtk/gtkfilechooserwidget.c
parentfeebd68dd37ae03efab71855eae2993adfde12b0 (diff)
parent310662516b44d9abf3605d9521d2e8cafca23d9e (diff)
downloadgtk+-5f2421812308c4b5555c8ad830bd5ce356196c49.tar.gz
Merge branch 'file-chooser-selectability2' into 'main'
file system model: Store selectability See merge request GNOME/gtk!5582
Diffstat (limited to 'gtk/gtkfilechooserwidget.c')
-rw-r--r--gtk/gtkfilechooserwidget.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index a47a0ea541..933d0cee45 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -3981,10 +3981,10 @@ set_list_model (GtkFileChooserWidget *impl,
set_busy_cursor (impl, TRUE);
impl->browse_files_model =
- _gtk_file_system_model_new_for_directory (impl->current_folder,
- MODEL_ATTRIBUTES);
+ _gtk_file_system_model_new_for_directory (impl->current_folder, MODEL_ATTRIBUTES);
_gtk_file_system_model_set_show_hidden (impl->browse_files_model, impl->show_hidden);
+ _gtk_file_system_model_set_can_select_files (impl->browse_files_model, impl->action != GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
load_setup_timer (impl); /* This changes the state to LOAD_PRELOAD */
@@ -5820,6 +5820,8 @@ search_setup_model (GtkFileChooserWidget *impl)
impl->search_model = _gtk_file_system_model_new ();
+ _gtk_file_system_model_set_can_select_files (impl->search_model, impl->action != GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
+
set_current_model (impl, G_LIST_MODEL (impl->search_model));
update_columns (impl, TRUE, _("Modified"));
}
@@ -5986,6 +5988,7 @@ recent_start_loading (GtkFileChooserWidget *impl)
impl->recent_model = _gtk_file_system_model_new ();
_gtk_file_system_model_set_filter (impl->recent_model, impl->current_filter);
+ _gtk_file_system_model_set_can_select_files (impl->recent_model, impl->action != GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
if (!impl->recent_manager)
return;