aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-07-10 05:09:05 +0800
committerChristian Persch <chpe@src.gnome.org>2005-07-10 05:09:05 +0800
commit3c6deb0840968471a8f50b35fffec58d1057217e (patch)
treef26c5a8a03d17df1e3358ff7e9ee459738cfc072
parent7274cb593c20c9bc973673c0767693c9cf3023bb (diff)
downloadgsoc2013-epiphany-3c6deb0840968471a8f50b35fffec58d1057217e.tar
gsoc2013-epiphany-3c6deb0840968471a8f50b35fffec58d1057217e.tar.gz
gsoc2013-epiphany-3c6deb0840968471a8f50b35fffec58d1057217e.tar.bz2
gsoc2013-epiphany-3c6deb0840968471a8f50b35fffec58d1057217e.tar.lz
gsoc2013-epiphany-3c6deb0840968471a8f50b35fffec58d1057217e.tar.xz
gsoc2013-epiphany-3c6deb0840968471a8f50b35fffec58d1057217e.tar.zst
gsoc2013-epiphany-3c6deb0840968471a8f50b35fffec58d1057217e.zip
If the string includes uppercase letters, search case-sensitively.
2005-07-09 Christian Persch <chpe@cvs.gnome.org> * src/ephy-find-toolbar.c: (entry_changed_cb): If the string includes uppercase letters, search case-sensitively.
-rw-r--r--ChangeLog6
-rw-r--r--src/ephy-find-toolbar.c14
2 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 734bfb83b..ed85ad63a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-07-09 Christian Persch <chpe@cvs.gnome.org>
+ * src/ephy-find-toolbar.c: (entry_changed_cb):
+
+ If the string includes uppercase letters, search case-sensitively.
+
+2005-07-09 Christian Persch <chpe@cvs.gnome.org>
+
* src/ephy-find-toolbar.c: (ephy_find_toolbar_close):
Don't focus the embed on close on !typeaheadfind,
diff --git a/src/ephy-find-toolbar.c b/src/ephy-find-toolbar.c
index 84ce8ed4d..851041fba 100644
--- a/src/ephy-find-toolbar.c
+++ b/src/ephy-find-toolbar.c
@@ -249,13 +249,21 @@ entry_changed_cb (GtkEntry *entry,
{
EphyFindToolbarPrivate *priv = toolbar->priv;
const char *text;
- gboolean found = TRUE;
+ char *lowercase;
+ gboolean found = TRUE, case_sensitive;
text = gtk_entry_get_text (GTK_ENTRY (priv->entry));
+
+ /* Search case-sensitively iff the string includes
+ * non-lowercase character.
+ */
+ lowercase = g_utf8_strdown (text, -1);
+ case_sensitive = g_utf8_collate (text, lowercase) != 0;
+ g_free (lowercase);
+
+ ephy_embed_find_set_properties (get_find (toolbar), text, case_sensitive);
#ifdef HAVE_TYPEAHEADFIND
found = ephy_embed_find_find (get_find (toolbar), text, priv->links_only);
-#else
- ephy_embed_find_set_properties (get_find (toolbar), text, FALSE);
#endif
set_controls (toolbar, found, found);
}