[gnome-settings-daemon] datetime: Specify the accuracy level for geoclue
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] datetime: Specify the accuracy level for geoclue
- Date: Mon, 3 Feb 2014 18:37:50 +0000 (UTC)
commit 41d81bf2b33df0cf5b444f25b87a853bed8b8f07
Author: Kalev Lember <kalevlember gmail com>
Date: Mon Feb 3 19:07:04 2014 +0100
datetime: Specify the accuracy level for geoclue
This sets the accuracy level to the same value as the current geoclue
default. As per the discussion in the ticket, we shouldn't rely on the
default staying the same in the future and have to explicitly set it.
https://bugzilla.gnome.org/show_bug.cgi?id=722623
plugins/datetime/gsd-timezone-monitor.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plugins/datetime/gsd-timezone-monitor.c b/plugins/datetime/gsd-timezone-monitor.c
index c762ee5..5b50881 100644
--- a/plugins/datetime/gsd-timezone-monitor.c
+++ b/plugins/datetime/gsd-timezone-monitor.c
@@ -32,6 +32,9 @@
#define DESKTOP_ID "gnome-datetime-panel"
#define SET_TIMEZONE_PERMISSION "org.freedesktop.timedate1.set-timezone"
+/* Defines from geoclue private header src/public-api/gclue-enums.h */
+#define GCLUE_ACCURACY_LEVEL_CITY 4
+
enum {
TIMEZONE_CHANGED,
LAST_SIGNAL
@@ -342,6 +345,8 @@ on_client_proxy_ready (GObject *source_object,
geoclue_client_set_desktop_id (priv->geoclue_client, DESKTOP_ID);
geoclue_client_set_distance_threshold (priv->geoclue_client,
GEOCODE_LOCATION_ACCURACY_CITY);
+ geoclue_client_set_requested_accuracy_level (priv->geoclue_client,
+ GCLUE_ACCURACY_LEVEL_CITY);
g_signal_connect (priv->geoclue_client, "location-updated",
G_CALLBACK (on_location_updated), self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]