diff options
author | Bastien Nocera <hadess@hadess.net> | 2018-03-07 18:17:36 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2018-03-09 12:10:37 +0100 |
commit | e3a12774d8a6f4e4d8b21afbb6e52af37951aa49 (patch) | |
tree | 89d8a088fad50b4a16c92fe6cbd03c0fa18e6fe4 /libgweather | |
parent | 37d1ea3c5d4abb01f27dea4c5e2c7771eafa3d27 (diff) | |
download | libgweather-e3a12774d8a6f4e4d8b21afbb6e52af37951aa49.tar.gz |
locations: Remove <province> sub-division
It's only used in the Italy, and matches to the description of a
"state" and the GWEATHER_LOCATION_ADM1 level:
@GWEATHER_LOCATION_ADM1: A location representing a "first-level
administrative division"; ie, a state, province, or similar
division.
The only difference between ADM1 and ADM2 levels were that ADM1 levels
are shown in the location entry, whereas ADM2 levels are not.
https://bugzilla.gnome.org/show_bug.cgi?id=792328
Diffstat (limited to 'libgweather')
-rw-r--r-- | libgweather/gweather-location.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libgweather/gweather-location.c b/libgweather/gweather-location.c index e68a737..7d6f922 100644 --- a/libgweather/gweather-location.c +++ b/libgweather/gweather-location.c @@ -60,7 +60,8 @@ * division. * @GWEATHER_LOCATION_ADM2: A location representing a subdivision of a * %GWEATHER_LOCATION_ADM1 location, or a direct subdivision of - * a country that is not represented in a #GWeatherLocationEntry. + * a country that is not represented in a #GWeatherLocationEntry. This + * is not used. * @GWEATHER_LOCATION_CITY: A location representing a city * @GWEATHER_LOCATION_WEATHER_STATION: A location representing a * weather station. @@ -300,11 +301,6 @@ location_new_from_xml (GWeatherParser *parser, GWeatherLocationLevel level, if (!child) goto error_out; g_ptr_array_add (children, child); - } else if (!strcmp (tagname, "province")) { - child = location_new_from_xml (parser, GWEATHER_LOCATION_ADM2, loc); - if (!child) - goto error_out; - g_ptr_array_add (children, child); } else if (!strcmp (tagname, "city")) { child = location_new_from_xml (parser, GWEATHER_LOCATION_CITY, loc); if (!child) |