aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gtk-util-routines.c6
-rw-r--r--src/gtk-util-routines.h1
2 files changed, 7 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);
+}
diff --git a/src/gtk-util-routines.h b/src/gtk-util-routines.h
index b2f91e7f..4fa782e9 100644
--- a/src/gtk-util-routines.h
+++ b/src/gtk-util-routines.h
@@ -36,5 +36,6 @@ extern int get_bool(GtkWidget *widget);
extern unsigned int get_uint(GtkWidget *entry);
extern float get_float(GtkWidget *entry);
extern int i_maybe_disable(GtkWidget *toggle, GtkWidget *widget);
+extern void set_active(GtkWidget *tb, int active);
#endif