how to catch window manager close



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 close, response and
destroy signal.

The close button works fine, but if you close it with the window manager,
there's apparently some default callback that actually destroys the window, so
the next time I select About from the menu I get the following error:

(spiral:9162): GLib-GObject-WARNING **: invalid unclassed pointer in cast to
`GtkAboutDialog'

I want to be able to catch the close even and just hide the window.
-- 
Chris Bare
chris bareflix com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]