[pygtk] spinbutton set value and signal
Raúl Núñez de Arenas Coronado
raul at dervishd.net
Thu Nov 6 05:18:43 WST 2008
Saluton Frédéric :)
On Wed, 5 Nov 2008 21:02:59 +0100, Frédéric dixit:
> On mercredi 05 novembre 2008, Raúl Núñez de Arenas Coronado wrote:
> > If you can elaborate a bit I think we could provide you a better
> > answer.
> In fact, I have 2 spinbuttons, with a handler on each one. When I
> change the value of the first, I need to refresh the second, and
> changing the second must update the first. But the way they are
> refreshed is not symetrical; that's why I need to stop the signal
> when the value is changed from teh code (with set_value() method).
> You idea seems fine, but I don't see how to implement it, as I use
> glade for building gui, and wTree.signal_autoconnect(myDict) to
> connect signals... Any idea?
Instead of my original idea, you can disconnect the handler of each
spinner before changing its value by program and reconnect it
afterwards, but you will need to know the handler_id for that, and if
you know the handler_id you can block the signal, as you say.
I haven't ever use Glade, so I don't know if it is possible to know the
Without knowing the handler_id, maybe you can use "stop_emission()" just
after using "set_value()"?
I think your best bet is to investigate how to access the handler_id
under Glade. It should be possible, but I cannot help you with that, my
experience with Glade is zero...
Raúl "DervishD" Núñez de Arenas Coronado
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!
We are waiting for 13 Feb 2009 23:31:30 +0000 ...
More information about the pygtk