Disable start of word checkbox when whole word checkbox is enabled
This commit is contained in:
parent
14878850cd
commit
fd8ba60b4a
12
src/search.c
12
src/search.c
@ -283,6 +283,14 @@ void search_finalize(void)
|
||||
}
|
||||
|
||||
|
||||
static void on_widget_toggled_set_insensitive(
|
||||
GtkToggleButton *togglebutton, gpointer user_data)
|
||||
{
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(user_data),
|
||||
!gtk_toggle_button_get_active(togglebutton));
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget *add_find_checkboxes(GtkDialog *dialog)
|
||||
{
|
||||
GtkWidget *checkbox1, *checkbox2, *check_regexp, *check_back, *checkbox5,
|
||||
@ -336,6 +344,10 @@ static GtkWidget *add_find_checkboxes(GtkDialog *dialog)
|
||||
ui_hookup_widget(dialog, checkbox5, "check_wordstart");
|
||||
gtk_button_set_focus_on_click(GTK_BUTTON(checkbox5), FALSE);
|
||||
|
||||
/* disable wordstart when wholeword is checked */
|
||||
g_signal_connect(checkbox2, "toggled",
|
||||
G_CALLBACK(on_widget_toggled_set_insensitive), checkbox5);
|
||||
|
||||
/* Matching options */
|
||||
mbox = gtk_vbox_new(FALSE, 0);
|
||||
gtk_container_add(GTK_CONTAINER(mbox), checkbox1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user