GNOME Bugzilla – Bug 562141
gweather_location_guess() (GeoClue, hostip, etc integration)
Last modified: 2017-12-01 13:33:53 UTC
We should have an API something like:
GWeatherLocation *gweather_location_guess (void);
that attempts to guess your current location (which could then be used to determine your weather and/or time zone).
This could use GeoClue if available, but if not, it could just fetch http://api.hostip.info/ and extract the longitude and latitude from that.
This could then be used to autopopulate the clock, etc
And we could fallback on translations of various strings if we're not connected to a network (see comment #1 in bug 158630 for a description).
*** Bug 158630 has been marked as a duplicate of this bug. ***
It's better if it's the application's job to do this, combining Geoclue and geocode-glib (though libgweather already has its own implementation for the entry).
Both Clocks and Weather use Geoclue directly now.