[gnome-documents] query: Also show Downloads/
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] query: Also show Downloads/
- Date: Thu, 15 Sep 2011 21:41:17 +0000 (UTC)
commit 36b06bf716e3edadf6900c7f43deb286b1af339e
Author: Colin Walters <walters verbum org>
Date: Thu Sep 15 08:36:16 2011 -0400
query: Also show Downloads/
Personally I have gotten lazy about moving stuff out of Downloads/, and
I doubt I'm alone. Don't force the user to wonder where their web browser
downloads go.
https://bugzilla.gnome.org/show_bug.cgi?id=659143
src/query.js | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/query.js b/src/query.js
index 15a4a79..1a0abf7 100644
--- a/src/query.js
+++ b/src/query.js
@@ -50,6 +50,7 @@ QueryBuilder.prototype = {
buildFilterLocal: function() {
let path;
let desktopURI;
+ let downloadsURI;
let documentsURI;
path = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DESKTOP);
@@ -64,9 +65,16 @@ QueryBuilder.prototype = {
else
documentsURI = '';
+ path = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DOWNLOAD);
+ if (path)
+ downloadsURI = Gio.file_new_for_path(path).get_uri();
+ else
+ downloadsURI = '';
+
let filter =
('((fn:starts-with (nie:url(?urn), "%s")) || ' +
- '(fn:starts-with (nie:url(?urn), "%s")))').format(desktopURI, documentsURI);
+ ' (fn:starts-with (nie:url(?urn), "%s")) || ' +
+ ' (fn:starts-with (nie:url(?urn), "%s")) )').format(desktopURI, documentsURI, downloadsURI);
return filter;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]