[pygtk] button queue
David M. Cook
dave at davidcook.org
Tue Aug 1 00:21:32 WST 2006
On Mon, Jul 31, 2006 at 07:11:56AM -0700, Mr Jason Cupp wrote:
> I am pretty new to pygtk. I wrote a program where there are several
buttons that are connected to a method that plays different wav files using
pymedia. My problem is that if I keep pressing buttons while a wav is being
played, it queues the events and just keeps playing audio files for the
events that were racked up. I want a button to only work when an audio file
is not being played.
===
You should make the button insensitive in your "click" callback, and then
make it sensitive again when the program is ready. If the button action is
also a menu item, you can use the action API. See sections 16.1 and 16.7 of
the tutorial.
Dave Cook
More information about the pygtk
mailing list