[gnome-maps] geoclue: Remove user override posibility



commit b659568f5a30b9439c0ff10e1ebabaa64e40abb2
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Mon Nov 24 05:57:07 2014 -0500

    geoclue: Remove user override posibility

 data/org.gnome.maps.gschema.xml.in |    5 -----
 src/geoclue.js                     |   23 +----------------------
 2 files changed, 1 insertions(+), 27 deletions(-)
---
diff --git a/data/org.gnome.maps.gschema.xml.in b/data/org.gnome.maps.gschema.xml.in
index 4f7dbce..adc8b5c 100644
--- a/data/org.gnome.maps.gschema.xml.in
+++ b/data/org.gnome.maps.gschema.xml.in
@@ -30,11 +30,6 @@
       <_summary>Maximum number of search results</_summary>
       <_description>Maximum number of search results from geocode search.</_description>
     </key>
-    <key name="last-location-user-set" type="b">
-      <default>false</default>
-      <_summary>User set last known location</_summary>
-      <_description>Whether the last known location was set manually by the user.</_description>
-    </key>
     <key name="recent-places-limit" type="i">
       <default>50</default>
       <_summary>Number of recent places to store</_summary>
diff --git a/src/geoclue.js b/src/geoclue.js
index d0adcca..81f0998 100644
--- a/src/geoclue.js
+++ b/src/geoclue.js
@@ -91,20 +91,6 @@ const Geoclue = new Lang.Class({
         return this._connected;
     },
 
-    overrideLocation: function(location) {
-        if (this._clientProxy && this._locationUpdatedId > 0) {
-            this._clientProxy.disconnectSignal(this._locationUpdatedId);
-            this._locationUpdatedId = 0;
-            this._clientProxy.StopRemote(function(result, e) {
-                if (e) {
-                    log ("Failed to connect to GeoClue2 service: " + e.message);
-                }
-            });
-        }
-
-        this._updateLocation(location, true);
-    },
-
     findLocation: function() {
         if (!this._clientProxy)
             return;
@@ -135,8 +121,6 @@ const Geoclue = new Lang.Class({
 
             this.place = new Geocode.Place({ location: location,
                                              name: _("Current location") });
-
-            this.userSetLocation = Application.settings.get('last-location-user-set');
         }
 
         try {
@@ -164,9 +148,6 @@ const Geoclue = new Lang.Class({
         this._clientProxy.DesktopId = "org.gnome.Maps";
         this._clientProxy.RequestedAccuracyLevel = AccuracyLevel.EXACT;
 
-        if (!this.userSetLocation)
-            this.findLocation();
-
         this._connected = true;
         this.notify('connected');
     },
@@ -182,7 +163,7 @@ const Geoclue = new Lang.Class({
         this._updateLocation(location, false);
     },
 
-    _updateLocation: function(location, userSet) {
+    _updateLocation: function(location) {
         this.place.location = location;
 
         Application.settings.set('last-location', [location.latitude,
@@ -190,8 +171,6 @@ const Geoclue = new Lang.Class({
                                                    location.accuracy]);
         if (location.description !== null)
             Application.settings.set('last-location-description', location.description);
-        Application.settings.set('last-location-user-set', userSet);
-        this.userSetLocation = userSet;
 
         this.emit('location-changed');
         Utils.debug("Updated location: " + location.description);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]