summaryrefslogtreecommitdiff
path: root/gtk/gtktogglebutton.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@src.gnome.org>1999-01-21 00:37:48 +0000
committerJeff Garzik <jgarzik@src.gnome.org>1999-01-21 00:37:48 +0000
commit6e3e247b9a1cdc7fec2197dceda35752f38c8003 (patch)
tree68c8ba7e932c79152d43cb4580fde846eaa102b1 /gtk/gtktogglebutton.c
parentdf21a7064f0c5130d84e035f820eae197024992b (diff)
downloadgtk+-6e3e247b9a1cdc7fec2197dceda35752f38c8003.tar.gz
. Free 'nprefix', closing a memory leak. Spaced out the code a bit to make
. * gtk/gtkcombo.c (gtk_combo_entry_key_press): Free 'nprefix', closing a memory leak. Spaced out the code a bit to make it more readable. * gtk/gtkhbox.[ch] (gtk_hbox_new), gtk/gtkvbox.[ch] (gtk_vbox_new): Change 'homogenous' arg from gint to gboolean. * gtk/gtktogglebutton.[ch]: New function gtk_toggle_button_get_active().
Diffstat (limited to 'gtk/gtktogglebutton.c')
-rw-r--r--gtk/gtktogglebutton.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index 732526cce2..c5fbdb373d 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -267,6 +267,7 @@ gtk_toggle_button_set_mode (GtkToggleButton *toggle_button,
}
}
+
void
gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
gboolean is_active)
@@ -280,6 +281,17 @@ gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
gtk_button_clicked (GTK_BUTTON (toggle_button));
}
+
+gboolean
+gtk_toggle_button_get_active (GtkToggleButton *toggle_button)
+{
+ g_return_val_if_fail (toggle_button != NULL, FALSE);
+ g_return_val_if_fail (GTK_IS_TOGGLE_BUTTON (toggle_button), FALSE);
+
+ return (toggle_button->active) ? TRUE : FALSE;
+}
+
+
void
gtk_toggle_button_toggled (GtkToggleButton *toggle_button)
{