summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/tlpkg/installer/install-menu-perltk.pl8
-rw-r--r--Master/tlpkg/installer/install-menu-wizard.pl8
2 files changed, 14 insertions, 2 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl
index 5ff59b27a47..7420160ad98 100644
--- a/Master/tlpkg/installer/install-menu-perltk.pl
+++ b/Master/tlpkg/installer/install-menu-perltk.pl
@@ -90,6 +90,11 @@ $::run_menu = \&run_menu_perltk;
# ##################################################################
+sub menu_abort {
+ $return = $MENU_ABORT;
+ $mainwindow->destroy;
+}
+
sub setup_hooks_perltk {
@::info_hook = ();
push @::info_hook,
@@ -134,6 +139,7 @@ sub update_progressbar {
sub run_menu_perltk {
calc_depends();
$mainwindow = Tk::MainWindow->new;
+ $mainwindow->protocol('WM_DELETE_WINDOW' => \&menu_abort);
setup_hooks_perltk();
if (!win32()) {
@@ -316,7 +322,7 @@ sub run_menu_perltk {
)->pack(-side => 'left', -padx => "2m", -pady => "2m")->focus();
my $quitbutton = $f3->Button(
-text => __("Quit"),
- -command => sub { $return = $MENU_ABORT; $mainwindow->destroy }
+ -command => \&menu_abort,
)->pack(-side => 'right', -padx => "2m", -pady => "2m");
$mw->bind('<Escape>', [ $quitbutton, 'Invoke' ]);
#my $wizardbutton = $f3->Button(
diff --git a/Master/tlpkg/installer/install-menu-wizard.pl b/Master/tlpkg/installer/install-menu-wizard.pl
index 9be6c2697d4..b38e52a4897 100644
--- a/Master/tlpkg/installer/install-menu-wizard.pl
+++ b/Master/tlpkg/installer/install-menu-wizard.pl
@@ -92,6 +92,11 @@ $::run_menu = \&run_menu_wizard;
# From here on only function definitions
# ####################################################################
+sub menu_abort {
+ $return = $MENU_ABORT;
+ $mw->destroy;
+}
+
sub setup_hooks_wizard {
@::info_hook = ();
push @::info_hook,
@@ -128,6 +133,7 @@ sub wizard_update_progressbar {
sub run_menu_wizard {
$mw = Tk::MainWindow->new(-width => $MWIDTH, -height => $MHEIGHT);
+ $mw->protocol('WM_DELETE_WINDOW' => \&menu_abort);
setup_hooks_wizard();
$dest = $vars{'TEXDIR'};
@@ -156,7 +162,7 @@ sub run_menu_wizard {
$can = $mw->Button(-width => 10, -relief => "ridge", -text => __('Cancel'),
- -command => sub { $return = $MENU_ABORT; $mw->destroy; });
+ -command => \&menu_abort);
$prv = $mw->Button(-width => 10, -relief => "ridge", -text => __('< Back'));
$nxt = $mw->Button(-width => 10, -relief => "ridge", -text => __('Next >'));