location service: adapt to make use of the portal
GClue automatically calls the portal for us when sandboxed and in such case a NULL is returned for the client porxy because the calls goes through the portal. Part of https://gitlab.gnome.org/GNOME/Initiatives/-/issues/30
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
552fd413ae
commit
66a3661e60
@@ -15,7 +15,6 @@
|
|||||||
"--socket=wayland",
|
"--socket=wayland",
|
||||||
"--system-talk-name=org.freedesktop.login1",
|
"--system-talk-name=org.freedesktop.login1",
|
||||||
"--system-talk-name=org.freedesktop.timedate1",
|
"--system-talk-name=org.freedesktop.timedate1",
|
||||||
"--system-talk-name=org.freedesktop.GeoClue2",
|
|
||||||
"--talk-name=org.gnome.ControlCenter",
|
"--talk-name=org.gnome.ControlCenter",
|
||||||
"--talk-name=org.gnome.evolution.dataserver.AddressBook9",
|
"--talk-name=org.gnome.evolution.dataserver.AddressBook9",
|
||||||
"--talk-name=org.gnome.evolution.dataserver.Calendar8",
|
"--talk-name=org.gnome.evolution.dataserver.Calendar8",
|
||||||
@@ -39,6 +38,22 @@
|
|||||||
"*.a"
|
"*.a"
|
||||||
],
|
],
|
||||||
"modules" : [
|
"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" : "geocode-glib",
|
"name" : "geocode-glib",
|
||||||
"buildsystem" : "meson",
|
"buildsystem" : "meson",
|
||||||
|
|||||||
@@ -762,13 +762,14 @@ on_gclue_simple_creation_cb (GClueSimple *_source,
|
|||||||
self,
|
self,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
if (client)
|
||||||
g_signal_connect_object (client,
|
{
|
||||||
"notify::active",
|
g_signal_connect_object (client,
|
||||||
G_CALLBACK (on_gclue_client_activity_changed_cb),
|
"notify::active",
|
||||||
self,
|
G_CALLBACK (on_gclue_client_activity_changed_cb),
|
||||||
0);
|
self,
|
||||||
|
0);
|
||||||
|
}
|
||||||
GCAL_EXIT;
|
GCAL_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1141,6 +1142,7 @@ void
|
|||||||
gcal_weather_service_stop (GcalWeatherService *self)
|
gcal_weather_service_stop (GcalWeatherService *self)
|
||||||
{
|
{
|
||||||
GCAL_ENTRY;
|
GCAL_ENTRY;
|
||||||
|
GClueClient *client;
|
||||||
|
|
||||||
g_return_if_fail (GCAL_IS_WEATHER_SERVICE (self));
|
g_return_if_fail (GCAL_IS_WEATHER_SERVICE (self));
|
||||||
|
|
||||||
@@ -1162,11 +1164,14 @@ gcal_weather_service_stop (GcalWeatherService *self)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gclue_client_call_stop (gclue_simple_get_client (self->location_service),
|
client = gclue_simple_get_client (self->location_service);
|
||||||
self->location_cancellable,
|
if (client)
|
||||||
(GAsyncReadyCallback) on_gclue_client_stopped_cb,
|
{
|
||||||
self->location_service);
|
gclue_client_call_stop (client,
|
||||||
|
self->location_cancellable,
|
||||||
|
(GAsyncReadyCallback) on_gclue_client_stopped_cb,
|
||||||
|
self->location_service);
|
||||||
|
}
|
||||||
self->location_service = NULL;
|
self->location_service = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user