summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-05-03 08:03:45 +0000
committerNorbert Preining <preining@logic.at>2008-05-03 08:03:45 +0000
commit4ba35207bd3275933f850e11bfd3c83453b791cd (patch)
treebe207a450470dbe0963d4774f364b235798ceb65 /Master
parent24dccaf5d9c38ec98cf76d682a03d02dd717c8f1 (diff)
updates to the tlmgr gui
git-svn-id: svn://tug.org/texlive/trunk@7811 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/guinb1.pl20
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/guinb2.pl14
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui2.pl18
3 files changed, 49 insertions, 3 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/guinb1.pl b/Master/texmf/scripts/texlive/tlmgrgui/guinb1.pl
index 0744385220b..5a775db3d3d 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/guinb1.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/guinb1.pl
@@ -76,6 +76,20 @@ $back_f1_f21_lb = $back_f1_f21->Listbox(-width => 30, -height => 24,
-selectmode => "extended",
-yscrollcommand => sub { $back_f1_f21_scry->set(@_); },
-xscrollcommand => sub { $back_f1_f21_scrx->set(@_); } );
+$back_f1_f21_lb->bind('<<ListboxSelect>>',
+ sub { my @selind = $back_f1_f21_lb->curselection;
+ return if (!@selind);
+ my $pkgname = $allpackages[$selind[0]];
+ $pkgname =~ s/^\s*(\(i\) )?//;
+ my $tlp = $tlmediatlpdb->get_package($pkgname);
+ $longdesc = $tlmediatlpdb->get_package($pkgname)->longdesc;
+ $back_f1_f33_t->delete("0.0", "end");
+ if (defined($longdesc)) {
+ $back_f1_f33_t->insert("0.0", "$longdesc");
+ } else {
+ $back_f1_f33_t->insert("0.0", "");
+ }
+ });
# scrollbar .back.f1.f21.scrx -command ".back.f1.f21.lb xview" -orient horizontal
$back_f1_f21_scrx = $back_f1_f21->Scrollbar(
-command => sub { $back_f1_f21_lb->xview(@_); }, -orient => "horizontal");
@@ -189,3 +203,9 @@ sub menu_edit_location {
1;
+### Local Variables:
+### perl-indent-level: 2
+### tab-width: 2
+### indent-tabs-mode: nil
+### End:
+# vim:set tabstop=2 expandtab: #
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/guinb2.pl b/Master/texmf/scripts/texlive/tlmgrgui/guinb2.pl
index e69d307a9b1..6a229852dab 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/guinb2.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/guinb2.pl
@@ -75,6 +75,20 @@ our $back_f2_f21_lb = $back_f2_f21->Listbox(-width => 30, -height => 24,
-selectmode => "extended",
-yscrollcommand => sub { $back_f2_f21_scry->set(@_); },
-xscrollcommand => sub { $back_f2_f21_scrx->set(@_); });
+$back_f2_f21_lb->bind('<<ListboxSelect>>',
+ sub { my @selind = $back_f2_f21_lb->curselection;
+ return if (!@selind);
+ my $pkgname = $allpackages[$selind[0]];
+ $pkgname =~ s/^\s*(\(i\) )?//;
+ my $tlp = $tlmediatlpdb->get_package($pkgname);
+ $longdesc = $tlmediatlpdb->get_package($pkgname)->longdesc;
+ $back_f2_f23_t->delete("0.0", "end");
+ if (defined($longdesc)) {
+ $back_f2_f23_t->insert("0.0", "$longdesc");
+ } else {
+ $back_f2_f23_t->insert("0.0", "");
+ }
+ });
# scrollbar .back.f2.f21.scrx -command ".back.f2.f21.lb xview" -orient horizontal
$back_f2_f21_scrx = $back_f2_f21->Scrollbar(
-command => sub { $back_f2_f21_lb->xview(@_); }, -orient => "horizontal");
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui2.pl b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui2.pl
index 4b80677b6eb..ddd74a939c8 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui2.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui2.pl
@@ -29,7 +29,7 @@ our $back_f2;
our $localtlpdb = TeXLive::TLPDB->new ("root" => "$Master");
die("cannot find tlpdb!") unless (defined($localtlpdb));
-our @alllocalpackages = $localtlpdb->list_packages;
+our @alllocalpackages = filter_out($localtlpdb->list_packages);
setup_programs("$Master/tlpkg/installer", $localtlpdb->option_platform);
our $location = $localtlpdb->option_location;
@@ -88,11 +88,23 @@ sub init_install_media {
} else {
$tlmediasrc = TeXLive::TLMedia->new($newroot);
$tlmediatlpdb = $tlmediasrc->tlpdb;
- @allpackages = $tlmediatlpdb->list_packages;
+ @allpackages = filter_out($tlmediatlpdb->list_packages);
}
}
-
+sub filter_out {
+ my @ret;
+ foreach my $p (@_) {
+ if ($p !~ m;\.;) {
+ if (defined($localtlpdb->get_package($p))) {
+ push @ret, "(i) $p";
+ } else {
+ push @ret, " $p";
+ }
+ }
+ }
+ return(@ret);
+}
__END__