devhelp r1018 - in trunk: . src
- From: atoker svn gnome org
- To: svn-commits-list gnome org
- Subject: devhelp r1018 - in trunk: . src
- Date: Sat, 31 May 2008 22:28:34 +0000 (UTC)
Author: atoker
Date: Sat May 31 22:28:34 2008
New Revision: 1018
URL: http://svn.gnome.org/viewvc/devhelp?rev=1018&view=rev
Log:
2008-05-31 Alp Toker <alp nuanti com>
* src/dh-window.c: Add text search support.
Modified:
trunk/ChangeLog
trunk/src/dh-window.c
Modified: trunk/src/dh-window.c
==============================================================================
--- trunk/src/dh-window.c (original)
+++ trunk/src/dh-window.c Sat May 31 22:28:34 2008
@@ -696,22 +696,15 @@
DhWindow *window)
{
DhWindowPriv *priv;
- WebKitWebView *web_view;
+ WebKitWebView *web_view;
priv = window->priv;
-
web_view = window_get_active_web_view (window);
- // FIXME: WebKit
- /*
- webkit_web_view_search_find (
- web_view, egg_find_bar_get_search_string (EGG_FIND_BAR (priv->findbar)));
- webkit_web_view_search_set_case_sensitive (
- web_view, egg_find_bar_get_case_sensitive (EGG_FIND_BAR (priv->findbar)));
- */
-
gtk_widget_show (priv->findbar);
gtk_widget_grab_focus (priv->findbar);
+
+ webkit_web_view_set_highlight_text_matches (web_view, TRUE);
}
static void
@@ -1107,15 +1100,20 @@
DhWindow *window)
{
DhWindowPriv *priv;
- WebKitWebView *web_view;
+ WebKitWebView *web_view;
priv = window->priv;
-
web_view = window_get_active_web_view (window);
- //FIXME: WebKit
- //webkit_web_view_search_find (web_view,
- // egg_find_bar_get_search_string (EGG_FIND_BAR (priv->findbar)));
+ webkit_web_view_unmark_text_matches (web_view);
+ webkit_web_view_mark_text_matches (web_view,
+ egg_find_bar_get_search_string (EGG_FIND_BAR (priv->findbar)),
+ egg_find_bar_get_case_sensitive (EGG_FIND_BAR (priv->findbar)), 0);
+ webkit_web_view_set_highlight_text_matches (web_view, TRUE);
+
+ webkit_web_view_search_text (
+ web_view, egg_find_bar_get_search_string (EGG_FIND_BAR (priv->findbar)),
+ egg_find_bar_get_case_sensitive (EGG_FIND_BAR (priv->findbar)), TRUE, TRUE);
}
static void
@@ -1124,52 +1122,48 @@
DhWindow *window)
{
DhWindowPriv *priv;
- WebKitWebView *web_view;
+ WebKitWebView *web_view;
priv = window->priv;
-
web_view = window_get_active_web_view (window);
- // FIXME: WebKit
- /*
- webkit_web_view_search_set_case_sensitive (
- web_view,
- egg_find_bar_get_case_sensitive (EGG_FIND_BAR (priv->findbar)));
- */
+ webkit_web_view_unmark_text_matches (web_view);
+ webkit_web_view_mark_text_matches (web_view, egg_find_bar_get_search_string (EGG_FIND_BAR (priv->findbar)), egg_find_bar_get_case_sensitive (EGG_FIND_BAR (priv->findbar)), 0);
+ webkit_web_view_set_highlight_text_matches (web_view, TRUE);
}
static void
window_find_next_cb (GtkEntry *entry,
DhWindow *window)
{
- WebKitWebView *web_view;
- DhWindowPriv *priv = window->priv;
+ DhWindowPriv *priv;
+ WebKitWebView *web_view;
priv = window->priv;
+ web_view = window_get_active_web_view (window);
gtk_widget_show (priv->findbar);
- web_view = window_get_active_web_view (window);
-
- //FIXME: WebKit
- //webkit_web_view_search_find_again (web_view, FALSE);
+ webkit_web_view_search_text (
+ web_view, egg_find_bar_get_search_string (EGG_FIND_BAR (priv->findbar)),
+ egg_find_bar_get_case_sensitive (EGG_FIND_BAR (priv->findbar)), TRUE, TRUE);
}
static void
window_find_previous_cb (GtkEntry *entry,
DhWindow *window)
{
- WebKitWebView *web_view;
- DhWindowPriv *priv = window->priv;
+ DhWindowPriv *priv;
+ WebKitWebView *web_view;
priv = window->priv;
+ web_view = window_get_active_web_view (window);
gtk_widget_show (priv->findbar);
- web_view = window_get_active_web_view (window);
-
- // FIXME: WebKit
- //webkit_web_view_search_find_again (web_view, TRUE);
+ webkit_web_view_search_text (
+ web_view, egg_find_bar_get_search_string (EGG_FIND_BAR (priv->findbar)),
+ egg_find_bar_get_case_sensitive (EGG_FIND_BAR (priv->findbar)), FALSE, TRUE);
}
static void
@@ -1177,10 +1171,14 @@
DhWindow *window)
{
DhWindowPriv *priv;
+ WebKitWebView *web_view;
priv = window->priv;
+ web_view = window_get_active_web_view (window);
gtk_widget_hide (priv->findbar);
+
+ webkit_web_view_set_highlight_text_matches (web_view, FALSE);
}
#if 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]