Re: [gtk-list] Getting check button children
- From: Eric Harlow <linuxgeek yahoo com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Getting check button children
- Date: Sat, 11 Jul 1998 17:15:10 -0700 (PDT)
Without seeing how you're installing the event handler / signal
handler, it's hard to say. Check to see which events the buttons are
handling. The gtk_toggle_button_set_state button does call the
gtk_button_clicked function which, I believe, ends up signaling a
"button_clicked" and if you're listening to it and calling
setStateFalse from there, that might cause an infinite loop to occur.
-Eric
---"Buch, William H." <bbuch@hqm.com> wrote:
>
> I used erics children get procedure and it works. but when i try to
> change the state of the check button, i get into an endless loop and
> then it segment faults on me. here is the code below:
>
> GtkWidget parent = gtk_widget_get_ancestor(widget,
gtk_hbox_get_type());
>
> i have three check boxes packed into a hbox, which i got above. then:
>
> gtk_container_foreach(GTK_CONTAINER(parent),
> (GtkCallback) setStateFalse,
> NULL);
>
> void setStateFalse(GtkWidget *widget, gpointer data)
> {
> if(GTK_IS_TOGGLE_BUTTON(GTK_OBJECT(widget)))
> printf("toggle");
> }
>
> the above works. it prints out three toggle messages which it should
> because there are three toggle buttons.
> but this one doesn't work.
>
> void setStateFalse(GtkWidget *widget, gpointer data)
> {
> if(GTK_IS_TOGGLE_BUTTON(GTK_OBJECT(widget))) {
> gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(widget),
> FALSE);
> }
> }
>
> if i would stick a printf("toggle") into that, i get a lot of toggle
> messages printed to the screen. is there something wrong that i am
> doing? i need to HELP! :)
>
> thanks in advance
>
> Bill
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
/dev/null
>
>
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]