[gtk+] file chooser: Don't crawl recent://
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] file chooser: Don't crawl recent://
- Date: Thu, 30 Jul 2015 18:30:17 +0000 (UTC)
commit ec338b0ab6a17e901e08f7ca88f25f64b520f591
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jul 30 14:03:17 2015 -0400
file chooser: Don't crawl recent://
This is unnecessary - all the recent files are in the model already.
It also leads to duplicates, since our duplicate filtering is based
on g_file_equal, which does not consider recent:///blabla with
target-uri=/my/example to be the same as file:///my/example.
gtk/gtksearchenginesimple.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtksearchenginesimple.c b/gtk/gtksearchenginesimple.c
index 1b5a31b..b80af31 100644
--- a/gtk/gtksearchenginesimple.c
+++ b/gtk/gtksearchenginesimple.c
@@ -92,7 +92,8 @@ static void
queue_if_local (SearchThreadData *data,
GFile *file)
{
- if (!_gtk_file_consider_as_remote (file))
+ if (!_gtk_file_consider_as_remote (file) &&
+ !g_file_has_uri_scheme (file, "recent"))
g_queue_push_tail (data->directories, g_object_ref (file));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]