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



commit a279b645d21fa7ecc159ed91e644c89614f36e4e
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 60c5c6e..4ca4840 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]