Re: Catching window.destroy



On Mon, 2007-06-18 at 07:17 +0100, Jon Harrop wrote:
When a user clicks on the "X" of the main window of my GTK app, I'd like to 
handle the signal (e.g. to check for unsaved data). How do I handle this 
signal to prevent the window from disappearing?

connect to the "delete-event" signal; inside the callback, return FALSE
if you want the emission chain to continue, or TRUE if you handled the
event.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net




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