After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 591516 - Need some more GWeatherLocation API
Need some more GWeatherLocation API
Status: RESOLVED FIXED
Product: libgweather
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: 2.22.0
Assigned To: libgweather-maint
libgweather-maint
Depends on:
Blocks:
 
 
Reported: 2009-08-12 01:28 UTC by Vincent Untz
Modified: 2009-08-12 09:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[libgweather] Add gweather_location_entry_has_custom_name() (5.02 KB, patch)
2009-08-12 01:28 UTC, Vincent Untz
committed Details | Review
[clock] Make it possible to change the name of a location (13.42 KB, patch)
2009-08-12 01:30 UTC, Vincent Untz
committed Details | Review

Description Vincent Untz 2009-08-12 01:28:47 UTC
The current clock cannot remember a custom name that has been set by a user for a location. This is because of some limitation of the GWeatherLocation API. I'll attach a patch to fix this, and the clock patch to show how it's used (and because bugzilla is a good backup ;-))
Comment 1 Vincent Untz 2009-08-12 01:28:52 UTC
Created attachment 140511 [details] [review]
[libgweather] Add gweather_location_entry_has_custom_name()

Also make gweather_location_entry_set_city() return a boolean to know if
it's successful.
Comment 2 Vincent Untz 2009-08-12 01:30:35 UTC
Created attachment 140512 [details] [review]
[clock] Make it possible to change the name of a location

For this, we need to make a difference between a city of a location, and
the name that is used for it. We save both in gconf (and we gracefully
handle migration from old configurations, of course).
Comment 3 Dan Winship 2009-08-12 03:14:19 UTC
Sure. Although to the extent I've thought about GWeatherLocationEntry at all since 2.24 went out, it's been in the context of throwing it out and replacing it with something that queries geonames.org...
Comment 4 Vincent Untz 2009-08-12 09:13:20 UTC
I renamed the API to gweather_location_entry_has_custom_text() (which is slightly less bad but still not a good name...) and committed everything.

FWIW, I think it makes sense to query geonames.org, but I'm unsure we should completely ditch what we have now -- it's a good "backup" for offline use.