Re: 2 questions regarding a perl daemon with a GTK interface



gfricke hushmail com wrote:

Problem 2 - How can I bind the window manager's destroy button "X" at 
the top right corner of the window to my exit function?  My exit 
button currently displays an exit dialog window before exiting the
application, and I would like the same dialog when the user clicks on 
the "X" at the top of the window.
   I tried using the delete_event signal handler with a call to my exit
function, however, this method resulted in destroying the main window 
and then spawning my exit dialog window.
Hi, I reckon that delete_event should do what you want. If you want to
stop the delete happening, return 1 to tell Gtk that you have handled
the signal and to stop there. Otherwise (return undef) allows the
signal to drop through and actually delete the form.

HTH, Dermot






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