"Mark R. Rubin" <[EMAIL PROTECTED]> writes: 
> o Someone (Havoc??) must know the right solution to this problem.
>

It depends on the situation. Some approaches are:

 - gtk_signal_handler_block (g_signal_handlers_block, and by_func variants)
 - don't do anything in the callback if the value hasn't changed:
    if (current_state == gtk_toggle_button_get_active (toggle))
      return;
 - fill in the default state of controls before you connect the 
   callbacks to them

You can also use a global flag or a flag specific to a class/object, 
but I don't like that approach much personally.

Most signals indicate that the state of an object has changed, not
that it has changed due to some specific cause (e.g. user input). 
This is the right thing IMO for reasons of conceptual cleanliness;
there would be lots of subtle tricky bugs otherwise. In any case it's
too late to change this aspect of GTK.

Havoc

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to