diff options
author | Norbert Preining <preining@logic.at> | 2012-05-16 09:06:54 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2012-05-16 09:06:54 +0000 |
commit | 0e5892eb254fe88bbf099baab4e478a601edbbc0 (patch) | |
tree | af2eff0f7dbf57a86f43b8fc59ad69dab7c06b38 /Master/install-tl | |
parent | 906c243f290039851430ebdb6fcf97f41b0bdda6 (diff) |
install-tl: add sort scheme for presentation function
install-menu-text/perltk: use this function to order the schemes
git-svn-id: svn://tug.org/texlive/trunk@26439 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-x | Master/install-tl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Master/install-tl b/Master/install-tl index dae929aa4f4..5e701e9958c 100755 --- a/Master/install-tl +++ b/Master/install-tl @@ -1807,6 +1807,26 @@ sub select_scheme { calc_depends(); } +# try to give a decent order of schemes, but be so general that +# if we change names of schemes nothing bad happnes (like forgetting one) +sub schemes_ordered_for_presentation { + my @scheme_order; + my %schemes_shown; + for my $s ($tlpdb->schemes) { $schemes_shown{$s} = 0 ; } + # first try the size-name-schemes in decreasing order + for my $sn (qw/full medium small basic minimal/) { + if (defined($schemes_shown{"scheme-$sn"})) { + push @scheme_order, "scheme-$sn"; + $schemes_shown{"scheme-$sn"} = 1; + } + } + # now push all the other schemes if they are there and not already shown + for my $s (sort keys %schemes_shown) { + push @scheme_order, $s if !$schemes_shown{$s}; + } + return @scheme_order; +} + sub update_numbers { $vars{'n_collections_available'}=0; $vars{'n_collections_selected'} = 0; |