summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-05-16 05:28:20 +0000
committerNorbert Preining <preining@logic.at>2012-05-16 05:28:20 +0000
commitb4de05961b642a8957b4c3f668fcaabbebc9722b (patch)
tree54b5db342df955def1d27e6c142e60a53bd26806 /Master
parent3242522a5dc6a704c6e13d8d446c1006bc30c26e (diff)
installer GUI: order schemes from biggest (full) to smallest (minimal)
followed by other schemes followed by custom git-svn-id: svn://tug.org/texlive/trunk@26436 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/installer/install-menu-perltk.pl25
1 files changed, 22 insertions, 3 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl
index 1527a2cc689..b21870ab560 100644
--- a/Master/tlpkg/installer/install-menu-perltk.pl
+++ b/Master/tlpkg/installer/install-menu-perltk.pl
@@ -737,12 +737,31 @@ sub menu_select_scheme {
$vars{"$pkg"}=($vars{'selected_scheme'} eq $pkg)? 1:0;
}
}
- @schemes=sort @schemes;
- push @schemes, "scheme-custom";
+ # 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)
+ my %schemes_shown;
+ for my $s (@schemes) { $schemes_shown{$s} = 0 ; }
+ my @scheme_order;
+ # 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 @schemes) {
+ if (defined($schemes_shown{$s}) && !$schemes_shown{$s}) {
+ push @scheme_order, $s;
+ }
+ }
+ # @schemes=sort @schemes;
+ # add the last one
+ push @scheme_order, "scheme-custom";
my $selected = $vars{'selected_scheme'};
$sw->Label(-text => __("Selected scheme"))->pack(-padx => "2m", -pady => "2m");
my $f2 = $sw->Frame;
- foreach my $scheme (@schemes) {
+ foreach my $scheme (@scheme_order) {
my $desc;
if ($scheme ne "scheme-custom") {
my $tlpobj = $tlpdb->get_package("$scheme");