RE: [gtk-list] Re: Getting check button children
- From: "Buch, William H." <bbuch hqm com>
- To: "'gtk-list redhat com'" <gtk-list redhat com>
- Subject: RE: [gtk-list] Re: Getting check button children
- Date: Sat, 11 Jul 1998 21:02:01 -0400
how should i call a mouse event against a check button?  currently i am
doing the following:
gtk_signal_connect(button, "clicked", function, pointer data)
i guess that isn't correct?
-bill
-----Original Message-----
From: Eric Harlow [mailto:linuxgeek@yahoo.com]
Sent: Saturday, July 11, 1998 8:15 PM
To: BBUCH@JERRY.hqm.com
Subject: [gtk-list] Re: Getting check button children
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
-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
/dev/null
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]