[pygtk] hide on delete_event()

Frédéric frederic.mantegazza at gbiloba.org
Fri Dec 19 17:23:33 WST 2008


Le 5/12/2008, "Christian Becke" <christianbecke at web.de> a écrit:

>Peyman schrieb:
>> I have tried every variation, but I will try it once again...Nope,
>> still doesn't work. I tried returning: True, False, 0, 1, gtk.TRUE,
>> and gtk.FALSE
>
>This works for me (python 2.5.2, pygtk 2.13.0, gtk 2.14.4):

I'm trying to block the delete event when hitting the X box of a dialog.

It seems that all documentation related to that point refer to gtk.Window
widgets, and it works fine. But if the main window opens a gtk.Dialog,
then, it is impossible to avoid this dialog to be destroyed when hitting
its X box: even if event-delete callback returns True, the signal is
propagated, and the destroy signal is emited.

Why? Is there a way to avoid that?

--
   Frédéric


More information about the pygtk mailing list