[gnome-documents] query: Display collections in "collection dialog"
- From: Pranav Kant <pranavk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] query: Display collections in "collection dialog"
- Date: Wed, 27 May 2015 12:26:25 +0000 (UTC)
commit 5e9d776ae276cb660104bb19d8d4743c5f2f6747
Author: Alessandro Bono <shadow openaliasbox org>
Date: Tue May 26 14:28:20 2015 +0200
query: Display collections in "collection dialog"
Fallout from 17322bb4b627ebfef0b8c36ba22d390d0910faa6
https://bugzilla.gnome.org/show_bug.cgi?id=749900
src/query.js | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/src/query.js b/src/query.js
index 6543152..48b89f7 100644
--- a/src/query.js
+++ b/src/query.js
@@ -48,8 +48,7 @@ const QueryFlags = {
SEARCH: 1 << 3
};
-const LOCAL_DOCUMENTS_COLLECTIONS_IDENTIFIER = 'gd:collection:local:';
-const LOCAL_BOOKS_COLLECTIONS_IDENTIFIER = 'gb:collection:local:';
+const LOCAL_COLLECTIONS_IDENTIFIER = 'gd:collection:local:';
const QueryBuilder = new Lang.Class({
Name: 'QueryBuilder',
@@ -220,17 +219,11 @@ const QueryBuilder = new Lang.Class({
},
buildCreateCollectionQuery: function(name) {
- let application = Gio.Application.get_default();
- let collectionsIdentifier;
- if (!application.isBooks)
- collectionsIdentifier = LOCAL_DOCUMENTS_COLLECTIONS_IDENTIFIER;
- else
- collectionsIdentifier = LOCAL_BOOKS_COLLECTIONS_IDENTIFIER;
let time = GdPrivate.iso8601_from_timestamp(GLib.get_real_time() / GLib.USEC_PER_SEC);
let sparql = ('INSERT { _:res a nfo:DataContainer ; a nie:DataObject ; ' +
'nie:contentLastModified \"' + time + '\" ; ' +
'nie:title \"' + name + '\" ; ' +
- 'nao:identifier \"' + collectionsIdentifier + name + '\" }');
+ 'nao:identifier \"' + LOCAL_COLLECTIONS_IDENTIFIER + name + '\" }');
return this._createQuery(sparql);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]