> -----Original Message----- > From: gtk-list-bounces@xxxxxxxxx [mailto:gtk-list-bounces@xxxxxxxxx] On > Behalf Of Peter T. Mayer > Sent: Friday, May 07, 2004 12:18 PM > To: gtk-list@xxxxxxxxx > Subject: How to stop signal in the folowing case? > > Hello, > > Lets assume we have two spinbuttons (spinbutton_A and spinbutton_B), if > I change one of the spinbuttons the callback functions: > > void on_spinbutton_A_changed (GtkEditable *editable, gpointer user_data) { if (spinbutton_B.value is not MY_VALUSE) { gtk_spin_button_set_value( spinbutton_B, MY_VALUE ); } > } > > void on_spinbutton_B_changed (GtkEditable *editable, gpointer user_data) { > gtk_spin_button_set_value( spinbutton_A, MY_VALUE ); > } > > are called, now as you can see, this is an never ending recursion. When > I change spinbutton_A, spinbutton_B is changed too and so his callback > function is called and so spinbutton_A is changed ... > > Now the question is, what would be the right way to stop this behavior? > > I tried already to block the signal, but this seems not to give the > desired result. I had the feeling that the events were stored in the > meantime, so that after I called unblock, they were processed. Is there > a general way to stop a widget emitting signals as long as you > manipulating it. > > Thanks, > Peter! > > > _______________________________________________ > > gtk-list@xxxxxxxxx > http://mail.gnome.org/mailman/listinfo/gtk-list _______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list