[gnome-maps] MapView: Separate showNGotoLocation method
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] MapView: Separate showNGotoLocation method
- Date: Sat, 31 Aug 2013 18:29:35 +0000 (UTC)
commit 7865b19d3921052b12f852a7b1cb55251614dbe6
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Sun Aug 25 04:16:48 2013 +0300
MapView: Separate showNGotoLocation method
MapView now provides a separate method for showing a location and
going to it while retaining the showLocation for only showing the
location on the map.
https://bugzilla.gnome.org/show_bug.cgi?id=706726
src/mainWindow.js | 2 +-
src/mapView.js | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index e6a1e41..5490524 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -225,7 +225,7 @@ const MainWindow = new Lang.Class({
let model = this._searchPopup.getModel();
let location = model.get_value(iter, SearchResults.COL_LOCATION);
- this.mapView.showLocation(location);
+ this.mapView.showNGotoLocation(location);
this._searchPopup.hide();
},
diff --git a/src/mapView.js b/src/mapView.js
index c52b45b..6dd242e 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -154,6 +154,12 @@ const MapView = new Lang.Class({
let mapLocation = new MapLocation.MapLocation(location, this);
mapLocation.show(this._markerLayer);
+
+ return mapLocation;
+ },
+
+ showNGotoLocation: function(location) {
+ let mapLocation = this.showLocation(location);
mapLocation.goTo(true);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]