how to catch window manager close

2010-01-08 Thread Chris Bare
Can anyone point me to a tutorial or something on how to catch the window manager close in GTK? I'm creating an app with glade, and I've got a GtkAboutDialog. my About menu item's activate singal calls gtk_widget_show which works as expected. I've attached gtk_widget hide to the about dialog's

Re: how to catch window manager close

2010-01-08 Thread Tadej Borovšak
Hello. When window is asked to be closed by window manager, it'll will receive delete-event signal. If you wish to prevent your window to be destroyed, simply return TRUE from this function, which will prevent default handler destroying your window. There is also a utility function that will

Re: how to catch window manager close

2010-01-08 Thread Lars Wirzenius
On Fri, 2010-01-08 at 10:43 -0500, Chris Bare wrote: Can anyone point me to a tutorial or something on how to catch the window manager close in GTK? I'm creating an app with glade, and I've got a GtkAboutDialog. my About menu item's activate singal calls gtk_widget_show which works

Re: how to catch window manager close

2010-01-08 Thread David Nečas
On Fri, Jan 08, 2010 at 10:43:22AM -0500, Chris Bare wrote: Can anyone point me to a tutorial or something on how to catch the window manager close in GTK? You must connect to delete-event and return TRUE from the handler to prevent the default Gtk+ handler from being executed and destructing

Re: how to catch window manager close

2010-01-08 Thread Florian Müllner
El vie, 08-01-2010 a las 10:43 -0500, Chris Bare escribió: I'm creating an app with glade, and I've got a GtkAboutDialog. my About menu item's activate singal calls gtk_widget_show which works as expected. Using gtk_dialog_run() instead of gtk_widget_show() will do what you want without