[pygtk] Blocking codes
Jarek Zgoda
jzgoda at o2.pl
Tue Mar 14 05:37:42 WST 2006
Thierry Lam napisał(a):
> Let's say I have the following gui codes:
>
> Popup_window1()
>
> Popup_window2()
>
> Both of the above will start 2 popup windows back to back. Is there a
> way to block the code at Popup_window1() until a button is pressed in
> that window. Once that button is pressed, then I want the
> Popup_window2() to start.
>
>
> An implementation which is similar to gtk.FileChooserDialog.run() is
> what I want.
What you need is an implementation of 2 modal gtk.Dialog descendants.
They have nice feature of blocking execution until their run() method
finish (return).
This way, you may do Popup_window1.run(), then your program will wait
until dialog finishes (i.e. user clicks a dialog button) and then will
return to main loop of execution (i.e. for running next dialog window).
--
Jarek Zgoda
http://jpa.berlios.de/
More information about the pygtk
mailing list