From 8d483b425f0a46466e3ee8cdb75fb2924c482001 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 5 Oct 2004 05:47:15 +0000 Subject: fix closing import dialog (#11052) --- perl-install/standalone/drakfont | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'perl-install/standalone/drakfont') diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont index 1bf891793..138746f0f 100755 --- a/perl-install/standalone/drakfont +++ b/perl-install/standalone/drakfont @@ -587,12 +587,14 @@ sub font_choice() { my $file_dialog; $select_font_msg = N("Select the font file or directory and click on 'Add'"); $file_dialog = Gtk2::FileSelection->new(N("File Selection")); + $file_dialog->signal_connect(delete_event => sub { print "DESTROY\n"; $file_dialog->response('close') }); $file_dialog->ok_button->signal_connect(clicked => \&file_ok_sel, $file_dialog); $file_dialog->ok_button->set_label(N("Add")); - $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy }); + $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->response('cancel') }); $file_dialog->cancel_button->set_label(N("Close")); $file_dialog->show; $file_dialog->run; + $file_dialog->destroy; } sub file_ok_sel { @@ -607,7 +609,7 @@ sub file_ok_sel { $model->append_set(undef, [ 0 => $file_name ]); } } - Gtk2->main; + $file_selection->response('ok') } sub list_remove() { #- TODO : multi-selection -- cgit v1.2.1