[libgweather/wip/hadess/serialisation-fix-stable: 9/13] GWeatherLocation: Make "find nearest city" return a city



commit 4ab6addc59485f85a3aab8a9d953c0ebd5305de3
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 46118a0..6e28c4d 100644
--- a/libgweather/gweather-location.c
+++ b/libgweather/gweather-location.c
@@ -666,7 +666,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]