diff --git a/applets/weather/weather.vala b/applets/weather/weather.vala index 3e5edf4..3e62737 100644 --- a/applets/weather/weather.vala +++ b/applets/weather/weather.vala @@ -117,6 +117,8 @@ namespace Weather { var loc = settings.get_value(LOCATIONS); current_location = settings.get_uint(CURRENT_LOC); + if (loc.n_children() < 1) + return; locations = new GWeather.Location[(int)loc.n_children()]; foreach(var item in location_items) dbusmenu.remove_item(item.id); @@ -137,10 +139,7 @@ namespace Weather }); dbusmenu.prepend_item(location_items[i]); } - if (location_items.length > 0) - info.location = locations[current_location]; - else - info.location = GWeather.Location.get_world(); + info.location = locations[current_location]; info.abort(); info.update(); dbusmenu.layout_updated(layout_revision++,0); diff --git a/data/gschemas/org.valapanel.weather.gschema.xml b/data/gschemas/org.valapanel.weather.gschema.xml index c3c5a28..35ced7e 100644 --- a/data/gschemas/org.valapanel.weather.gschema.xml +++ b/data/gschemas/org.valapanel.weather.gschema.xml @@ -1,7 +1,7 @@ - [<(uint32 2, <('Omsk', 'UNOO', true, [(0.95934931799731404, 1.2793263417118435)], [(0.95993108859688125, 1.2810716709638379)])>)>] + [] 0