Weather plugin should use a better default station

Bug #302527 reported by Guillaume Desmottes
2
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.

Olivier Tilloy (osomon)
Changed in elisa:
assignee: nobody → osomon
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Olivier Tilloy (osomon) wrote :

This piece of code should be able to retrieve the default station configured in the gnome-clock applet:

import gconf
gconf_client = gconf.client_get_default()
key = '/apps/panel/applets/clock_screen0/prefs/cities'
cities = gconf_client.get_list(key, gconf.VALUE_STRING)
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"/>

Olivier Tilloy (osomon)
Changed in elisa-plugin-weather:
assignee: Olivier Tilloy (osomon) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.