Commit 0f36ca76 authored by Giovanni Campagna's avatar Giovanni Campagna Committed by Jonas Danielsson

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
parent 7184f290
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment