[pygtk] Check if value-changed signal is emitted by user action
Dominic Sacré
dominic.sacre at gmx.de
Tue Feb 26 18:26:24 WST 2008
Hi,
Is it possible to determine if a value-changed signal (e.g. from a gtk.Scale)
is caused by user action, or programmatically by calling set_value()? Or is
there another way to achieve a similar effect?
I'm using the value-changed callback to send the new value to my backend
(asynchronously). But the GUI also needs to respond to notifications from the
backend, by calling set_value().
Now the GUI and the backend updating each other in this way causes all kinds
of problems. I'd like to assume that if the value change is in response to a
notification from the backend, there's no need to send the value to the
backend again. Is there a reasonable way to accomplish this?
Thanks,
Dominic
More information about the pygtk
mailing list