|
|
c51fd9 |
From f1b1b75e6772502290cbff5be2c8f31b61bdb6df Mon Sep 17 00:00:00 2001
|
|
|
c51fd9 |
From: Fabrice Bellet <fabrice@bellet.info>
|
|
|
c51fd9 |
Date: Mon, 23 Mar 2015 01:30:50 +0100
|
|
|
c51fd9 |
Subject: [PATCH] location-manager: fix reduce accuracy setting
|
|
|
c51fd9 |
|
|
|
c51fd9 |
https://bugzilla.gnome.org/show_bug.cgi?id=746735
|
|
|
c51fd9 |
---
|
|
|
c51fd9 |
libempathy-gtk/empathy-location-manager.c | 17 +++++++++++++++++
|
|
|
c51fd9 |
1 file changed, 17 insertions(+)
|
|
|
c51fd9 |
|
|
|
c51fd9 |
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
|
|
|
c51fd9 |
index 8787eb2..6ba39ac 100644
|
|
|
c51fd9 |
--- a/libempathy-gtk/empathy-location-manager.c
|
|
|
c51fd9 |
+++ b/libempathy-gtk/empathy-location-manager.c
|
|
|
c51fd9 |
@@ -368,6 +368,18 @@ publish_cb (GSettings *gsettings_loc,
|
|
|
c51fd9 |
}
|
|
|
c51fd9 |
|
|
|
c51fd9 |
static void
|
|
|
c51fd9 |
+reduce_accuracy_cb (GSettings *gsettings_loc,
|
|
|
c51fd9 |
+ const gchar *key,
|
|
|
c51fd9 |
+ gpointer user_data)
|
|
|
c51fd9 |
+{
|
|
|
c51fd9 |
+ EmpathyLocationManager *self = EMPATHY_LOCATION_MANAGER (user_data);
|
|
|
c51fd9 |
+
|
|
|
c51fd9 |
+ DEBUG ("Reduce Accuracy changed");
|
|
|
c51fd9 |
+
|
|
|
c51fd9 |
+ self->priv->reduce_accuracy = g_settings_get_boolean (gsettings_loc, key);
|
|
|
c51fd9 |
+}
|
|
|
c51fd9 |
+
|
|
|
c51fd9 |
+static void
|
|
|
c51fd9 |
account_manager_prepared_cb (GObject *source_object,
|
|
|
c51fd9 |
GAsyncResult *result,
|
|
|
c51fd9 |
gpointer user_data)
|
|
|
c51fd9 |
@@ -416,7 +428,12 @@ empathy_location_manager_init (EmpathyLocationManager *self)
|
|
|
c51fd9 |
"changed::" EMPATHY_PREFS_LOCATION_PUBLISH,
|
|
|
c51fd9 |
G_CALLBACK (publish_cb), self);
|
|
|
c51fd9 |
|
|
|
c51fd9 |
+ g_signal_connect (priv->gsettings_loc,
|
|
|
c51fd9 |
+ "changed::" EMPATHY_PREFS_LOCATION_REDUCE_ACCURACY,
|
|
|
c51fd9 |
+ G_CALLBACK (reduce_accuracy_cb), self);
|
|
|
c51fd9 |
+
|
|
|
c51fd9 |
publish_cb (priv->gsettings_loc, EMPATHY_PREFS_LOCATION_PUBLISH, self);
|
|
|
c51fd9 |
+ reduce_accuracy_cb (priv->gsettings_loc, EMPATHY_PREFS_LOCATION_REDUCE_ACCURACY, self);
|
|
|
c51fd9 |
}
|
|
|
c51fd9 |
|
|
|
c51fd9 |
EmpathyLocationManager *
|