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 538464 - improved location-selection UI
improved location-selection UI
Status: RESOLVED FIXED
Product: libgweather
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: 2.22.0
Assigned To: libgweather-maint
libgweather-maint
Depends on:
Blocks:
 
 
Reported: 2008-06-15 16:17 UTC by Dan Winship
Modified: 2008-08-04 13:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GWeatherLocationEntry, work-in-progress (28.49 KB, patch)
2008-06-15 16:19 UTC, Dan Winship
none Details | Review

Description Dan Winship 2008-06-15 16:17:28 UTC
We need a nicer UI for entering a location, and it should go in libgweather rather than being in intlclock, so it can be used by other apps too.
Comment 1 Dan Winship 2008-06-15 16:19:37 UTC
Created attachment 112785 [details] [review]
GWeatherLocationEntry, work-in-progress

The attached patch creates a GWeatherLocationEntry, which is a GtkEntry with a GtkEntryCompletion using the Locations.xml data. So you can type "atl", and it will show:

    Atlanta (De Kalb-Peachtree Airport), Georgia, United States
    Atlanta (Fulton County Airport), Georgia, United States
    Atlanta (Hartsfield Airport), Georgia, United States
    Atlanta (Peachtree City), Georgia, United States
    Atlantic City (Atlantic City), New Jersey, United States
    Atlantic, Iowa, United States

(The double "Atlantic City" is a bug.)

Or you can type "india", and it will show:

    Ahmadabad, India
    Amritsar, India
    Andersen, Indiana, United States
    Bangalore/Hindustan, India
    Bloomington, Indiana, United States
    ...

which obviously needs to be sorted differently, but it at least shows the idea; people can try entering a city name first, and if there are no matches for it, they can try entering a region or country name instead.

Combined with the stuff in bug 527592 to sort <location>s within a <city> by distance from the city center, this would also implicitly fix bug 527593.

Besides the sorting fixes, another obvious improvement would be to make the completion recognize well-known abbreviations (eg, postal abbreviations for states/provinces, or words like "Saint", "Fort", "West", etc that are sometimes abbreviated in city names and sometimes not).

(This patch overlaps with the patch in bug 529054)
Comment 2 Dan Winship 2008-08-04 13:17:53 UTC
committed