diff options
author | Norbert Preining <preining@logic.at> | 2009-10-11 05:03:45 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-10-11 05:03:45 +0000 |
commit | 8f99ebab4c7424618544336fb38e289689ae2890 (patch) | |
tree | 3931f096502cc2fd23f6b03ec7d861d9b8f6fcf7 /Master/tlpkg/installer | |
parent | ac8f312ec5970d3bad6455d07c1ed3e2ce7f2880 (diff) |
make installer kbd-friendly, patch from Alexander Cherepanov with fix
from me.
git-svn-id: svn://tug.org/texlive/trunk@15760 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer')
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 31 | ||||
-rw-r--r-- | Master/tlpkg/installer/install-menu-wizard.pl | 8 |
2 files changed, 22 insertions, 17 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"); diff --git a/Master/tlpkg/installer/install-menu-wizard.pl b/Master/tlpkg/installer/install-menu-wizard.pl index 6ce16a8ed3f..3d69171ed29 100644 --- a/Master/tlpkg/installer/install-menu-wizard.pl +++ b/Master/tlpkg/installer/install-menu-wizard.pl @@ -157,14 +157,14 @@ sub run_menu_wizard { $can = $mw->Button(-width => 10, -relief => "ridge", -text => __('Cancel'), -command => sub { $return = $MENU_ABORT; $mw->destroy; }); - $nxt = $mw->Button(-width => 10, -relief => "ridge", -text => __('Next >')); $prv = $mw->Button(-width => 10, -relief => "ridge", -text => __('< Back')); + $nxt = $mw->Button(-width => 10, -relief => "ridge", -text => __('Next >')); $can->place(-x => $LEFT, -y => ($MHEIGHT - $BOTTOM), -anchor => "sw"); my $rb = $MWIDTH - $RIGHT; $nxt->place(-x => ($MWIDTH - $RIGHT) , - -y => ($MHEIGHT - $BOTTOM), -anchor => "se"); + -y => ($MHEIGHT - $BOTTOM), -anchor => "se")->focus(); reset_start(); @@ -270,7 +270,7 @@ sub change_path { $sw->grab(); $sw->Label(-text => __('Enter path for') . " TEXDIR: ")->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'), -width => 10, -relief => "ridge", @@ -411,7 +411,7 @@ sub wizard_installation_window { for ($fmain->children) { $_->destroy; } - $counter->configure(-text => "4/4"); + $counter->configure(-text => "5/5"); # create a progress bar window # compute the height of the Text by the given font |