[pygtk] Disable/enable window close button

John Ehresman jpe at wingware.com
Wed Jun 25 22:28:23 WST 2008


Frédéric wrote:
> Le 25/6/2008, "Adiv" <orion1992_12 at yahoo.com> a écrit:
> 
>> Hmm. I know that two signals are emitted when the exit button is pressed, "delete_event" and "destroy". You could connect the window to both, defining the handlers as simply returning True. Theoretically (at least in my theory) that should just stop the signal there and stop the exit process.
> 
> It does not work... More, once I have closed that dialog, closing the
> main window gives that message:
> 
> RuntimeError: called outside of a mainloop

This may be in the FAQ; please see 
http://faq.pygtk.org/index.py?req=show&file=faq10.006.htp

Cheers,

John


More information about the pygtk mailing list