Re: stopping signals
- From: Paul Davis <paul linuxaudiosystems com>
- To: dave walters <walter8950 yahoo com>
- Cc: gtk-list gnome org
- Subject: Re: stopping signals
- Date: Sun, 16 Nov 2003 14:49:03 -0500
>I have a spin button with a callback function invoked by the "value_changed" s
>ignal.
>The callback func has a gtk_spin_button_set_value(). When this executes it cau
>ses
>the spinner to emit the "value_changed' signal which invokes the callback whic
>h executes set_value() etc. It's recursive. I tried using g_signal_stop_emissi
>on_by_name()
>put in before the set_value() but it didn't work. Any ideas??
spin_button_value_changed ()
{
gfloat val;
if ((val == gtk_spin_button_get_value (spinbutton)) != model_value) {
set_model_value (val);
}
}
model_value_changed ()
{
gfloat val;
if ((val == gtk_spin_button_get_value (spinbutton)) != model_value) {
gtk_spin_button_set_value (spinbutton, model_value);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]