diff options
Diffstat (limited to 'Master/tlpkg/dev')
-rw-r--r-- | Master/tlpkg/dev/tlmgrgui2.pl | 44 |
1 files changed, 30 insertions, 14 deletions
diff --git a/Master/tlpkg/dev/tlmgrgui2.pl b/Master/tlpkg/dev/tlmgrgui2.pl index 57d334ccc64..70bf1a0c8cd 100644 --- a/Master/tlpkg/dev/tlmgrgui2.pl +++ b/Master/tlpkg/dev/tlmgrgui2.pl @@ -222,19 +222,16 @@ $filter_status->Radiobutton(-text => "only updated", -variable => \$status_value, -value => $status_only_updated)->pack(@a_w); my $filter_category = $filter_frame->Labelframe(-text => "Category"); -$filter_category->pack(@left, @p_ii); +$filter_category->pack(@left, @x_y, @p_ii); my $show_packages = 1; my $show_collections = 1; my $show_schemes = 1; -my $show_tlcore = 1; $filter_category->Checkbutton(-text => "packages", -variable => \$show_packages)->pack(@a_w); $filter_category->Checkbutton(-text => "collections", -variable => \$show_collections)->pack(@a_w); $filter_category->Checkbutton(-text => "schemes", -variable => \$show_schemes)->pack(@a_w); -$filter_category->Checkbutton(-text => "tlcore", - -variable => \$show_tlcore)->pack(@a_w); my $filter_match = $filter_frame->Labelframe(-text => "Match"); $filter_match->pack(@left, @x_y, @p_ii); @@ -303,9 +300,9 @@ sub update_grid { my @colls; my @packs; for my $p (sort keys %Packages) { - if ($p =~ m;^scheme-;) { + if ($Packages{$p}{'category'} eq "Scheme") { push @schemes, $p; - } elsif ($p =~ m;^collection-;) { + } elsif ($Packages{$p}{'category'} eq "Collection") { push @colls, $p; } else { push @packs, $p; @@ -314,7 +311,7 @@ sub update_grid { my $i = 1; # the number of current lines: my (undef, $curlines) = $g->index(0, 'max'); - for my $p (@rrr, @colls, @packs) { + for my $p (@schemes, @colls, @packs) { if (MatchesFilters($p)) { if (!$g->infoExists(0,$i)) { $g->set(0,$i, -itemtype => 'window', -widget => $g->Checkbutton); @@ -357,10 +354,9 @@ sub MatchesFilters { return 0; } # category - if (($show_packages && ($Packages{$p}{'category'} eq 'Package')) || + if (($show_packages && ($Packages{$p}{'category'} eq 'Other')) || ($show_collections && ($Packages{$p}{'category'} eq 'Collection')) || - ($show_schemes && ($Packages{$p}{'category'} eq 'Scheme')) || - ($show_tlcore && ($Packages{$p}{'category'} eq 'TLCore')) ) { + ($show_schemes && ($Packages{$p}{'category'} eq 'Scheme')) ) { # do nothing, more checks have to be done } else { return 0; @@ -592,7 +588,12 @@ sub setup_list { $Packages{$p}{'localrevision'} = $tlp->revision; $Packages{$p}{'shortdesc'} = $tlp->shortdesc; $Packages{$p}{'installed'} = 1; - $Packages{$p}{'category'} = $tlp->category; + if (($tlp->category eq "Collection") || + ($tlp->category eq "Scheme")) { + $Packages{$p}{'category'} = $tlp->category; + } else { + $Packages{$p}{'category'} = "Other"; + } if (defined($tlp->cataloguedata->{'version'})) { $Packages{$p}{'localcatalogueversion'} = $tlp->cataloguedata->{'version'}; } @@ -608,7 +609,12 @@ sub setup_list { $Packages{$p}{'remoterevision'} = $tlp->revision; # overwrite, we assume that the remove version is better ;-) $Packages{$p}{'shortdesc'} = $tlp->shortdesc; - $Packages{$p}{'category'} = $tlp->category; + if (($tlp->category eq "Collection") || + ($tlp->category eq "Scheme")) { + $Packages{$p}{'category'} = $tlp->category; + } else { + $Packages{$p}{'category'} = "Other"; + } if (defined($tlp->cataloguedata->{'version'})) { $Packages{$p}{'remotecatalogueversion'} = $tlp->cataloguedata->{'version'}; } @@ -625,7 +631,12 @@ sub setup_list { $Packages{$p}{'localrevision'} = $tlp->revision; $Packages{$p}{'shortdesc'} = $tlp->shortdesc; $Packages{$p}{'installed'} = 1; - $Packages{$p}{'category'} = $tlp->category; + if (($tlp->category eq "Collection") || + ($tlp->category eq "Scheme")) { + $Packages{$p}{'category'} = $tlp->category; + } else { + $Packages{$p}{'category'} = "Other"; + } if (defined($tlp->cataloguedata->{'version'})) { $Packages{$p}{'localcatalogueversion'} = $tlp->cataloguedata->{'version'}; } @@ -640,7 +651,12 @@ sub setup_list { $Packages{$p}{'displayname'} = $p; $Packages{$p}{'remoterevision'} = $tlp->revision; $Packages{$p}{'shortdesc'} = $tlp->shortdesc; - $Packages{$p}{'category'} = $tlp->category; + if (($tlp->category eq "Collection") || + ($tlp->category eq "Scheme")) { + $Packages{$p}{'category'} = $tlp->category; + } else { + $Packages{$p}{'category'} = "Other"; + } if (defined($tlp->cataloguedata->{'version'})) { $Packages{$p}{'remotecatalogueversion'} = $tlp->cataloguedata->{'version'}; } |