From a635a3a7f9ed9c16ec68131f13639fbd5475ace0 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Wed, 21 Jan 2009 15:26:51 +0000 Subject: Handle closing by window manager --- perl-install/standalone/drakdvb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perl-install/standalone/drakdvb b/perl-install/standalone/drakdvb index bfb3c83df..ef7fdf7ed 100644 --- a/perl-install/standalone/drakdvb +++ b/perl-install/standalone/drakdvb @@ -29,6 +29,7 @@ use Gtk2::SimpleList; my $title = N("DVB"); $ugtk2::wm_icon = "/usr/share/mcc/themes/default/tv-mdk.png"; my $w = ugtk2->new($title); +$w->{window}->signal_connect('destroy' => \&exitapp); $::main_window = $w->{real_window}; my $in = 'interactive'->vnew; @@ -37,7 +38,7 @@ my $config_file = "$ENV{HOME}/.mplayer/channels.conf"; my $channel_list = Gtk2::SimpleList->new(N("Channel")=> "text", "id" => "hidden"); my %buttons; my $pid; -my $_w = ugtk2->new(N("Please wait"), grab => 1); +my $_w; sub get_selected_channel() { my ($index) = $channel_list->get_selected_indices; @@ -71,6 +72,8 @@ sub detect_channels { $buttons{detect}->set_sensitive(1); $channel_list->set_sensitive(1); }; + $_w = ugtk2->new(N("Please wait"), grab => 1); + $_w->{window}->signal_connect('destroy' => \&exitapp); if ($pid = fork()) { gtkadd($_w->{window}, gtkpack($_w->create_box_with_title(N("Detecting DVB channels, this will take a few minutes")), -- cgit v1.2.1