From 9d4bf09ca77cee91e857dc96587e1443d9d70942 Mon Sep 17 00:00:00 2001 From: Florian Brosch Date: Sun, 15 Oct 2017 21:58:57 +0200 Subject: [PATCH] weather: Use find_nearest_city instead of new_detached --- src/gcal-weather-service.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gcal-weather-service.c b/src/gcal-weather-service.c index 63932193..9ed78eee 100644 --- a/src/gcal-weather-service.c +++ b/src/gcal-weather-service.c @@ -957,13 +957,17 @@ gcal_weather_service_update_gclue_location (GcalWeatherService *self, loc_name = gcal_weather_service_get_location_name (location); if (loc_name != NULL) { + GWeatherLocation *wworld; /* unowned */ gdouble latitude; gdouble longitude; latitude = gclue_location_get_latitude (location); longitude = gclue_location_get_longitude (location); - wlocation = gweather_location_new_detached (loc_name, NULL, latitude, longitude); + // wlocation = gweather_location_new_detached (loc_name, NULL, latitude, longitude); + // nearest-city works more closely to gnome weather. + wworld = gweather_location_get_world (); + wlocation = gweather_location_find_nearest_city (wworld, latitude, longitude); } }