[nautilus/gnome-3-18] files-view: display search files while searching
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-18] files-view: display search files while searching
- Date: Fri, 22 Jan 2016 14:26:43 +0000 (UTC)
commit ea6e01e1c6d9f75e6dacc5c7a7186d2698291bd5
Author: Carlos Soriano <csoriano gnome org>
Date: Fri Jan 22 15:06:10 2016 +0100
files-view: display search files while searching
The view doesn't display files while it's loading, and that's
mostly fine and what we want to avoid jumping while seeing new
files.
However, the when searching, it's expected to not all files be there,
and the first ones reported by the search system have a higher score
to appear, so that means it's fine if the user doesn't see files with
low score while files with high score are presented.
On the other hand, is not fine to wait until the search system
stops to show all the files that were found.
So for search we want to show files while they are being loaded, that
means the directory doesn't have the all_files_seen flag set.
Previously, we were solving this issue setting the all_files_seen
flag in the search directory so the view will show them when hits
are added. However, that also means the view thinks the loading is
complete, removing the floating bar and any hint that it was loading.
So what we actually want is special case the search, and show the files
while they are being found.
The previous patch reverted the change to mark the search directory
as all_files_seen to be consistent. This patch makes the view display
files while they are being found.
src/nautilus-files-view.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 63712ed..d151228 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -3747,8 +3747,14 @@ queue_pending_files (NautilusFilesView *view,
*pending_list = g_list_concat (file_and_directory_list_from_files (directory, files),
*pending_list);
-
- if (! view->details->loading || nautilus_directory_are_all_files_seen (directory)) {
+ /* Generally we don't want to show the files while the directory is loading
+ * the files themselves, so we avoid jumping and oddities. However, for
+ * search it can be a long wait, and we actually want to show files as
+ * they are getting found. So for search is fine if not all files are
+ * seen */
+ if (!view->details->loading ||
+ (nautilus_directory_are_all_files_seen (directory) ||
+ nautilus_view_is_searching (NAUTILUS_VIEW (view)))) {
schedule_timeout_display_of_pending_files (view, view->details->update_interval);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]