diff options
author | Sam Thursfield <sam@afuera.me.uk> | 2020-05-02 16:46:28 +0200 |
---|---|---|
committer | Sam Thursfield <sam@afuera.me.uk> | 2020-09-02 17:28:38 +0200 |
commit | 7712c2c7e10b3c28b2cc2ec8dfeeb8a89bd57945 (patch) | |
tree | 750ca0505da110cc1d9d9cb166cccf0eeacc8aa7 /data | |
parent | ae2669dcf8695260c7f3385bec836b92bcb57f5c (diff) | |
download | nautilus-7712c2c7e10b3c28b2cc2ec8dfeeb8a89bd57945.tar.gz |
Port to Tracker 3
Mostly the port is straightforward, we connect to tracker-miner-fs
explicitly over D-Bus instead of the centralized tracker-store daemon
we connected to previously.
The search-engine-tracker test is now isolated from the user's real
Tracker index using the `tracker-sandbox` script provided by Tracker,
and it lets tracker-miner-fs index the test file rather than trying
to synthesize the expected database contents.
There are more changes in nautilus-tag-manager.c. Until now, starred
file information was stored in the tracker-miner-fs database. This has
some downsides, firstly the data is deleted if someone runs `tracker
reset --hard`, secondly it isn't possible to do this from inside a
Flatpak sandbox with Tracker 3.0. because the
This commit changes the NautilusTagManager to set up a private
database inside XDG_DATA_HOME/nautilus/tags. This stores the starred
file information. The database is managed with Tracker, which allows us
to continue using the rename-tracking that tracker-miner-fs provides.
The same limitations apply as before that only files in indexed
locations can be starred.
Diffstat (limited to 'data')
-rw-r--r-- | data/meson.build | 2 | ||||
-rw-r--r-- | data/ontology/meson.build | 8 | ||||
-rw-r--r-- | data/ontology/nautilus.description | 9 | ||||
-rw-r--r-- | data/ontology/nautilus.ontology | 19 |
4 files changed, 38 insertions, 0 deletions
diff --git a/data/meson.build b/data/meson.build index 7218b84e0..e51ed50b1 100644 --- a/data/meson.build +++ b/data/meson.build @@ -137,3 +137,5 @@ if appstream_util.found() ] ) endif + +subdir('ontology') diff --git a/data/ontology/meson.build b/data/ontology/meson.build new file mode 100644 index 000000000..cb80e86a1 --- /dev/null +++ b/data/ontology/meson.build @@ -0,0 +1,8 @@ +ontology_data = files( + 'nautilus.description', + 'nautilus.ontology', +) + +install_data(ontology_data, + install_dir: join_paths(datadir, 'nautilus', 'ontology') +) diff --git a/data/ontology/nautilus.description b/data/ontology/nautilus.description new file mode 100644 index 000000000..42f4102c3 --- /dev/null +++ b/data/ontology/nautilus.description @@ -0,0 +1,9 @@ +@prefix dsc: <http://tracker.api.gnome.org/ontology/v3/dsc#> . + +<virtual-ontology-uri:nautilus.ontology> a dsc:Ontology ; + dsc:title "Nautilus ontology" ; + dsc:description "Tracker database schema for Nautilus private data." ; + + dsc:localPrefix "nautilus" ; + dsc:baseUrl "https://gitlab.gnome.org/GNOME/nautilus#" ; + dsc:relativePath "./nautilus.ontology" ; diff --git a/data/ontology/nautilus.ontology b/data/ontology/nautilus.ontology new file mode 100644 index 000000000..ed56df447 --- /dev/null +++ b/data/ontology/nautilus.ontology @@ -0,0 +1,19 @@ +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . +@prefix nrl: <http://tracker.api.gnome.org/ontology/v3/nrl#> . +@prefix nautilus: <https://gitlab.gnome.org/GNOME/nautilus#> . + +nautilus: a nrl:Namespace, nrl:Ontology ; + nrl:prefix "nautilus" ; + nrl:lastModified "2020-05-01T10:00:00Z" . + +nautilus:FileReference a rdfs:Class ; + rdfs:comment "A unique ID for a file, corresponding with the nie:InformationElement created by tracker-miner-fs. We use a unique ID rather than the file URL so the star will follow renames." ; + rdfs:subClassOf rdfs:Resource . + +nautilus:starred a rdf:Property ; + rdfs:comment "Marks resources that are starred in Nautilus." ; + rdfs:domain nautilus:FileReference ; + rdfs:range xsd:boolean ; + nrl:maxCardinality 1 . |