From 708d79dbf87c4cd1965f5cdb838e7210d13aacb0 Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Fri, 16 Dec 2016 21:35:41 +0000 Subject: [PATCH] Search: Don't jump to the next result when toggling search options --- xed/xed-searchbar.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/xed/xed-searchbar.c b/xed/xed-searchbar.c index dd19917..996b9a7 100755 --- a/xed/xed-searchbar.c +++ b/xed/xed-searchbar.c @@ -481,6 +481,14 @@ find_button_clicked_callback (GtkWidget *button, do_find (searchbar, FALSE, TRUE); } +static void +toggle_button_clicked_callback (GtkWidget *button, + XedSearchbar *searchbar) +{ + remember_search_entry (searchbar); + do_find (searchbar, FALSE, FALSE); +} + static void find_prev_button_clicked_callback (GtkWidget *button, XedSearchbar *searchbar) @@ -631,10 +639,10 @@ xed_searchbar_init (XedSearchbar *searchbar) // Start a search when match-case or entire-word buttons are clicked g_signal_connect (searchbar->priv->entire_word_checkbutton, "clicked", - G_CALLBACK (find_button_clicked_callback), searchbar); + G_CALLBACK (toggle_button_clicked_callback), searchbar); g_signal_connect (searchbar->priv->match_case_checkbutton, "clicked", - G_CALLBACK (find_button_clicked_callback), searchbar); + G_CALLBACK (toggle_button_clicked_callback), searchbar); } GtkWidget *