Connect a signal handler to each button via;
gtk_signal_connect(GTK_OBJECT(radio_button), "clicked",
GTK_SIGNAL_FUNC(check_if_active_button), NULL);
Then within the callback put the following "if" conditional;
void check_if_active_button ( GtkWidget button, gpointer user_data )
{
if ( GTK_TOGGLE_BUTTON(button)->active )
{
/* perform action here */
}
}
[Note: the reason why you need to check for the "active" widget is because the
previously selected button will emit a "clicked" signal when is becomes
"deselected"]
Hope this helps.
-- Stupid Genius
> ----------
> From: Ronald Bultje[SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, February 01, 2001 12:21 PM
> To: [EMAIL PROTECTED]
> Subject: how to get the active button in a GList
>
> hi there,
>
> if I have a group of radio buttons, grouped in a GSList, how would I get
> the "active" button out of this GSList?
>
> Ronald Bultje
>
>
> _______________________________________________
> gtk-list mailing list
> [EMAIL PROTECTED]
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list