summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalev Lember <kalevlember@gmail.com>2014-02-03 19:07:04 +0100
committerKalev Lember <kalevlember@gmail.com>2014-02-03 19:13:49 +0100
commit41d81bf2b33df0cf5b444f25b87a853bed8b8f07 (patch)
treee2e612f0c881e39d5ad6099de14f960d86340e5a
parentdf178d4abcc631233d0db07dea94e151f56cebb5 (diff)
downloadgnome-settings-daemon-41d81bf2b33df0cf5b444f25b87a853bed8b8f07.tar.gz
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
-rw-r--r--plugins/datetime/gsd-timezone-monitor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/datetime/gsd-timezone-monitor.c b/plugins/datetime/gsd-timezone-monitor.c
index c762ee5a..5b50881e 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);