[gnome-clocks] search-provider: Allow searching for named timezones
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] search-provider: Allow searching for named timezones
- Date: Wed, 6 Dec 2017 14:23:46 +0000 (UTC)
commit ba06ecb8f289db73506b2896ead25f87dfb1fea4
Author: Bastien Nocera <hadess hadess net>
Date: Wed Dec 6 15:18:31 2017 +0100
search-provider: Allow searching for named timezones
We don't want to restrict the search to just cities, as we want named
timezones to also appear in the list.
See https://bugzilla.gnome.org/show_bug.cgi?id=692243
https://bugzilla.gnome.org/show_bug.cgi?id=791308
src/search-provider.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/search-provider.vala b/src/search-provider.vala
index a98ecdf..a6c44d3 100644
--- a/src/search-provider.vala
+++ b/src/search-provider.vala
@@ -73,7 +73,9 @@ public class SearchProvider : Object {
GWeather.Location? []locations = location.get_children ();
if (locations != null) {
for (int i = 0; i < locations.length; i++) {
- if (locations[i].get_level () == GWeather.LocationLevel.CITY) {
+ var level = locations[i].get_level ();
+ if (level == GWeather.LocationLevel.CITY ||
+ level == GWeather.LocationLevel.NAMED_TIMEZONE) {
if (location_matches(locations[i], normalized_terms)) {
matches.add (locations[i]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]