Comment 1 for bug 302527

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"/>