summaryrefslogtreecommitdiff
path: root/Master/tlpkg/installer/install-menu-perltk.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/installer/install-menu-perltk.pl')
-rw-r--r--Master/tlpkg/installer/install-menu-perltk.pl31
1 files changed, 18 insertions, 13 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl
index f9e6f769a4f..6993e66fa1d 100644
--- a/Master/tlpkg/installer/install-menu-perltk.pl
+++ b/Master/tlpkg/installer/install-menu-perltk.pl
@@ -313,7 +313,7 @@ sub run_menu_perltk {
$f3->Button(
-text => __("Install TeX Live"),
-command => sub { installation_window(); }
- )->pack(-side => 'left', -padx => "2m", -pady => "2m");
+ )->pack(-side => 'left', -padx => "2m", -pady => "2m")->focus();
my $quitbutton = $f3->Button(
-text => __("Quit"),
-command => sub { $return = $MENU_ABORT; $mainwindow->destroy }
@@ -368,6 +368,7 @@ sub installation_window {
-command => sub { $::sww->destroy; $mainwindow->destroy;
do_cleanup(); exit(1); }
)->pack(-pady => "2m");
+ $b->focus();
$f->pack;
do_installation();
$return = $MENU_ALREADYDONE;
@@ -468,7 +469,7 @@ sub menu_edit_vars_value {
}
$sw->Label(-text => __("Enter path for %s (use ~ for %s)", $key, $hint_var))->pack(-padx => "2m", -pady => "2m");
my $entry = $sw->Entry(-textvariable => $val, -width => 60);
- $entry->pack(-padx => "2m", -pady => "2m");
+ $entry->pack(-padx => "2m", -pady => "2m")->focus();
my $f = $sw->Frame;
my $okbutton = $f->Button(-text => __("Ok"),
-command => sub { $val = $entry->get; callback_edit_directories($key,$val) ; $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m");
@@ -493,7 +494,7 @@ sub menu_edit_file_assocs {
$opt->insert("end", $::fileassocdesc[$i]);
}
- $opt->pack(-padx => "2m", -pady => "2m");
+ $opt->pack(-padx => "2m", -pady => "2m")->focus();
my $f = $sw->Frame;
my $okbutton = $f->Button(-text => __("Ok"),
-command => sub {
@@ -539,13 +540,17 @@ sub menu_select_scheme {
my $i = 0;
foreach my $scheme (@schemes) {
my $tlpobj = $tlpdb->get_package("$scheme");
+ my $b;
if ($i < $nrfh) {
- $f2l->Radiobutton(-variable => \$selected, -value => $scheme,
+ $b = $f2l->Radiobutton(-variable => \$selected, -value => $scheme,
-text => $tlpobj->shortdesc)->pack(-anchor => 'w');
} else {
- $f2r->Radiobutton(-variable => \$selected, -value => $scheme,
+ $b = $f2r->Radiobutton(-variable => \$selected, -value => $scheme,
-text => $tlpobj->shortdesc)->pack(-anchor => 'w');
}
+ if ($selected eq $scheme) {
+ $b->focus();
+ }
$i++;
}
$f2l->pack(-side => 'left', -padx => "2m", -pady => "2m");
@@ -586,15 +591,15 @@ sub menu_select_standard_collections {
$f1->pack(-side => 'left', -padx => "2m", -pady => "2m");
$f2->pack(-side => 'right', -padx => "2m", -pady => "2m");
$fb->pack(-padx => "2m", -pady => "2m");
- $fd->pack();
- $fd->Button(-text => __("Select All"),
- -command => sub { select_collections(\%lvars, @collections_std) })->pack(-side => 'left', -padx => "2m", -pady => "2m");
- $fd->Button(-text => __("Deselect All"),
+ $fc->pack();
+ $fc->Button(-text => __("Select All"),
+ -command => sub { select_collections(\%lvars, @collections_std) })->pack(-side => 'left', -padx => "2m", -pady => "2m")->focus();
+ $fc->Button(-text => __("Deselect All"),
-command => sub { deselect_collections(\%lvars, @collections_std) })->pack(-side => 'right', -padx => "2m", -pady => "2m");
- $fc->pack(-expand => 'x', -padx => "2m", -pady => "2m");
- my $okbutton = $fc->Button(-text => __("Ok"),
+ $fd->pack(-expand => 'x', -padx => "2m", -pady => "2m");
+ my $okbutton = $fd->Button(-text => __("Ok"),
-command => sub { %vars = %lvars; callback_select_collection() ; $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m");
- my $cancelbutton = $fc->Button(-text => __("Cancel"),
+ my $cancelbutton = $fd->Button(-text => __("Cancel"),
-command => sub { $sw->destroy })->pack(-side => 'right', -padx => "2m", -pady => "2m");
$sw->bind('<Return>' => [ $okbutton, 'Invoke']);
$sw->bind('<Escape>' => [ $cancelbutton, 'Invoke']);
@@ -629,7 +634,7 @@ sub menu_select_lang_collections {
my $f1langB = $f1lang->Frame;
$f1langB->pack(-expand => 'x');
$f1langB->Button(-text => __("Select All"),
- -command => sub { select_collections(\%lvars, @collections_lang) })->pack(-side => 'left', -padx => "2m", -pady => "2m");
+ -command => sub { select_collections(\%lvars, @collections_lang) })->pack(-side => 'left', -padx => "2m", -pady => "2m")->focus();
$f1langB->Button(-text => __("Deselect All"),
-command => sub { deselect_collections(\%lvars, @collections_lang) })->pack(-side => 'right', -padx => "2m", -pady => "2m");