diff options
author | Karl Berry <karl@freefriends.org> | 2013-05-11 16:14:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-05-11 16:14:33 +0000 |
commit | 7033bbab7d1e6ece677121219fae978a79d2196b (patch) | |
tree | b01701c136ca26d132f69dbcaead46a95f3164a2 /Master/tlpkg/installer | |
parent | ac93d0106be1df6cc3cd1bfb0101ef7db97a2706 (diff) |
merge language menu into regular collections menu
git-svn-id: svn://tug.org/texlive/trunk@30398 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer')
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 79 | ||||
-rwxr-xr-x | Master/tlpkg/installer/install-menu-text.pl | 90 |
2 files changed, 6 insertions, 163 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index bbb221085d5..c78710a6ee1 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -36,8 +36,6 @@ no utf8; our %vars; our $tlpdb; our @collections_std; -our @collections_lang; -our @collections_lang_doc; our $texlive_release; our @media_available; our $media; @@ -66,7 +64,6 @@ my $mainwindow; my $bin_toggle_button; my $scheme_toggle_button; my $collection_toggle_button; -my $langcoll_toggle_button; my $portable_toggle_button; my $texdir_toggle_button; my $paper_toggle_button; @@ -94,7 +91,6 @@ my $texmfsysvartext; my $texmfsysconfigtext; my $texmfhometext; my $texdirtext; -my $langcoltext; my $optletterstate; my $optfmtstate; my $optsrcstate; @@ -195,7 +191,6 @@ sub change_button_state { $bin_toggle_button->configure(-state => $what); $scheme_toggle_button->configure(-state => $what); $collection_toggle_button->configure(-state => $what); - $langcoll_toggle_button->configure(-state => $what); $portable_toggle_button->configure(-state => $what); $texdir_toggle_button->configure(-state => $what); $texdir_toggle_button->configure(-state => $what); @@ -356,12 +351,6 @@ Please select a different mirror.', $TeXLive::TLConfig::ReleaseYear, $texlive_re $collection_toggle_button = $fr->Button(-text => __("Change"), -command => sub { menu_select_standard_collections(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m"); $row++; - # lang collection line - $fr->Label(-text => __('Language collections'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w'); - $langcoltext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m"); - $langcoll_toggle_button = $fr->Button( -text => __("Change"), -command => sub { menu_select_lang_collections(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m"); - - $row++; $collectionstext = $fr->Label(); $collectionstext->grid(-row => $row, -column => 1, -columnspan => 3); } @@ -857,67 +846,6 @@ sub menu_select_standard_collections { $sw->bind('<Escape>' => [ $cancelbutton, 'Invoke']); } -sub menu_select_lang_collections { - my $sw = $mainwindow->Toplevel(-title => __('Language collections')); - $sw->transient($mainwindow); - $sw->grab(); - my $f1 = $sw->Frame; - $f1->pack; - my $f1lang = $f1->Labelframe(-text => __("Select language support")); - $f1lang->pack(-side => 'left', -padx => "2m", -pady => "2m", -ipadx => "2m", -ipady => "2m"); - my $f1langT = $f1lang->Frame; $f1langT->pack; - my $f1langL = $f1lang->Frame; $f1langL->pack; - my $f1langLa = $f1langL->Frame; $f1langLa->pack(-side => 'left'); - my $f1langLb = $f1langL->Frame; $f1langLb->pack(-side => 'right'); - my $langh = $#collections_lang / 2; - my $i = 0; - my %lvars = %vars; - my %tcl; - for my $cl (@collections_lang) { - my $tlpobj = $tlpdb->get_package($cl); - $tcl{__($tlpobj->shortdesc)} = $cl; - } - foreach my $tcoll (sort keys %tcl) { - my $coll = $tcl{$tcoll}; - if ($i < $langh) { - $f1langLa->Checkbutton(-variable => \$lvars{$coll}, -text => $tcoll) - ->pack(-anchor => 'w'); - } else { - $f1langLb->Checkbutton(-variable => \$lvars{$coll}, -text => $tcoll) - ->pack(-anchor => 'w'); - } - $i++; - } - 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")->focus(); - $f1langB->Button(-text => __("Deselect All"), - -command => sub { deselect_collections(\%lvars, @collections_lang) })->pack(-side => 'right', -padx => "2m", -pady => "2m"); - - my $f2 = $sw->Frame; $f2->pack(-expand => 'x'); - my $okbutton = $f2->Button(-text => __("Ok"), - -command => sub { - # we call the update only if something has changed - my $changed = 0; - for my $k (keys %lvars) { - if ($vars{$k} ne $lvars{$k}) { - $changed = 1; - last; - } - } - if ($changed) { - %vars = %lvars; - callback_select_collection(); - } - $sw->destroy; - })->pack(-side => 'left', -padx => "2m", -pady => "2m"); - my $cancelbutton = $f2->Button(-text => __("Cancel"), - -command => sub { $sw->destroy })->pack(-side => 'right', -padx => "2m", -pady => "2m"); - $sw->bind('<Return>' => [ $okbutton, 'Invoke']); - $sw->bind('<Escape>' => [ $cancelbutton, 'Invoke']); -} - sub menu_select_symlink { our ($lbin,$lman,$linfo); our $osym = $vars{'option_path'}; @@ -1065,13 +993,6 @@ sub menu_set_collections_text { } sub menu_set_pathes_text { - if (check_on_lang_collection_installed()) { - # good - menu_set_text($langcoltext, ""); - } else { - # bad - menu_set_text($langcoltext, __("(no language collection selected!)"), -foreground => "red"); - } if (TeXLive::TLUtils::texdir_check($vars{'TEXDIR'})) { menu_set_text($texdirtext, native_slashify($vars{'TEXDIR'}), -foreground => "black"); } else { diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index e963add563d..11f76ad8f5c 100755 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -17,7 +17,6 @@ our @media_available; our $media; our $previoustlpdb; our @collections_std; -our @collections_lang; our $texlive_release; my $MENU_CONTINUE = -1; @@ -464,76 +463,6 @@ sub collection_menu { } } -sub language_menu { - my %command=( - 'self' => \&language_menu, - 'R' => \&main_menu, - 'Q' => \&quit - ); - - my @languages; - my @lang_keys=string_to_list "abcdefghijklmnopstuvwxyz0123456789"; - my %keyval; - my $lang_index=0; - my $lines; - - menu_head 'Language support:'; - - @languages=sort @collections_lang; - - $lines=@languages/2; - ++$lines if (@languages%2); - for my $index (0..$lines-1) { - my $language=$languages[$index]; - my $tlpobj = $tlpdb->get_package("$language"); - $keyval{$lang_keys[$index]}="$language"; - printf " %s %s %-33s", $lang_keys[$index], button($vars{"$language"}), - substr($tlpobj->shortdesc,0,33); - if (defined $languages[$index+$lines]) { - my $language=$languages[$index+$lines]; - my $tlpobj = $tlpdb->get_package("$language"); - $keyval{$lang_keys[$index+$lines]}="$language"; - printf " %s %s %-32s\n", $lang_keys[$index+$lines], - button($vars{"$language"}), substr($tlpobj->shortdesc,0,32); - } else { - print "\n"; - } - } - - other_options qw (+ - R Q diskspace); - my $answer = prompt 'Enter letter(s) to select language(s)'; - - my @keystrokes=string_to_list $answer; - - foreach my $keystroke (@keystrokes) { - if ($keystroke eq '-') { - for my $collection (@languages) { - $vars{"$collection"}=0 if defined $vars{"$collection"}; - } - } - if ($keystroke eq '+') { - for my $collection (@languages) { - $vars{"$collection"}=1 if defined $vars{"$collection"}; - } - } - if (defined $keyval{$keystroke}) { - toggle "$keyval{$keystroke}"; - } elsif (!defined $command{"\u$answer"}) { - print "Unknown command: $keystroke\n\n"; - } - } - - if (defined $keyval{"$answer"}) { - return $command{'self'}->(); - } - if (defined $command{"\u$answer"}) { - select_scheme("scheme-custom"); - return $command{"\u$answer"}->(); - } else { - return $command{'self'}->(); - } -} - sub directories_menu { @@ -1053,7 +982,6 @@ sub main_menu { if (!$vars{'in_place'}) { $command{'B'} = \&binary_menu if unix(); $command{'C'} = \&collection_menu; - $command{'L'} = \&language_menu; $command{'S'} = \&scheme_menu; } @@ -1061,8 +989,8 @@ sub main_menu { print <<"EOF"; ======================> TeX Live installation procedure <===================== -=======> Note: Letters/digits in <angle brackets> indicate menu items <======= -=======> for commands or configurable options <======= +======> Letters/digits in <angle brackets> indicate <======= +======> menu items for commands or options <======= Detected platform: $this_platform $warn_nobin @@ -1070,20 +998,14 @@ EOF if (!$vars{'in_place'}) { print <<"EOF"; - <B> platforms: $vars{'n_systems_selected'} out of $vars{'n_systems_available'} + <B> binary platforms: $vars{'n_systems_selected'} out of $vars{'n_systems_available'} - <S> installation scheme ($vars{'selected_scheme'}) - $vars{'n_collections_selected'} collections out of $vars{'n_collections_available'}, disk space required: $vars{'total_size'} MB + <S> set installation scheme ($vars{'selected_scheme'}) - Customizing installation scheme: - <C> standard collections - <L> language collections + <C> customizing installation collections + $vars{'n_collections_selected'} collections out of $vars{'n_collections_available'}, disk space required: $vars{'total_size'} MB EOF - if (!check_on_lang_collection_installed()) { - print " !! No language specific collection selected!\n"; - print " !! If you only write American English documents that is fine!\n"; - } } if ($portable_toggled) { print $ptoggle_alert; |