[gnome-maps] mapView: Only show user location, don't go to it



commit 3880c057533919053489bdd937114c82d40163f8
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Apr 16 04:00:52 2013 +0300

    mapView: Only show user location, don't go to it
    
    In the following patches, we'll add an explicity toggle to actually go
    to user location. For getting back the behavior this patches breaks,
    we'll remember the state of this toggle (in dconf).

 src/mapView.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/mapView.js b/src/mapView.js
index c08f150..943f31c 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -72,7 +72,7 @@ const MapView = new Lang.Class({
         this._factory = Champlain.MapSourceFactory.dup_default();
         this.setMapType(MapType.STREET);
 
-        this._gotoUserLocation();
+        this._showUserLocation();
     },
 
     setMapType: function(mapType) {
@@ -128,7 +128,7 @@ const MapView = new Lang.Class({
         this.view.ensure_visible(bbox, true);
     },
 
-    _gotoUserLocation: function() {
+    _showUserLocation: function() {
         let lastLocation = Application.settings.get_value('last-location');
         if (lastLocation.n_children() >= 3) {
             let lat = lastLocation.get_child_value(0);
@@ -141,8 +141,8 @@ const MapView = new Lang.Class({
             let lastLocationDescription = Application.settings.get_string('last-location-description');
             location.set_description(lastLocationDescription);
 
-            let userLocation = new UserLocation.UserLocation(location, this);
-            userLocation.showNGoTo(false, this._userLocationLayer);
+            this._userLocation = new UserLocation.UserLocation(location, this);
+            this._userLocation.show(this._userLocationLayer);
         }
 
         let ipclient = new Geocode.Ipclient();
@@ -153,8 +153,8 @@ const MapView = new Lang.Class({
                 try {
                     let location = ipclient.search_finish(res);
 
-                    let userLocation = new UserLocation.UserLocation(location, this);
-                    userLocation.showNGoTo(true, this._userLocationLayer);
+                    this._userLocation = new UserLocation.UserLocation(location, this);
+                    this._userLocation.show(this._userLocationLayer);
 
                     let variant = GLib.Variant.new('ad', [location.latitude, location.longitude, 
location.accuracy]);
                     Application.settings.set_value('last-location', variant);


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