Search: Don't jump to the next result when toggling search options

This commit is contained in:
Clement Lefebvre 2016-12-16 21:35:41 +00:00
parent e3bddd9e80
commit 708d79dbf8
1 changed files with 10 additions and 2 deletions

View File

@ -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 *