… | |
… | |
1875 | on_activate => sub { $QUIT_DIALOG->hide; 0 }, |
1875 | on_activate => sub { $QUIT_DIALOG->hide; 0 }, |
1876 | ); |
1876 | ); |
1877 | $hb->add (new CFPlus::UI::Button |
1877 | $hb->add (new CFPlus::UI::Button |
1878 | text => "Quit anyway", |
1878 | text => "Quit anyway", |
1879 | expand => 1, |
1879 | expand => 1, |
1880 | on_activate => sub { exit }, |
1880 | on_activate => sub { Event::unloop_all }, |
1881 | ); |
1881 | ); |
1882 | } |
1882 | } |
1883 | |
1883 | |
1884 | $QUIT_DIALOG->show; |
1884 | $QUIT_DIALOG->show; |
1885 | $QUIT_DIALOG->grab_focus; |
1885 | $QUIT_DIALOG->grab_focus; |
… | |
… | |
2079 | tooltip => "Terminates the program", |
2079 | tooltip => "Terminates the program", |
2080 | on_activate => sub { |
2080 | on_activate => sub { |
2081 | if ($CONN) { |
2081 | if ($CONN) { |
2082 | open_quit_dialog; |
2082 | open_quit_dialog; |
2083 | } else { |
2083 | } else { |
2084 | exit; |
2084 | Event::unloop_all; |
2085 | } |
2085 | } |
2086 | 0 |
2086 | 0 |
2087 | }, |
2087 | }, |
2088 | ); |
2088 | ); |
2089 | |
2089 | |
… | |
… | |
2292 | } |
2292 | } |
2293 | |
2293 | |
2294 | show_tip_of_the_day if $CFG->{show_tips}; |
2294 | show_tip_of_the_day if $CFG->{show_tips}; |
2295 | |
2295 | |
2296 | Event::loop; |
2296 | Event::loop; |
|
|
2297 | |
|
|
2298 | #video_shutdown; |
|
|
2299 | #audio_shutdown; |
2297 | #CFPlus::SDL_Quit; |
2300 | CFPlus::SDL_Quit; |
2298 | #CFPlus::_exit 0; |
|
|
2299 | |
|
|
2300 | END { |
|
|
2301 | video_shutdown; |
|
|
2302 | audio_shutdown; |
|
|
2303 | CFPlus::SDL_Quit; |
|
|
2304 | CFPlus::DB::Server::stop; |
2301 | CFPlus::DB::Server::stop; |
2305 | } |
|
|
2306 | |
2302 | |
2307 | =head1 NAME |
2303 | =head1 NAME |
2308 | |
2304 | |
2309 | cfplus - A Crossfire TRT and Crossfire game client |
2305 | cfplus - A Crossfire TRT and Crossfire game client |
2310 | |
2306 | |