On Tue, Jan 20, 2004 at 09:31:35AM -0300, Michel Thadeu wrote:
> The problem is that in the 3rd test I need to open a popup window
> calling some user interaction (inserting a floppy)... The popup opens
> but the idle_add stills running (I want the idle_add stops when the
> popup opens and start when the popup closes...

I'm not sure what you mean. You've idle_add()ed a function, and this
function needs to open a popup window? 

Why not call a gtk.mainloop() when your popup is opened? That's the
standard way of waiting for a dialog to run.. something like:

    def my_callback(self, *args):
        # ...
        w = gtk.GtkWindow()
        w.connect("delete_event", gtk.mainquit)
        # You'll need to w.connect() other signals to call mainquit too
        # if the dialog has something like a Close/OK button.

        w.show()
        # This blocks until the popup is closed or deleted
        gtk.mainloop()
        w.hide()

(Normally I'd encapsulate the window creation, show and hide inside a
class like MyDialog which has a run() method that takes care of all of
that and returns a value).

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to