[epiphany] Always do case-insensitive search
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Always do case-insensitive search
- Date: Wed, 24 Feb 2016 19:16:19 +0000 (UTC)
commit fe3b8ab77b463fb3ee789c2197a0c7c5de0810c9
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date: Tue Feb 23 19:53:52 2016 +0200
Always do case-insensitive search
https://bugzilla.gnome.org/show_bug.cgi?id=722019
embed/ephy-find-toolbar.c | 21 +--------------------
1 files changed, 1 insertions(+), 20 deletions(-)
---
diff --git a/embed/ephy-find-toolbar.c b/embed/ephy-find-toolbar.c
index 2b3405d..54d2c75 100644
--- a/embed/ephy-find-toolbar.c
+++ b/embed/ephy-find-toolbar.c
@@ -168,34 +168,15 @@ tab_search_key_press_cb (WebKitWebView *web_view,
return FALSE;
}
-static gboolean
-str_has_uppercase (const char *str)
-{
- while (str != NULL && *str != '\0') {
- gunichar c;
-
- c = g_utf8_get_char (str);
-
- if (g_unichar_isupper (c))
- return TRUE;
-
- str = g_utf8_next_char (str);
- }
-
- return FALSE;
-}
-
static void
real_find (EphyFindToolbar *toolbar,
EphyFindDirection direction)
{
- WebKitFindOptions options = WEBKIT_FIND_OPTIONS_NONE;
+ WebKitFindOptions options = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE;
if (!g_strcmp0 (toolbar->find_string, ""))
return;
- if (!str_has_uppercase (toolbar->find_string))
- options |= WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE;
if (direction == EPHY_FIND_DIRECTION_PREV)
options |= WEBKIT_FIND_OPTIONS_BACKWARDS;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]