[libgweather/wip/hadess/serialisation-fix: 6/18] GWeatherLocation: Make "find nearest city" return a city



commit 7c0a904d306ee7761da7e92f6c05157dde17c216
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Oct 9 15:11:15 2018 +0200

    GWeatherLocation: Make "find nearest city" return a city
    
    The looping code would only ever call the callback for weather station
    level!

 libgweather/gweather-location.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libgweather/gweather-location.c b/libgweather/gweather-location.c
index e782c80..ad35b8a 100644
--- a/libgweather/gweather-location.c
+++ b/libgweather/gweather-location.c
@@ -695,7 +695,7 @@ foreach_city (GWeatherLocation  *loc,
             return;
     }
 
-    if (loc->level == GWEATHER_LOCATION_WEATHER_STATION) {
+    if (loc->level == GWEATHER_LOCATION_CITY) {
         callback (loc, user_data);
     } else if (loc->children) {
         int i;


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