From 1d63335c8e51aee978521afdc77880a912b9f743 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 18 Jun 2015 15:18:30 -0400 Subject: Use infos from search engine instead of getting them again When the search engine provides hits with GFileInfo, use that to add the hits to the model directly, without going through another round of async get_info calls. To do this, we add a batched variant of the _gtk_file_system_model_update_file call that takes lists of GFiles and GFileInfos. Again, we can avoid repeated resorting that happens when the files are updated individually. --- gtk/gtkfilesystemmodel.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gtk/gtkfilesystemmodel.h') diff --git a/gtk/gtkfilesystemmodel.h b/gtk/gtkfilesystemmodel.h index 5a2c8b1eb3..b39be612ba 100644 --- a/gtk/gtkfilesystemmodel.h +++ b/gtk/gtkfilesystemmodel.h @@ -75,6 +75,9 @@ void _gtk_file_system_model_add_and_query_files (GtkFileSystemMod void _gtk_file_system_model_update_file (GtkFileSystemModel *model, GFile *file, GFileInfo *info); +void _gtk_file_system_model_update_files (GtkFileSystemModel *model, + GList *files, + GList *infos); void _gtk_file_system_model_set_show_hidden (GtkFileSystemModel *model, gboolean show_hidden); -- cgit v1.2.1