gnome-photos: update to 3.38.0.

This commit is contained in:
Đoàn Trần Công Danh 2020-11-08 11:41:17 +07:00
parent c8ce95b6a8
commit 31c56a9e41
2 changed files with 168 additions and 271 deletions

View file

@ -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 4673c40a7c006ccb6de203ec2b25ca39a74782d9 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 18f126a67a37d1f6efe546e42eef22ae15da7642 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
@ -231,7 +193,7 @@ index e768bca0..8a3415fc 100644
G_END_DECLS
diff --git a/src/photos-query-builder.c b/src/photos-query-builder.c
index 6b996811..e0735bde 100644
index 2c52a130..5d9d8a5a 100644
--- a/src/photos-query-builder.c
+++ b/src/photos-query-builder.c
@@ -26,112 +26,76 @@
@ -444,7 +406,7 @@ index 6b996811..e0735bde 100644
return sparql;
}
@@ -231,12 +179,37 @@ photos_query_builder_collection_icon_query (PhotosSearchContextState *state, con
@@ -234,12 +182,37 @@ photos_query_builder_collection_icon_query (PhotosSearchContextState *state, con
PhotosQuery *
photos_query_builder_count_query (PhotosSearchContextState *state, gint flags)
{
@ -1152,10 +1114,10 @@ index 00000000..4eb10b74
GitLab
From d61d440efe340bda4e195d640066fb29220d0cb5 Mon Sep 17 00:00:00 2001
From dbbb76f228bad33334e0574784c34efb7071f950 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 ead63250..d20e1289 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.15.2')
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)
@@ -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";
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)
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 @@
@ -2344,7 +2240,7 @@ index 0870ef62..5ee25745 100644
+ return g_quark_from_static_string ("http://tracker.api.gnome.org/ontology/v3/nfo#orientation-top-mirror");
}
diff --git a/src/photos-query-builder.c b/src/photos-query-builder.c
index e0735bde..46d65e8f 100644
index 5d9d8a5a..9b1baf29 100644
--- a/src/photos-query-builder.c
+++ b/src/photos-query-builder.c
@@ -25,6 +25,7 @@
@ -2470,15 +2366,15 @@ index e0735bde..46d65e8f 100644
NULL);
@@ -133,6 +147,7 @@ photos_query_builder_create_collection_query (PhotosSearchContextState *state,
{
g_autoptr (GDateTime) now = NULL;
GTimeVal tv;
PhotosQuery *query;
+ g_autoptr (TrackerResource) collection = NULL;
g_autofree gchar *identifier = NULL;
g_autofree gchar *sparql = NULL;
g_autofree gchar *time = NULL;
@@ -144,13 +159,14 @@ photos_query_builder_create_collection_query (PhotosSearchContextState *state,
now = g_date_time_new_now_utc ();
time = g_date_time_format_iso8601 (now);
@@ -147,13 +162,14 @@ photos_query_builder_create_collection_query (PhotosSearchContextState *state,
tv.tv_usec = 0;
time = g_time_val_to_iso8601 (&tv);
- sparql = g_strdup_printf ("INSERT { _:res a nfo:DataContainer ; a nie:DataObject ; "
- "nie:contentLastModified '%s' ; "
@ -2498,7 +2394,7 @@ index e0735bde..46d65e8f 100644
query = photos_query_new (state, sparql);
@@ -180,7 +196,9 @@ PhotosQuery *
@@ -183,7 +199,9 @@ PhotosQuery *
photos_query_builder_count_query (PhotosSearchContextState *state, gint flags)
{
PhotosSparqlTemplate *template;
@ -2509,7 +2405,7 @@ index e0735bde..46d65e8f 100644
g_autofree gchar *item_pattern = NULL;
g_autofree gchar *search_filter = NULL;
g_autofree gchar *source_filter = NULL;
@@ -189,7 +207,10 @@ photos_query_builder_count_query (PhotosSearchContextState *state, gint flags)
@@ -192,7 +210,10 @@ photos_query_builder_count_query (PhotosSearchContextState *state, gint flags)
template = photos_base_manager_get_sparql_template (state->srch_typ_mngr, flags);
@ -2521,7 +2417,7 @@ index e0735bde..46d65e8f 100644
item_pattern = photos_base_manager_get_where (state->item_mngr, flags);
@@ -200,12 +221,16 @@ photos_query_builder_count_query (PhotosSearchContextState *state, gint flags)
@@ -203,12 +224,16 @@ photos_query_builder_count_query (PhotosSearchContextState *state, gint flags)
}
sparql = photos_sparql_template_get_sparql (template,
@ -2541,7 +2437,7 @@ index e0735bde..46d65e8f 100644
"order", "",
"offset_limit", "",
NULL);
@@ -264,7 +289,7 @@ photos_query_builder_fetch_collections_local (PhotosSearchContextState *state)
@@ -267,7 +292,7 @@ photos_query_builder_fetch_collections_local (PhotosSearchContextState *state)
g_autofree gchar *sparql = NULL;
sparql = photos_query_builder_query (state,
@ -2550,7 +2446,7 @@ index e0735bde..46d65e8f 100644
PHOTOS_QUERY_FLAGS_COLLECTIONS
| PHOTOS_QUERY_FLAGS_LOCAL
| PHOTOS_QUERY_FLAGS_UNLIMITED,
@@ -284,7 +309,7 @@ photos_query_builder_global_query (PhotosSearchContextState *state,
@@ -287,7 +312,7 @@ photos_query_builder_global_query (PhotosSearchContextState *state,
PhotosQuery *query;
g_autofree gchar *sparql = NULL;
@ -2559,7 +2455,7 @@ index e0735bde..46d65e8f 100644
query = photos_query_new (state, sparql);
return query;
@@ -313,10 +338,19 @@ photos_query_builder_set_collection_query (PhotosSearchContextState *state,
@@ -316,10 +341,19 @@ photos_query_builder_set_collection_query (PhotosSearchContextState *state,
PhotosQuery *query;
g_autofree gchar *sparql = NULL;
@ -2583,7 +2479,7 @@ index e0735bde..46d65e8f 100644
query = photos_query_new (state, sparql);
return query;
@@ -326,17 +360,14 @@ photos_query_builder_set_collection_query (PhotosSearchContextState *state,
@@ -329,17 +363,14 @@ photos_query_builder_set_collection_query (PhotosSearchContextState *state,
PhotosQuery *
photos_query_builder_single_query (PhotosSearchContextState *state, gint flags, const gchar *resource)
{
@ -2605,9 +2501,9 @@ index e0735bde..46d65e8f 100644
query = photos_query_new (state, sparql);
return query;
@@ -354,7 +385,14 @@ photos_query_builder_update_mtime_query (PhotosSearchContextState *state, const
now = g_date_time_new_now_utc ();
time = g_date_time_format_iso8601 (now);
@@ -360,7 +391,14 @@ photos_query_builder_update_mtime_query (PhotosSearchContextState *state, const
tv.tv_usec = 0;
time = g_time_val_to_iso8601 (&tv);
- sparql = g_strdup_printf ("INSERT OR REPLACE { <%s> nie:contentLastModified '%s' }", resource, time);
+ sparql = g_strdup_printf ("WITH tracker:Pictures "
@ -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,7 +3352,7 @@ 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 a02db077..6d0053a1 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)
@ -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

View file

@ -1,6 +1,6 @@
# Template file for 'gnome-photos'
pkgname=gnome-photos
version=3.37.91.1
version=3.38.0
revision=1
build_helper="gir"
build_style=meson
@ -15,8 +15,8 @@ short_desc="Access, organize, and share your photos on GNOME"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://wiki.gnome.org/Apps/Photos"
distfiles="${GNOME_SITE}/gnome-photos/${version%.*.*}/gnome-photos-${version}.tar.xz"
checksum=278da23234e27c543020dae943ad52086b9ecaa5ee3aad0b031b86ee04d394aa
distfiles="${GNOME_SITE}/gnome-photos/${version%.*}/gnome-photos-${version}.tar.xz"
checksum=667f39477579d577470740e01f37b05c62e461e6f6da6377724d8f3993e1c4c4
patch_args="-Np1"
build_options="gir"