[gnome-maps] SendToDialog: Use detached location instead of nearest city



commit 0f36ca7612d4dca18451c058438653c3aa9d0987
Author: Giovanni Campagna <scampa giovanni gmail com>
Date:   Mon Mar 2 19:26:52 2015 -0800

    SendToDialog: Use detached location instead of nearest city
    
    The nearest city in the database could be far.
    While the precision does not matter, the fact that we lose the
    description of the specific place and show some random nearby
    city is confusing for the user. Given that we have the information
    locally, let's make use of it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745496

 src/sendToDialog.js |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/sendToDialog.js b/src/sendToDialog.js
index 0ebe5da..129b67f 100644
--- a/src/sendToDialog.js
+++ b/src/sendToDialog.js
@@ -102,9 +102,11 @@ const SendToDialog = new Lang.Class({
             this.response(Response.CANCEL);
 
         if (rows[0] === this._weatherRow || rows[0] === this._clocksRow) {
-            let world = GWeather.Location.get_world();
-            let city = world.find_nearest_city(this._place.location.latitude,
-                                               this._place.location.longitude);
+            let location = this._place.location;
+            let city = GWeather.Location.new_detached(this._place.name,
+                                                      null,
+                                                      location.latitude,
+                                                      location.longitude);
             let appId;
             let action;
             if (rows[0] === this._weatherRow) {


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