Weather plugin should use a better default station
Bug #302527 reported by
Guillaume Desmottes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Elisa weather plugin |
Confirmed
|
Medium
|
Unassigned |
Bug Description
The Weather plugin should use the station configured in my gnome-clock applet by default. If there is not, it could probably choose one of my country.
Changed in elisa: | |
assignee: | nobody → osomon |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in elisa-plugin-weather: | |
assignee: | Olivier Tilloy (osomon) → nobody |
To post a comment you must log in.
This piece of code should be able to retrieve the default station configured in the gnome-clock applet:
import gconf get_default( ) panel/applets/ clock_screen0/ prefs/cities' get_list( key, gconf.VALUE_STRING)
gconf_client = gconf.client_
key = '/apps/
cities = gconf_client.
default_city = cities[0]
default_city contains the information needed as a piece of XML that looks like this:
<location name="Barcelona /Airport" timezone= "Europe/ Madrid" latitude= "41.283333" longitude= "2.066667" code="LEBL" current="true"/>