summaryrefslogtreecommitdiff
path: root/gtk/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/search.c')
-rw-r--r--gtk/search.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/gtk/search.c b/gtk/search.c
index 37b7397c4..3d6bba05d 100644
--- a/gtk/search.c
+++ b/gtk/search.c
@@ -70,10 +70,9 @@ gboolean nsgtk_search_forward_button_clicked(GtkWidget *widget, gpointer data)
(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
nsgtk_scaffolding_search(g)->checkAll)) ?
SEARCH_FLAG_SHOWALL : 0);
- if (browser_window_search_verify_new(bw, &nsgtk_search_callbacks,
- (void *)bw))
- browser_window_search_step(bw, flags, gtk_entry_get_text(
- nsgtk_scaffolding_search(g)->entry));
+
+ browser_window_search(bw, &nsgtk_search_callbacks, (void *)bw, flags,
+ gtk_entry_get_text(nsgtk_scaffolding_search(g)->entry));
return TRUE;
}
@@ -94,10 +93,9 @@ gboolean nsgtk_search_back_button_clicked(GtkWidget *widget, gpointer data)
(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
nsgtk_scaffolding_search(g)->checkAll)) ?
SEARCH_FLAG_SHOWALL : 0);
- if (browser_window_search_verify_new(bw, &nsgtk_search_callbacks,
- (void *)bw))
- browser_window_search_step(bw, flags, gtk_entry_get_text(
- nsgtk_scaffolding_search(g)->entry));
+
+ browser_window_search(bw, &nsgtk_search_callbacks, (void *)bw, flags,
+ gtk_entry_get_text(nsgtk_scaffolding_search(g)->entry));
return TRUE;
}
@@ -120,8 +118,6 @@ gboolean nsgtk_search_entry_changed(GtkWidget *widget, gpointer data)
assert(bw != NULL);
- browser_window_search_destroy_context(bw);
-
nsgtk_search_set_forward_state(true, (void *)bw);
nsgtk_search_set_back_state(true, (void *)bw);
@@ -133,10 +129,8 @@ gboolean nsgtk_search_entry_changed(GtkWidget *widget, gpointer data)
nsgtk_scaffolding_search(g)->checkAll)) ?
SEARCH_FLAG_SHOWALL : 0);
- if (browser_window_search_verify_new(bw, &nsgtk_search_callbacks,
- (void *)bw))
- browser_window_search_step(bw, flags, gtk_entry_get_text(
- nsgtk_scaffolding_search(g)->entry));
+ browser_window_search(bw, &nsgtk_search_callbacks, (void *)bw, flags,
+ gtk_entry_get_text(nsgtk_scaffolding_search(g)->entry));
return TRUE;
}
@@ -158,10 +152,8 @@ gboolean nsgtk_search_entry_activate(GtkWidget *widget, gpointer data)
nsgtk_scaffolding_search(g)->checkAll)) ?
SEARCH_FLAG_SHOWALL : 0);
- if (browser_window_search_verify_new(bw, &nsgtk_search_callbacks,
- (void *)bw))
- browser_window_search_step(bw, flags, gtk_entry_get_text(
- nsgtk_scaffolding_search(g)->entry));
+ browser_window_search(bw, &nsgtk_search_callbacks, (void *)bw, flags,
+ gtk_entry_get_text(nsgtk_scaffolding_search(g)->entry));
return FALSE;
}