[gnome-maps/bilelmoussaoui/location-portal: 2/2] geoclue: Use the portal when sandboxed
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/bilelmoussaoui/location-portal: 2/2] geoclue: Use the portal when sandboxed
- Date: Sat, 15 Jan 2022 22:15:49 +0000 (UTC)
commit af680d10e8e7cc52a95bf20df4fcdc79b6d502d3
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Wed Jan 12 10:30:29 2022 +0100
geoclue: Use the portal when sandboxed
org.gnome.Maps.json | 17 ++++++++++++++++-
src/geoclue.js | 10 +++++++---
2 files changed, 23 insertions(+), 4 deletions(-)
---
diff --git a/org.gnome.Maps.json b/org.gnome.Maps.json
index 842ea6a1..186c202f 100644
--- a/org.gnome.Maps.json
+++ b/org.gnome.Maps.json
@@ -19,7 +19,6 @@
"--talk-name=org.gnome.evolution.dataserver.Calendar7",
"--talk-name=org.gnome.evolution.dataserver.Sources5",
"--talk-name=org.gnome.evolution.dataserver.Subprocess.Backend.*",
- "--system-talk-name=org.freedesktop.GeoClue2",
"--metadata=X-DConf=migrate-path=/org/gnome/Maps",
"--env=G_ENABLE_DIAGNOSTICS=1"
],
@@ -37,6 +36,22 @@
],
"modules" : [
{
+ "name": "libgeoclue",
+ "buildsystem": "meson",
+ "config-opts" : [
+ "-Denable-backend=false",
+ "-Dlibgeoclue=true",
+ "-Dintrospection=true",
+ "-Dgtk-doc=false"
+ ],
+ "sources": [
+ {
+ "type" : "git",
+ "url": "https://gitlab.freedesktop.org/geoclue/geoclue.git"
+ }
+ ]
+ },
+ {
"name": "libical",
"cleanup": [ "/lib/cmake" ],
"buildsystem": "cmake-ninja",
diff --git a/src/geoclue.js b/src/geoclue.js
index 864d9897..af127355 100644
--- a/src/geoclue.js
+++ b/src/geoclue.js
@@ -90,9 +90,13 @@ var Geoclue = GObject.registerClass({
this._simple.connect('notify::location',
() => this._onLocationNotify(this._simple));
- this._simple.client.connect('notify::active', () => {
- this.state = this._simple.client.active ? State.ON : State.DENIED;
- });
+
+ // geoclue doesn't use a client proxy inside the flatpak sandbox
+ if (this._simple.client) {
+ this._simple.client.connect('notify::active', () => {
+ this.state = this._simple.client.active ? State.ON : State.DENIED;
+ });
+ }
this.state = State.ON;
this._onLocationNotify(this._simple);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]