summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2018-03-08 13:01:08 +0100
committerBastien Nocera <hadess@hadess.net>2018-03-08 23:45:01 +0100
commit81d39c6198f329ac2554f362b26cc9500b8fa83b (patch)
tree4a06b64901163a0c94352345cd7f84e39412dcf8
parentb9e87856b51048eff65595e64e958a21357aaca5 (diff)
downloadlibgweather-81d39c6198f329ac2554f362b26cc9500b8fa83b.tar.gz
GWeatherLocation: Allow disabling automatic weather station creation
Add an environment variable to disable the copy of weather stations to attach them to cities. This makes it easier to find duplicate weather stations. https://bugzilla.gnome.org/show_bug.cgi?id=792328
-rw-r--r--libgweather/gweather-location.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgweather/gweather-location.c b/libgweather/gweather-location.c
index 9c51c1b..43620d2 100644
--- a/libgweather/gweather-location.c
+++ b/libgweather/gweather-location.c
@@ -413,7 +413,8 @@ gweather_location_get_world (void)
return NULL;
global_world = location_new_from_xml (parser, GWEATHER_LOCATION_WORLD, NULL);
- add_nearest_weather_stations (global_world);
+ if (!g_getenv ("LIBGWEATHER_LOCATIONS_NO_NEAREST"))
+ add_nearest_weather_stations (global_world);
_gweather_parser_free (parser);
}