diff options
author | Thomas White <taw@physics.org> | 2021-02-11 11:35:53 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-02-11 11:35:53 +0100 |
commit | 491839e3f6c099d40633be25ccc375330da0fae5 (patch) | |
tree | 283333e471f0a7ccb2e6433fa0063854a607a73d /src/gtk-util-routines.c | |
parent | f5c4fe0b4566bfac9ec0d8d4946a70644672f1d0 (diff) |
Move i_maybe_disable to GTK utils
Diffstat (limited to 'src/gtk-util-routines.c')
-rw-r--r-- | src/gtk-util-routines.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gtk-util-routines.c b/src/gtk-util-routines.c index e0a2d705..efdbc336 100644 --- a/src/gtk-util-routines.c +++ b/src/gtk-util-routines.c @@ -84,3 +84,11 @@ int get_bool(GtkWidget *widget) { return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); } + + +int i_maybe_disable(GtkWidget *toggle, GtkWidget *widget) +{ + gtk_widget_set_sensitive(GTK_WIDGET(widget), + gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle))); + return FALSE; +} |