aboutsummaryrefslogtreecommitdiff
path: root/src/gtk-util-routines.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-02-16 16:50:50 +0100
committerThomas White <taw@physics.org>2021-02-16 16:50:50 +0100
commit62c340b78fa1cf1430a9d1ec217f221406c05488 (patch)
treea496aaecd22583d7ffa3ef61abd2801a9d5b167c /src/gtk-util-routines.c
parentd19fc43e9afd46e689d2169bb2320beec750d455 (diff)
Add set_active()
Diffstat (limited to 'src/gtk-util-routines.c')
-rw-r--r--src/gtk-util-routines.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gtk-util-routines.c b/src/gtk-util-routines.c
index efdbc336..8fd9fecb 100644
--- a/src/gtk-util-routines.c
+++ b/src/gtk-util-routines.c
@@ -92,3 +92,9 @@ int i_maybe_disable(GtkWidget *toggle, GtkWidget *widget)
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle)));
return FALSE;
}
+
+
+void set_active(GtkWidget *tb, int active)
+{
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tb), active);
+}