diff options
author | Norbert Preining <preining@logic.at> | 2008-01-16 15:43:23 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-01-16 15:43:23 +0000 |
commit | 32462cf5de6b5658ef79f07c5d2d8201cfeda051 (patch) | |
tree | 273064e3fe7d8dd161626ad85a00c8e7350f23f0 /Master | |
parent | 3fbf2f47f9ad22cc9a5bd3494ff8dbcd7751e140 (diff) |
return a decent value in case of quit, not exit 0
git-svn-id: svn://tug.org/texlive/trunk@6267 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/tlpkg/TeXLive/install-menu-perltk.pl | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/install-menu-perltk.pl b/Master/tlpkg/TeXLive/install-menu-perltk.pl index 790065b9452..742ef8fd457 100644 --- a/Master/tlpkg/TeXLive/install-menu-perltk.pl +++ b/Master/tlpkg/TeXLive/install-menu-perltk.pl @@ -159,10 +159,25 @@ my $srcyesno = $text{'yes'}; my $docyesno = $text{'yes'}; sub run_menu { - my $a = 35; my $b = 35; my $c = 6; + # computing $a: + my $a = 0; + foreach my $l (keys %labels) { + my $l = length($labels{$l}); + $a = $l if ($l > $a); + } + # add one char width for spacing + $a++; + my $b = 35; if (win32()) { - $a = 25; $b = 30; + $b = 30; + } + # computation of $c + my $c = 0; + foreach my $l (qw/change toggle/) { + my $l = length($text{$l}); + $c = $l if ($l > $c); } + tllog($::LOG_DDEBUG, "setting column widhts to a=$a, c=$c\n"); calc_depends; $mw = MainWindow->new; @@ -274,7 +289,7 @@ sub run_menu { )->pack(-side => 'left'); $f3->Button( -text => $text{'quit'}, - -command => sub { exit 0; $return = $MENU_ABORT; $mw->destroy } + -command => sub { $return = $MENU_ABORT; $mw->destroy } )->pack(-side => 'right'); $f3->pack(-expand => 'x'); $::statusbar = $fr->Label(-text => $text{'status'}); |