GNOME Bugzilla – Bug 538464
improved location-selection UI
Last modified: 2008-08-04 13:17:53 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.
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)
committed