diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-11-12 18:17:25 (EST) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-11-12 18:17:25 (EST) |
commit | bbdd51471fbd3d081c3cec1c1cf882e9b8cde34b (patch) | |
tree | 81fc06fc154581975e40f00679726cc962d532b3 | |
parent | 88e7b2b199332c387fd47347c8723aaf4e1d0255 (diff) | |
download | marquee-bbdd51471fbd3d081c3cec1c1cf882e9b8cde34b.zip marquee-bbdd51471fbd3d081c3cec1c1cf882e9b8cde34b.tar.gz marquee-bbdd51471fbd3d081c3cec1c1cf882e9b8cde34b.tar.bz2 |
MqFindToolbar: Don't call webkit_find_controller_search_next()
Or webkit_find_controller_search_previous().
-rw-r--r-- | src/toolbars/find-toolbar.c | 22 |
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 * |