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-09 12:10:37 +0100
commitcc7384f30aa75b1023e67efa778df6fd11a4fad3 (patch)
tree6f68cefd6063aeb77cf4add6ffc1582b55f5defa
parent82d640f58ce3b9d895bd3251ffb70b0981f007f5 (diff)
downloadlibgweather-cc7384f30aa75b1023e67efa778df6fd11a4fad3.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);
}