summaryrefslogtreecommitdiffstats
path: root/src/toolbars
diff options
context:
space:
mode:
Diffstat (limited to 'src/toolbars')
-rw-r--r--src/toolbars/find-toolbar.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/toolbars/find-toolbar.c b/src/toolbars/find-toolbar.c
index 0b16ea1..5c6ea9d 100644
--- a/src/toolbars/find-toolbar.c
+++ b/src/toolbars/find-toolbar.c
@@ -32,7 +32,6 @@ struct _MqFindToolbar {
GtkWidget *search_entry;
GtkWidget *matches_label;
gboolean match_case;
- gboolean searching;
WebKitFindController *find_controller;
};
@@ -64,13 +63,11 @@ search(MqFindToolbar *find_toolbar, gboolean forward)
webkit_find_controller_search(find_toolbar->find_controller,
gtk_entry_get_text(GTK_ENTRY(find_toolbar->search_entry)),
find_options, G_MAXUINT);
- find_toolbar->searching = TRUE;
}
static void
search_finished(MqFindToolbar *find_toolbar)
{
- find_toolbar->searching = FALSE;
webkit_find_controller_search_finish(find_toolbar->find_controller);
}
@@ -112,27 +109,13 @@ search_key_press_event_cb(GtkSearchEntry G_GNUC_UNUSED *entry,
static void
prev_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqFindToolbar *find_toolbar)
{
- /* Calling this method before webkit_find_controller_search() or
- * webkit_find_controller_count_matches() is a programming error. */
- if (find_toolbar->searching) {
- webkit_find_controller_search_previous(
- find_toolbar->find_controller);
- } else {
- search(find_toolbar, FALSE);
- }
+ search(find_toolbar, FALSE);
}
static void
next_clicked_cb(GtkButton G_GNUC_UNUSED *button, MqFindToolbar *find_toolbar)
{
- /* Calling this method before webkit_find_controller_search() or
- * webkit_find_controller_count_matches() is a programming error. */
- if (find_toolbar->searching) {
- webkit_find_controller_search_next(
- find_toolbar->find_controller);
- } else {
- search(find_toolbar, TRUE);
- }
+ search(find_toolbar, TRUE);
}
static void
@@ -306,7 +289,6 @@ mq_find_toolbar_init(MqFindToolbar *find_toolbar)
gtk_container_add(GTK_CONTAINER(find_toolbar), box);
find_toolbar->match_case = FALSE;
- find_toolbar->searching = FALSE;
}
GtkWidget *