[libgweather] GWeatherLocationEntry: Make single words match
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather] GWeatherLocationEntry: Make single words match
- Date: Wed, 6 Dec 2017 00:49:08 +0000 (UTC)
commit 2d9cf106a157497ab39d9da8f6e40be111b499c3
Author: Bastien Nocera <hadess hadess net>
Date: Thu Nov 30 20:14:26 2017 +0100
GWeatherLocationEntry: Make single words match
A single word should really be matching against another single word
string.
https://bugzilla.gnome.org/show_bug.cgi?id=791066
libgweather/gweather-location-entry.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libgweather/gweather-location-entry.c b/libgweather/gweather-location-entry.c
index 8655ff8..5af429c 100644
--- a/libgweather/gweather-location-entry.c
+++ b/libgweather/gweather-location-entry.c
@@ -649,7 +649,10 @@ matcher (GtkEntryCompletion *completion, const char *key,
LOC_GWEATHER_LOCATION_ENTRY_COL_LOCAL_COMPARE_NAME, &local_compare_name,
LOC_GWEATHER_LOCATION_ENTRY_COL_ENGLISH_COMPARE_NAME, &english_compare_name,
-1);
- match = match_compare_name (key, local_compare_name) || match_compare_name (key, english_compare_name);
+
+ match = match_compare_name (key, local_compare_name) ||
+ match_compare_name (key, english_compare_name) ||
+ g_ascii_strcasecmp (key, english_compare_name) == 0;
g_free (local_compare_name);
g_free (english_compare_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]