aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-09-28 18:07:14 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-09-29 10:33:08 +0200
commitd83cebbe1045885265996a5d652f377e1baaa806 (patch)
treebbe759b180d66bd2a1166f73186cc335460492de
parent44c6c40e5a626bc5d3e8944fc8425f287072a5f5 (diff)
downloadaports-d83cebbe1045885265996a5d652f377e1baaa806.tar.gz
aports-d83cebbe1045885265996a5d652f377e1baaa806.tar.bz2
aports-d83cebbe1045885265996a5d652f377e1baaa806.tar.xz
community/gnome-photos: upgrade to 3.38.0
-rw-r--r--community/gnome-photos/APKBUILD10
-rw-r--r--community/gnome-photos/tracker3.patch405
2 files changed, 156 insertions, 259 deletions
diff --git a/community/gnome-photos/APKBUILD b/community/gnome-photos/APKBUILD
index dc737bb535..def52c6c18 100644
--- a/community/gnome-photos/APKBUILD
+++ b/community/gnome-photos/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-photos
-pkgver=3.37.91.1
-pkgrel=1
+pkgver=3.38.0
+pkgrel=0
pkgdesc="Access, organize and share your photos on GNOME"
url="https://wiki.gnome.org/Apps/Photos"
arch="all !s390x !mips !mips64" # Limited by gegl-dev
@@ -13,7 +13,7 @@ makedepends="meson babl-dev cairo-dev gtk+3.0-dev gexiv2-dev glib-dev
libdazzle-dev libgdata-dev libjpeg-turbo-dev libpng-dev tracker-dev
dbus-dev gegl-dev geocode-glib-dev gfbgraph-dev itstool"
subpackages="$pkgname-lang $pkgname-doc"
-source="https://download.gnome.org/sources/gnome-photos/${pkgver%.*.*}/gnome-photos-$pkgver.tar.xz
+source="https://download.gnome.org/sources/gnome-photos/${pkgver%.*}/gnome-photos-$pkgver.tar.xz
tracker3.patch"
build() {
@@ -31,5 +31,5 @@ package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
}
-sha512sums="679562ad5eedc2fbea73fcab8047accc5516b38d88040d5cc9063ba0cadcba50cbb0287952c59394748620f5ec18740c16f3cfe0ea6545e369c6fd911fa91991 gnome-photos-3.37.91.1.tar.xz
-c83dcef4603694bbbf01372187b8e41ee40749097c12a8f13e2e3a512b1038a43377f23fbe71676159277bf0a845094a06d0ddf00b9c2e9741f6590a0630f00c tracker3.patch"
+sha512sums="0f838040b801b4f9af2cf72d8c9286f68ff6547e4392bb485b5e268d74e511692b04ab6e4b09406c593b29f4b9293c5a989a1ebbd2a182a69d3c8b5d3573f792 gnome-photos-3.38.0.tar.xz
+5b3424bc2c784bad89c839fc9bf737c02d8606d582e4a3523f932133e1a4b35364d1f5d1045ac67e6e5680fa057bb8d216eb79184616bfcff20af34ac83ce291 tracker3.patch"
diff --git a/community/gnome-photos/tracker3.patch b/community/gnome-photos/tracker3.patch
index 406dca30fd..41a8d09908 100644
--- a/community/gnome-photos/tracker3.patch
+++ b/community/gnome-photos/tracker3.patch
@@ -1,45 +1,7 @@
-From b4a8de1ef79c94c1c11b730787108f305c962e38 Mon Sep 17 00:00:00 2001
-From: Sam Thursfield <sam@afuera.me.uk>
-Date: Wed, 26 Aug 2020 01:57:46 +0200
-Subject: [PATCH 1/4] photos-tracker-controller: Label unit of timing
- measurements
-
-Otherwise, it's not clear if these are timings or some kind of ID
-number.
----
- src/photos-tracker-controller.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/photos-tracker-controller.c b/src/photos-tracker-controller.c
-index a02db077..3a62cf2d 100644
---- a/src/photos-tracker-controller.c
-+++ b/src/photos-tracker-controller.c
-@@ -237,7 +237,7 @@ photos_tracker_controller_cursor_next (GObject *source_object, GAsyncResult *res
- }
-
- now = g_get_monotonic_time ();
-- photos_debug (PHOTOS_DEBUG_TRACKER, "Query Cursor: %" G_GINT64_FORMAT, (now - priv->last_query_time) / 1000000);
-+ photos_debug (PHOTOS_DEBUG_TRACKER, "Query Cursor: %" G_GINT64_FORMAT " seconds", (now - priv->last_query_time) / 1000000);
-
- photos_item_manager_add_item_for_mode (PHOTOS_ITEM_MANAGER (priv->item_mngr),
- PHOTOS_TRACKER_CONTROLLER_GET_CLASS (self)->base_item_type,
-@@ -346,7 +346,7 @@ photos_tracker_controller_set_query_status (PhotosTrackerController *self, gbool
- else
- {
- photos_debug (PHOTOS_DEBUG_TRACKER,
-- "Query Elapsed: %" G_GINT64_FORMAT,
-+ "Query Elapsed: %" G_GINT64_FORMAT " seconds",
- (now - priv->last_query_time) / 1000000);
- priv->last_query_time = 0;
- }
---
-GitLab
-
-
-From 7c98a884ba6a26795ea25a8780002ac101036887 Mon Sep 17 00:00:00 2001
+From f39a85bb1a82093f4ba615494ff7e95609674fc2 Mon Sep 17 00:00:00 2001
From: Sam Thursfield <sam@afuera.me.uk>
Date: Wed, 27 May 2020 13:07:58 +0200
-Subject: [PATCH 2/4] Fix build failure due to undefined M_PI constant
+Subject: [PATCH 1/3] Fix build failure due to undefined M_PI constant
The <math.h> header needs to be included.
@@ -49,10 +11,10 @@ Previously I suppose libtracker-sparql.h pulled this in.
1 file changed, 1 insertion(+)
diff --git a/src/photos-utils.c b/src/photos-utils.c
-index 401f52ba..c638297b 100644
+index 1d7be577..d659b47d 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
-@@ -30,6 +30,7 @@
+@@ -32,6 +32,7 @@
#include <glib.h>
#include <tracker-sparql.h>
#include <libgd/gd.h>
@@ -64,10 +26,10 @@ index 401f52ba..c638297b 100644
GitLab
-From 0e4bd7bbc8056743a8ea07ab3713ad543c00d478 Mon Sep 17 00:00:00 2001
+From 3d847ff80d429cadf0bc59aa50caa37bf27c0201 Mon Sep 17 00:00:00 2001
From: Sam Thursfield <sam@afuera.me.uk>
Date: Sun, 7 Jun 2020 21:53:20 +0200
-Subject: [PATCH 3/4] Generate queries using SPARQL templates
+Subject: [PATCH 2/3] Generate queries using SPARQL templates
The code to generate SPARQL queries was split across many different
source files, making it difficult to make big changes. Now the
@@ -1152,10 +1114,10 @@ index 00000000..4eb10b74
GitLab
-From d61d440efe340bda4e195d640066fb29220d0cb5 Mon Sep 17 00:00:00 2001
+From 2eb923726147b05c936dee64b205d833525db1df Mon Sep 17 00:00:00 2001
From: Sam Thursfield <sam@afuera.me.uk>
Date: Sat, 23 May 2020 13:36:25 +0200
-Subject: [PATCH 4/4] Port to Tracker 3
+Subject: [PATCH 3/3] Port to Tracker 3
Notable changes:
@@ -1178,13 +1140,13 @@ Closes https://gitlab.gnome.org/GNOME/gnome-photos/-/issues/152
...e.Photos.Tracker3.Miner.Extract.service.in | 7 +
...ome.Photos.Tracker3.Miner.Files.service.in | 7 +
data/tracker/org.gnome.Photos.domain.rule.in | 20 +
- flatpak/org.gnome.Photos.json | 55 +-
+ flatpak/org.gnome.Photos.json | 49 +-
meson.build | 3 +-
src/meson.build | 19 +-
...freedesktop.Tracker3.Miner.Files.Index.xml | 11 +
src/org.freedesktop.Tracker3.Miner.xml | 56 +++
- src/photos-application.c | 184 +++----
- src/photos-base-item.c | 18 +-
+ src/photos-application.c | 176 ++-----
+ src/photos-base-item.c | 10 +
src/photos-indexing-notification.c | 53 +-
src/photos-item-manager.c | 69 +--
src/photos-quarks.c | 20 +-
@@ -1209,7 +1171,7 @@ Closes https://gitlab.gnome.org/GNOME/gnome-photos/-/issues/152
src/queries/collections.sparql.template | 20 +-
src/queries/favorite-photos.sparql.template | 20 +-
src/queries/photos.sparql.template | 22 +-
- 36 files changed, 754 insertions(+), 1146 deletions(-)
+ 36 files changed, 736 insertions(+), 1142 deletions(-)
create mode 100644 data/tracker/meson.build
create mode 100644 data/tracker/org.gnome.Photos.Tracker3.Miner.Extract.service.in
create mode 100644 data/tracker/org.gnome.Photos.Tracker3.Miner.Files.service.in
@@ -1223,10 +1185,10 @@ Closes https://gitlab.gnome.org/GNOME/gnome-photos/-/issues/152
delete mode 100644 src/photos-tracker-resources.xml
diff --git a/data/meson.build b/data/meson.build
-index 7898b0cc..f0d85d4b 100644
+index f51a4511..9b528c96 100644
--- a/data/meson.build
+++ b/data/meson.build
-@@ -54,3 +54,5 @@ install_data(
+@@ -83,3 +83,5 @@ install_data(
photos_namespace.to_lower() + '.gschema.xml',
install_dir: join_paths(photos_datadir, 'glib-2.0', 'schemas'),
)
@@ -1324,7 +1286,7 @@ index 00000000..8f5fc4a1
+# List of miners we expect to run in this domain.
+Miners=Miner.Files;Miner.Extract
diff --git a/flatpak/org.gnome.Photos.json b/flatpak/org.gnome.Photos.json
-index 5d16689c..adfdaf34 100644
+index 4d3ac2a8..adfdaf34 100644
--- a/flatpak/org.gnome.Photos.json
+++ b/flatpak/org.gnome.Photos.json
@@ -7,7 +7,7 @@
@@ -1347,14 +1309,14 @@ index 5d16689c..adfdaf34 100644
"--talk-name=com.intel.dleyna-renderer",
"--talk-name=org.gnome.ControlCenter",
"--talk-name=org.gnome.SettingsDaemon",
-@@ -248,56 +248,22 @@
+@@ -248,50 +248,22 @@
}
]
},
- {
- "name": "tracker",
- "buildsystem": "meson",
-- "cleanup": [ "/bin", "/etc", "/lib/girepository-1.0", "/libexec", "/share/dbus-1", "/share/gir-1.0" ],
+- "cleanup": [ "/bin", "/etc", "/lib/girepository-1.0", "/share/dbus-1", "/share/gir-1.0" ],
- "config-opts": [ "-Dbash_completion=no", "-Ddocs=false", "-Dsystemd_user_services=no" ],
- "sources": [
- {
@@ -1379,19 +1341,13 @@ index 5d16689c..adfdaf34 100644
"name": "tracker-miners",
"buildsystem": "meson",
- "cleanup": [ "/etc",
-- "/lib",
-- "/libexec",
- "/share/dbus-1/services/org.freedesktop.Tracker1.Miner.Extract.service",
- "/share/dbus-1/services/org.freedesktop.Tracker1.Writeback.service",
- "/share/tracker/miners/org.freedesktop.Tracker1.Miner.Applications.service",
- "/share/tracker/miners/org.freedesktop.Tracker1.Miner.Extract.service",
- "/share/tracker/miners/org.freedesktop.Tracker1.Miner.RSS.service",
-- "/share/tracker-miners",
-- "/share/glib-2.0/schemas/org.freedesktop.Tracker.Extract.gschema.xml",
- "/share/glib-2.0/schemas/org.freedesktop.Tracker.Writeback.gschema.xml" ],
-- "config-opts": [ "-Dextract=false",
-- "-Dgeneric_media_extractor=none",
-- "-Dminer_apps=false",
+- "config-opts": [ "-Dextract=true",
+ "cleanup": [ "/share/dbus-1/services/org.freedesktop.Tracker3.Miner.Extract.service",
+ "/share/dbus-1/services/org.freedesktop.Tracker3.Miner.Files.service",
+ "/share/dbus-1/services/org.freedesktop.Tracker3.Writeback.service" ],
@@ -1410,7 +1366,7 @@ index 5d16689c..adfdaf34 100644
}
]
},
-@@ -309,7 +275,8 @@
+@@ -303,7 +275,8 @@
{
"type": "git",
"url": "https://gitlab.gnome.org/GNOME/gnome-photos.git",
@@ -1421,10 +1377,10 @@ index 5d16689c..adfdaf34 100644
]
}
diff --git a/meson.build b/meson.build
-index 70816d24..1c6f2906 100644
+index 0d0ed1a2..2a3f214a 100644
--- a/meson.build
+++ b/meson.build
-@@ -172,8 +172,7 @@ libgdata_dep = dependency('libgdata', version: '>= 0.17.10')
+@@ -172,8 +172,7 @@ libgdata_dep = dependency('libgdata', version: '>= 0.17.13')
libgfgraph_dep = dependency('libgfbgraph-0.2', version: '>= 0.2.1')
libjpeg_dep = dependency('libjpeg')
libpng_dep = dependency('libpng16')
@@ -1433,7 +1389,7 @@ index 70816d24..1c6f2906 100644
+tracker_sparql_dep = dependency('tracker-sparql-3.0')
dbus_dep = dependency('dbus-1')
- dbus_service_dir = dbus_dep.get_pkgconfig_variable(
+ dbus_services_dir = dbus_dep.get_pkgconfig_variable(
diff --git a/src/meson.build b/src/meson.build
index b5b2759c..6b3b7f01 100644
--- a/src/meson.build
@@ -1564,7 +1520,7 @@ index 00000000..6fe09c84
+ </interface>
+</node>
diff --git a/src/photos-application.c b/src/photos-application.c
-index cb114fda..5fbbbef2 100644
+index f7b4b56e..7d6758cd 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -36,7 +36,6 @@
@@ -1585,16 +1541,17 @@ index cb114fda..5fbbbef2 100644
#include "photos-utils.h"
-@@ -127,7 +127,7 @@ struct _PhotosApplication
+@@ -127,8 +127,7 @@ struct _PhotosApplication
PhotosSearchProvider *search_provider;
PhotosSelectionController *sel_cntrlr;
PhotosThumbnailFactory *factory;
+- TrackerMinerManager *miner_manager;
- TrackerExtractPriority *extract_priority;
+ TrackerMinerFilesIndex *miner_control_proxy;
gboolean empty_results;
gboolean main_window_deleted;
guint create_miners_count;
-@@ -148,7 +148,6 @@ static guint signals[LAST_SIGNAL] = { 0 };
+@@ -149,7 +148,6 @@ static guint signals[LAST_SIGNAL] = { 0 };
static void photos_application_search_context_iface_init (PhotosSearchContextInterface *iface);
@@ -1602,48 +1559,15 @@ index cb114fda..5fbbbef2 100644
G_DEFINE_TYPE_WITH_CODE (PhotosApplication, photos_application, GTK_TYPE_APPLICATION,
G_IMPLEMENT_INTERFACE (PHOTOS_TYPE_SEARCH_CONTEXT,
photos_application_search_context_iface_init));
-@@ -191,11 +190,11 @@ struct _PhotosApplicationCreateData
- struct _PhotosApplicationImportData
- {
- PhotosApplication *application;
-+ TrackerMinerFilesIndex *miner_control_proxy;
- GFile *destination;
- GFile *import_sub_dir;
- GList *files;
- PhotosBaseItem *collection;
-- TrackerMinerManager *manager;
- gchar *collection_urn;
- gint64 ctime_latest;
- };
-@@ -248,7 +247,7 @@ photos_application_create_data_free (PhotosApplicationCreateData *data)
-
- static PhotosApplicationImportData *
- photos_application_import_data_new (PhotosApplication *application,
-- TrackerMinerManager *manager,
-+ TrackerMinerFilesIndex *miner_control_proxy,
- GList *files,
- gint64 ctime_latest)
- {
-@@ -257,7 +256,7 @@ photos_application_import_data_new (PhotosApplication *application,
- data = g_slice_new0 (PhotosApplicationImportData);
- g_application_hold (G_APPLICATION (application));
- data->application = application;
-- data->manager = g_object_ref (manager);
-+ data->miner_control_proxy = miner_control_proxy;
- data->files = g_list_copy_deep (files, (GCopyFunc) g_object_ref, NULL);
- data->ctime_latest = ctime_latest;
- return data;
-@@ -277,8 +276,8 @@ photos_application_import_data_free (PhotosApplicationImportData *data)
-
- g_clear_object (&data->destination);
- g_clear_object (&data->import_sub_dir);
-+ g_clear_object (&data->miner_control_proxy);
- g_list_free_full (data->files, g_object_unref);
-- g_clear_object (&data->manager);
- g_free (data->collection_urn);
- g_slice_free (PhotosApplicationImportData, data);
- }
-@@ -584,27 +583,6 @@ photos_application_actions_update (PhotosApplication *self)
+@@ -174,7 +172,6 @@ static const gchar *DESKTOP_KEY_PICTURE_OPTIONS = "picture-options";
+ static const gchar *DESKTOP_KEY_COLOR_SHADING_TYPE = "color-shading-type";
+ static const gchar *DESKTOP_KEY_PRIMARY_COLOR = "primary-color";
+ static const gchar *DESKTOP_KEY_SECONDARY_COLOR = "secondary-color";
+-static const gchar *MINER_FILES = "org.gnome.Photos.Tracker1.Miner.Files";
+
+ typedef struct _PhotosApplicationCreateData PhotosApplicationCreateData;
+ typedef struct _PhotosApplicationImportData PhotosApplicationImportData;
+@@ -582,27 +579,6 @@ photos_application_actions_update (PhotosApplication *self)
}
@@ -1671,7 +1595,7 @@ index cb114fda..5fbbbef2 100644
static gboolean
photos_application_delete_event (PhotosApplication *self)
{
-@@ -641,16 +619,6 @@ photos_application_destroy (PhotosApplication *self)
+@@ -639,16 +615,6 @@ photos_application_destroy (PhotosApplication *self)
self->create_window_cancellable = g_cancellable_new ();
photos_application_stop_miners (self);
@@ -1688,28 +1612,38 @@ index cb114fda..5fbbbef2 100644
}
-@@ -740,60 +708,6 @@ photos_application_gegl_init_fishes_idle (gpointer user_data)
+@@ -738,57 +704,34 @@ photos_application_gegl_init_fishes_idle (gpointer user_data)
}
-static void
-photos_application_tracker_set_rdf_types (GObject *source_object, GAsyncResult *res, gpointer user_data)
--{
++static TrackerMinerFilesIndex *
++photos_application_get_miner_fs_control_proxy (GCancellable *cancellable)
+ {
- PhotosApplication *self = PHOTOS_APPLICATION (user_data);
- TrackerExtractPriority *extract_priority = TRACKER_EXTRACT_PRIORITY (source_object);
-
- {
- g_autoptr (GError) error = NULL;
--
++ g_autoptr (PhotosTrackerQueue) tracker_queue = NULL;
++ const gchar *miner_fs_control_busname;
++ g_autoptr (GError) error = NULL;
++ TrackerMinerFilesIndex *miner_control_proxy;
+
- if (!tracker_extract_priority_call_set_rdf_types_finish (extract_priority, res, &error))
- {
- if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
- g_warning ("Unable to call SetRdfTypes: %s", error->message);
--
++ tracker_queue = photos_tracker_queue_dup_singleton (cancellable, &error);
+
- goto out;
- }
-- }
--
++ if (!tracker_queue) {
++ g_warning ("Error getting Tracker queue: %s. Import will not work.", error->message);
++ return NULL;
+ }
+
- out:
- g_application_release (G_APPLICATION (self));
-}
@@ -1732,8 +1666,18 @@ index cb114fda..5fbbbef2 100644
-
- goto out;
- }
-- }
--
++ miner_fs_control_busname = photos_tracker_queue_get_miner_fs_control_busname (tracker_queue);
++ miner_control_proxy = tracker_miner_files_index_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
++ G_DBUS_PROXY_FLAGS_NONE,
++ miner_fs_control_busname,
++ "/org/freedesktop/Tracker3/Miner/Files/Control",
++ NULL,
++ &error);
++ if (!miner_control_proxy) {
++ g_warning ("Error getting Tracker Miner FS control proxy: %s. Import will not work", error->message);
++ return NULL;
+ }
+
- g_application_hold (G_APPLICATION (self));
- tracker_extract_priority_call_set_rdf_types (self->extract_priority,
- rdf_types,
@@ -1743,27 +1687,29 @@ index cb114fda..5fbbbef2 100644
-
- out:
- g_application_release (G_APPLICATION (self));
--}
--
--
- static gboolean
- photos_application_create_window (PhotosApplication *self)
- {
-@@ -828,13 +742,6 @@ photos_application_create_window (PhotosApplication *self)
++ return miner_control_proxy;
+ }
+
+
+@@ -826,15 +769,10 @@ photos_application_create_window (PhotosApplication *self)
self->init_fishes_id = g_idle_add (photos_application_gegl_init_fishes_idle, self);
g_application_hold (G_APPLICATION (self));
- tracker_extract_priority_proxy_new_for_bus (G_BUS_TYPE_SESSION,
- G_DBUS_PROXY_FLAGS_NONE,
-- "org.freedesktop.Tracker1.Miner.Extract",
+- "org.gnome.Photos.Tracker1.Miner.Extract",
- "/org/freedesktop/Tracker1/Extract/Priority",
- self->create_window_cancellable,
- photos_application_tracker_extract_priority,
- self);
photos_application_start_miners (self);
++
++ self->miner_control_proxy = photos_application_get_miner_fs_control_proxy (NULL);
return TRUE;
-@@ -1113,18 +1020,18 @@ photos_application_get_state (PhotosSearchContext *context)
+ }
+
+@@ -1111,18 +1049,18 @@ photos_application_get_state (PhotosSearchContext *context)
static void
@@ -1785,15 +1731,7 @@ index cb114fda..5fbbbef2 100644
{
g_autofree gchar *uri = NULL;
-@@ -1323,7 +1230,6 @@ photos_application_import_file_copy (GObject *source_object, GAsyncResult *res,
- PhotosApplication *self = data->application;
- g_autoptr (GFile) destination = NULL;
- GFile *source = G_FILE (source_object);
-- TrackerMinerManager *manager = data->manager;
-
- {
- g_autoptr (GError) error = NULL;
-@@ -1348,6 +1254,8 @@ photos_application_import_file_copy (GObject *source_object, GAsyncResult *res,
+@@ -1345,6 +1283,8 @@ photos_application_import_file_copy (GObject *source_object, GAsyncResult *res,
else
{
g_autofree gchar *destination_uri = NULL;
@@ -1802,11 +1740,11 @@ index cb114fda..5fbbbef2 100644
g_assert_true (G_IS_FILE (destination));
g_set_object (&data->destination, destination);
-@@ -1364,11 +1272,13 @@ photos_application_import_file_copy (GObject *source_object, GAsyncResult *res,
+@@ -1361,11 +1301,13 @@ photos_application_import_file_copy (GObject *source_object, GAsyncResult *res,
g_application_hold (G_APPLICATION (self));
g_application_mark_busy (G_APPLICATION (self));
-- tracker_miner_manager_index_file_for_process_async (manager,
+- tracker_miner_manager_index_file_for_process_async (self->miner_manager,
- destination,
- NULL,
- photos_application_import_index_file,
@@ -1821,93 +1759,64 @@ index cb114fda..5fbbbef2 100644
}
out:
-@@ -1509,6 +1419,37 @@ photos_application_import_response (GtkDialog *dialog, gint response_id, gpointe
- }
-
-
-+static TrackerMinerFilesIndex *
-+photos_application_get_miner_fs_control_proxy (GCancellable *cancellable)
-+{
-+ g_autoptr (PhotosTrackerQueue) tracker_queue = NULL;
-+ const gchar *miner_fs_control_busname;
-+ g_autoptr (GError) error = NULL;
-+ TrackerMinerFilesIndex *miner_control_proxy;
-+
-+ tracker_queue = photos_tracker_queue_dup_singleton (cancellable, &error);
-+
-+ if (!tracker_queue) {
-+ g_warning ("Error getting Tracker queue: %s. Import will not work.", error->message);
-+ return NULL;
-+ }
-+
-+ miner_fs_control_busname = photos_tracker_queue_get_miner_fs_control_busname (tracker_queue);
-+ miner_control_proxy = tracker_miner_files_index_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
-+ G_DBUS_PROXY_FLAGS_NONE,
-+ miner_fs_control_busname,
-+ "/org/freedesktop/Tracker3/Miner/Files/Control",
-+ NULL,
-+ &error);
-+ if (!miner_control_proxy) {
-+ g_warning ("Error getting Tracker Miner FS control proxy: %s. Import will not work", error->message);
-+ return NULL;
-+ }
-+
-+ return miner_control_proxy;
-+}
-+
-+
- static void
- photos_application_import (PhotosApplication *self)
- {
-@@ -1519,8 +1460,8 @@ photos_application_import (PhotosApplication *self)
- GtkWidget *dialog;
- g_autoptr (PhotosApplicationImportData) data = NULL;
- PhotosSource *source;
-- TrackerMinerManager *manager = NULL; /* TODO: use g_autoptr */
- gint64 ctime_latest = -1;
-+ TrackerMinerFilesIndex *miner_control_proxy;
-
- source = PHOTOS_SOURCE (photos_base_manager_get_active_object (self->state->src_mngr));
- g_return_if_fail (PHOTOS_IS_SOURCE (source));
-@@ -1533,17 +1474,9 @@ photos_application_import (PhotosApplication *self)
+@@ -1529,9 +1471,9 @@ photos_application_import (PhotosApplication *self)
selection = photos_selection_controller_get_selection (self->sel_cntrlr);
g_return_if_fail (selection != NULL);
-- {
-- g_autoptr (GError) error = NULL;
--
-- manager = tracker_miner_manager_new_full (FALSE, &error);
-- if (error != NULL)
-- {
-- g_warning ("Unable to create a TrackerMinerManager, importing from attached devices won't work: %s",
-- error->message);
-- goto out;
-- }
-- }
-+ miner_control_proxy = photos_application_get_miner_fs_control_proxy (NULL);
-+ if (!miner_control_proxy)
-+ goto out;
-
- for (l = selection; l != NULL; l = l->next)
+- if (self->miner_manager == NULL)
++ if (!self->miner_control_proxy)
{
-@@ -1572,14 +1505,14 @@ photos_application_import (PhotosApplication *self)
- dialog = photos_import_dialog_new (GTK_WINDOW (self->main_window), ctime_latest);
+- g_warning ("No TrackerMinerManager, importing from attached devices won't work");
++ g_warning ("No Tracker3.Miner.Files.Index proxy, importing from attached devices won't work");
+ goto out;
+ }
+
+@@ -1563,6 +1505,7 @@ photos_application_import (PhotosApplication *self)
gtk_widget_show_all (dialog);
-- data = photos_application_import_data_new (self, manager, files, ctime_latest);
-+ data = photos_application_import_data_new (self, miner_control_proxy, files, ctime_latest);
+ data = photos_application_import_data_new (self, files, ctime_latest);
+
g_signal_connect (dialog,
"response",
G_CALLBACK (photos_application_import_response),
- g_steal_pointer (&data));
-
- out:
-- g_clear_object (&manager);
- g_list_free_full (files, g_object_unref);
+@@ -2234,35 +2177,7 @@ photos_application_share_current (PhotosApplication *self)
+ static void
+ photos_application_start_miners (PhotosApplication *self)
+ {
+- {
+- g_autoptr (GError) error = NULL;
+-
+- self->miner_manager = tracker_miner_manager_new_full (TRUE, &error);
+- if (error != NULL)
+- g_warning ("Unable to create a TrackerMinerManager: %s", error->message);
+- }
+-
+- if (self->miner_manager != NULL)
+- {
+- GSList *available = NULL;
+- GSList *miner_files = NULL;
+-
+- available = tracker_miner_manager_get_available (self->miner_manager);
+- miner_files = g_slist_find_custom (available, MINER_FILES, (GCompareFunc) strcmp);
+- if (miner_files == NULL)
+- {
+- g_warning ("Unable to find miner %s", MINER_FILES);
+- }
+- else
+- {
+- if (!tracker_miner_manager_is_active (self->miner_manager, MINER_FILES))
+- g_warning ("Unable to activate miner %s", MINER_FILES);
+- }
+-
+- g_slist_free_full (available, g_free);
+- }
+-
+- photos_application_create_online_miners (self);
++ photos_application_create_online_miners (self);
}
-@@ -2974,6 +2907,7 @@ photos_application_dispose (GObject *object)
+
+@@ -2991,6 +2906,7 @@ photos_application_dispose (GObject *object)
g_clear_object (&self->insta_action);
g_clear_object (&self->load_next_action);
g_clear_object (&self->load_previous_action);
@@ -1915,15 +1824,17 @@ index cb114fda..5fbbbef2 100644
g_clear_object (&self->open_action);
g_clear_object (&self->preview_menu_action);
g_clear_object (&self->primary_menu_action);
-@@ -3002,7 +2936,6 @@ photos_application_dispose (GObject *object)
+@@ -3019,8 +2935,7 @@ photos_application_dispose (GObject *object)
g_clear_object (&self->camera_cache);
g_clear_object (&self->sel_cntrlr);
g_clear_object (&self->factory);
- g_clear_object (&self->extract_priority);
+- g_clear_object (&self->miner_manager);
++ g_clear_object (&self->miner_control_proxy);
if (self->state != NULL)
{
-@@ -3130,8 +3063,7 @@ photos_application_get_miners_running (PhotosApplication *self)
+@@ -3148,8 +3063,7 @@ photos_application_get_miners_running (PhotosApplication *self)
return self->miners_running;
}
@@ -1934,7 +1845,7 @@ index cb114fda..5fbbbef2 100644
{
GList *windows;
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
-index 143431f9..b34706f2 100644
+index 0d72f9c5..4ef69224 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -2756,6 +2756,16 @@ photos_base_item_update_info_from_type (PhotosBaseItem *self)
@@ -1954,23 +1865,8 @@ index 143431f9..b34706f2 100644
static void
photos_base_item_populate_from_cursor (PhotosBaseItem *self, TrackerSparqlCursor *cursor)
{
-@@ -2891,10 +2901,10 @@ photos_base_item_populate_from_cursor (PhotosBaseItem *self, TrackerSparqlCursor
- priv->width = height;
- }
-
-- priv->exposure_time = tracker_sparql_cursor_get_double (cursor, PHOTOS_QUERY_COLUMNS_EXPOSURE_TIME);
-- priv->fnumber = tracker_sparql_cursor_get_double (cursor, PHOTOS_QUERY_COLUMNS_FNUMBER);
-- priv->focal_length = tracker_sparql_cursor_get_double (cursor, PHOTOS_QUERY_COLUMNS_FOCAL_LENGTH);
-- priv->iso_speed = tracker_sparql_cursor_get_double (cursor, PHOTOS_QUERY_COLUMNS_ISO_SPEED);
-+ priv->exposure_time = get_double_with_default (cursor, PHOTOS_QUERY_COLUMNS_EXPOSURE_TIME, 0.0);
-+ priv->fnumber = get_double_with_default (cursor, PHOTOS_QUERY_COLUMNS_FNUMBER, 0.0);
-+ priv->focal_length = get_double_with_default (cursor, PHOTOS_QUERY_COLUMNS_FOCAL_LENGTH, 0.0);
-+ priv->iso_speed = get_double_with_default (cursor, PHOTOS_QUERY_COLUMNS_ISO_SPEED, 0.0);
-
- flash = tracker_sparql_cursor_get_string (cursor, PHOTOS_QUERY_COLUMNS_FLASH, NULL);
- priv->flash = g_quark_from_string (flash);
diff --git a/src/photos-indexing-notification.c b/src/photos-indexing-notification.c
-index 7b2ea7dd..122d0d91 100644
+index 72394983..122d0d91 100644
--- a/src/photos-indexing-notification.c
+++ b/src/photos-indexing-notification.c
@@ -26,12 +26,13 @@
@@ -2001,7 +1897,7 @@ index 7b2ea7dd..122d0d91 100644
REMOTE_MINER_TIMEOUT = 10 /* s */
};
--static const gchar *MINER_FILES = "org.freedesktop.Tracker1.Miner.Files";
+-static const gchar *MINER_FILES = "org.gnome.Photos.Tracker1.Miner.Files";
-
static void
@@ -2061,7 +1957,7 @@ index 7b2ea7dd..122d0d91 100644
+ &error);
+ }
-- self->manager = tracker_miner_manager_new_full (FALSE, &error);
+- self->manager = tracker_miner_manager_new_full (TRUE, &error);
if (error != NULL)
{
- g_warning ("Unable to create a TrackerMinerManager, indexing progress notification won't work: %s",
@@ -2087,7 +1983,7 @@ index 7b2ea7dd..122d0d91 100644
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
-index c44fbbfc..e4511bb1 100644
+index 337891c1..4dfe3c7e 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -41,12 +41,9 @@
@@ -2935,7 +2831,7 @@ index eee4f40c..00000000
-#endif /* PHOTOS_TRACKER_CHANGE_EVENT_H */
diff --git a/src/photos-tracker-change-monitor.c b/src/photos-tracker-change-monitor.c
deleted file mode 100644
-index 2e9810aa..00000000
+index 44c9ffe7..00000000
--- a/src/photos-tracker-change-monitor.c
+++ /dev/null
@@ -1,468 +0,0 @@
@@ -3375,7 +3271,7 @@ index 2e9810aa..00000000
-
- self->resource_service = tracker_resources_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
- G_DBUS_PROXY_FLAGS_NONE,
-- "org.freedesktop.Tracker1",
+- "org.gnome.Photos.Tracker1",
- "/org/freedesktop/Tracker1/Resources",
- cancellable,
- error);
@@ -3456,10 +3352,10 @@ index 9740b046..00000000
-
-#endif /* PHOTOS_TRACKER_CHANGE_MONITOR_H */
diff --git a/src/photos-tracker-controller.c b/src/photos-tracker-controller.c
-index 3a62cf2d..f0b81e02 100644
+index 525e4ee0..54f714e0 100644
--- a/src/photos-tracker-controller.c
+++ b/src/photos-tracker-controller.c
-@@ -292,6 +292,12 @@ photos_tracker_controller_perform_current_query (PhotosTrackerController *self)
+@@ -294,6 +294,12 @@ photos_tracker_controller_perform_current_query (PhotosTrackerController *self)
priv = photos_tracker_controller_get_instance_private (self);
@@ -3472,7 +3368,7 @@ index 3a62cf2d..f0b81e02 100644
g_clear_object (&priv->current_query);
priv->current_query = PHOTOS_TRACKER_CONTROLLER_GET_CLASS (self)->get_query (self);
g_return_if_fail (priv->current_query != NULL);
-@@ -303,12 +309,6 @@ photos_tracker_controller_perform_current_query (PhotosTrackerController *self)
+@@ -305,12 +311,6 @@ photos_tracker_controller_perform_current_query (PhotosTrackerController *self)
g_object_unref (priv->cancellable);
priv->cancellable = g_cancellable_new ();
@@ -3499,7 +3395,7 @@ index 7e3b9b0c..2b562299 100644
<method name="SetRdfTypes">
<arg name="rdf_types" type="as" direction="in" />
diff --git a/src/photos-tracker-import-controller.c b/src/photos-tracker-import-controller.c
-index 085ace3a..d7ed9b20 100644
+index 9f130714..d7ed9b20 100644
--- a/src/photos-tracker-import-controller.c
+++ b/src/photos-tracker-import-controller.c
@@ -24,7 +24,6 @@
@@ -3653,7 +3549,7 @@ index 085ace3a..d7ed9b20 100644
- {
- g_autoptr (GError) error = NULL;
-
-- self->manager = tracker_miner_manager_new_full (FALSE, &error);
+- self->manager = tracker_miner_manager_new_full (TRUE, &error);
- if (error != NULL)
- g_warning ("Unable to create a TrackerMinerManager, indexing attached devices won't work: %s", error->message);
- }
@@ -3662,7 +3558,7 @@ index 085ace3a..d7ed9b20 100644
diff --git a/src/photos-tracker-queue.c b/src/photos-tracker-queue.c
-index 6ac829cd..a5f4c91a 100644
+index 76d25d5d..a5f4c91a 100644
--- a/src/photos-tracker-queue.c
+++ b/src/photos-tracker-queue.c
@@ -37,9 +37,20 @@ struct _PhotosTrackerQueue
@@ -3871,11 +3767,11 @@ index 6ac829cd..a5f4c91a 100644
ret_val = TRUE;
else
g_assert_nonnull (self->initialization_error);
-@@ -290,11 +399,49 @@ photos_tracker_queue_initable_init (GInitable *initable, GCancellable *cancellab
+@@ -290,13 +399,49 @@ photos_tracker_queue_initable_init (GInitable *initable, GCancellable *cancellab
g_assert_no_error (self->initialization_error);
-- self->connection = tracker_sparql_connection_get (cancellable, &self->initialization_error);
+- tracker_sparql_connection_set_domain ("org.gnome.Photos");
+ /* Connect to the local database which stores user data.
+ *
+ * Same flags that tracker-miner-fs uses by default. See:
@@ -3893,7 +3789,8 @@ index 6ac829cd..a5f4c91a 100644
+ tracker_sparql_get_ontology_nepomuk (),
+ cancellable,
+ &self->initialization_error);
-+
+
+- self->connection = tracker_sparql_connection_get (cancellable, &self->initialization_error);
if (G_UNLIKELY (self->initialization_error != NULL))
goto out;
@@ -3923,7 +3820,7 @@ index 6ac829cd..a5f4c91a 100644
out:
self->is_initialized = TRUE;
-@@ -319,10 +466,44 @@ photos_tracker_queue_initable_iface_init (GInitableIface *iface)
+@@ -321,10 +466,44 @@ photos_tracker_queue_initable_iface_init (GInitableIface *iface)
PhotosTrackerQueue *
photos_tracker_queue_dup_singleton (GCancellable *cancellable, GError **error)
{
@@ -3969,7 +3866,7 @@ index 6ac829cd..a5f4c91a 100644
}
-@@ -351,6 +532,7 @@ photos_tracker_queue_select (PhotosTrackerQueue *self,
+@@ -353,6 +532,7 @@ photos_tracker_queue_select (PhotosTrackerQueue *self,
}
@@ -4043,10 +3940,10 @@ index 18177aa0..00000000
- </interface>
-</node>
diff --git a/src/photos-utils.c b/src/photos-utils.c
-index c638297b..cc8593d8 100644
+index d659b47d..72d2e98b 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
-@@ -1261,7 +1261,13 @@ photos_utils_set_edited_name (const gchar *urn, const gchar *title)
+@@ -1324,7 +1324,13 @@ photos_utils_set_edited_name (const gchar *urn, const gchar *title)
g_autoptr (PhotosTrackerQueue) queue = NULL;
g_autofree gchar *sparql = NULL;
@@ -4061,7 +3958,7 @@ index c638297b..cc8593d8 100644
query = photos_query_new (NULL, sparql);
{
-@@ -1289,9 +1295,19 @@ photos_utils_set_favorite (const gchar *urn, gboolean is_favorite)
+@@ -1352,9 +1358,19 @@ photos_utils_set_favorite (const gchar *urn, gboolean is_favorite)
g_autoptr (PhotosTrackerQueue) queue = NULL;
g_autofree gchar *sparql = NULL;
@@ -4085,7 +3982,7 @@ index c638297b..cc8593d8 100644
{
diff --git a/src/photos-utils.h b/src/photos-utils.h
-index 78ec3668..f1450f7d 100644
+index a4d69abf..57069892 100644
--- a/src/photos-utils.h
+++ b/src/photos-utils.h
@@ -46,7 +46,7 @@ G_BEGIN_DECLS