[gnome-shell] location: Update available accuracy on max accuracy changing
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] location: Update available accuracy on max accuracy changing
- Date: Fri, 20 Jun 2014 11:26:39 +0000 (UTC)
commit 5a8a293614b9fd7352a5619180b37cfc998ea641
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Jun 10 01:24:10 2014 +0100
location: Update available accuracy on max accuracy changing
We translate 'On' to available accuracy level but if available accuracy
level later changes, we don't update available accuracy level accordingly
and hence limit the accuracy of apps.
E.g if available accuracy level is 'city' and geolocation is enabled,
the max accuracy level would be 'city' and apps can't get higher than
that. Now if user plugs in GPS, the available accuracy level will change
to 'exact' but without this patch max accuracy level will remain to be
'city' and apps will not be able to use the GPS.
https://bugzilla.gnome.org/show_bug.cgi?id=731882
js/ui/status/location.js | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/status/location.js b/js/ui/status/location.js
index 8ae7633..581a534 100644
--- a/js/ui/status/location.js
+++ b/js/ui/status/location.js
@@ -191,8 +191,12 @@ const Indicator = new Lang.Class({
let unpacked = properties.deep_unpack();
if ("InUse" in unpacked)
this._syncIndicator();
- if ("AvailableAccuracyLevel" in unpacked)
+ if ("AvailableAccuracyLevel" in unpacked) {
this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel;
+
+ if (this._getMaxAccuracyLevel() != 0)
+ this._settings.set_enum(MAX_ACCURACY_LEVEL, this._availableAccuracyLevel);
+ }
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]