Re: Blocking Main Window destroy siginal



On Sonntag, 19. September 2004 14:52, Jasun Wurster wrote:

Is there a way to block the Window destroy signal so that if the 'x'
button in the main window is clicked it is ignored and the app keeps
running?

Hi,

you can add a delete_event signal handler to the window:

$window->signal_connect (delete_event => sub { 
        close_database_or_whatever_you_want;
        # let the user quit
        Gtk2->main_quit});

Rgds, Jens



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