[epiphany] Update the currently selected item after a case sensitivity change
- From: Benjamin Otte <otte src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [epiphany] Update the currently selected item after a case sensitivity change
- Date: Fri, 14 Aug 2009 21:14:40 +0000 (UTC)
commit ef8c693c89b1ecf9b028d5d75ef8e3113dc26348
Author: Benjamin Otte <otte gnome org>
Date: Fri Aug 14 22:25:37 2009 +0200
Update the currently selected item after a case sensitivity change
Try to keep the currently selected item selected, but if it doesn't
match case, find the next match.
src/ephy-find-toolbar.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/ephy-find-toolbar.c b/src/ephy-find-toolbar.c
index 5de45bb..8cf490e 100644
--- a/src/ephy-find-toolbar.c
+++ b/src/ephy-find-toolbar.c
@@ -404,6 +404,24 @@ case_sensitive_toggled_cb (GtkWidget *check,
}
ephy_find_toolbar_mark_matches (toolbar);
+
+ /*
+ * If we now use the stricter method (and are case sensitive),
+ * check that the current selection still matches. If not, find the
+ * next one.
+ * This currently requires going back and then forward, because
+ * there's no function in WebKit that would verify the current selection.
+ */
+ if (case_sensitive)
+ {
+ EphyEmbedFindResult result;
+
+ result = real_find (toolbar->priv, FALSE);
+ if (result != EPHY_FIND_NOTFOUND)
+ result = real_find (toolbar->priv, TRUE);
+
+ set_status (toolbar, result);
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]