[pygtk] Confirm exit dialog

Braulio Ríos braulioriosf at gmail.com
Sat Nov 15 03:10:15 WST 2008


Ok, I've been researching a little more and I found out a magical function
called hide_on_delete which you have to connect to the destroy_event in the
desired window.
For example:

window = gtk.Window()
window.connect('destroy_event', window.hide_on_delete)

And it seems as if this function removes the default function linked to the
window which destroys the window, and calls the hide() method of the window
instead.

On Fri, Nov 14, 2008 at 3:38 PM, Braulio Ríos <braulioriosf en gmail.com>wrote:

> Hi everybody,
> I'd like to know if there is any way to replace the destroy action over a
> window when you press the close button by another event, for example, just
> hiding it instead of destroying it, or show a confirm exit dialog before
> closing.
> Thanks!
>
> --
> Lampar
>
> Mudanza de blog en curso...
>



-- 
Lampar

Mudanza de blog en curso...
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20081114/d5c5b9f4/attachment.htm 


More information about the pygtk mailing list