[nautilus: 1/3] files-view: Ignore "sort-directories-first" for search results
- From: Gitlab Administrative User <gitlab src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus: 1/3] files-view: Ignore "sort-directories-first" for search results
- Date: Fri, 3 Nov 2017 16:17:30 +0000 (UTC)
commit eb1a956c262bcd77290def0fd5fd6b7d169a9d09
Author: António Fernandes <antoniojpfernandes gmail com>
Date: Sun Oct 22 11:15:38 2017 +0000
files-view: Ignore "sort-directories-first" for search results
Search results are sorted by search relevance, which, among other
parameters, ranks results from the current directory above results from
subdirectories.
However, if sort-directories-first gsetting is TRUE, a directory found
deeper in the hierarchy may be ranked above a file from the current
directory. Also, as more directories are found, files keep moving down.
Therefore, we should not sort directories first when searching.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=699629
src/nautilus-files-view.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index a18cdeb88..c68a0307e 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -2689,10 +2689,12 @@ gboolean
nautilus_files_view_should_sort_directories_first (NautilusFilesView *view)
{
NautilusFilesViewPrivate *priv;
+ gboolean is_search;
priv = nautilus_files_view_get_instance_private (view);
+ is_search = nautilus_view_is_searching (NAUTILUS_VIEW (view));
- return priv->sort_directories_first;
+ return priv->sort_directories_first && !is_search;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]