diff options
author | Norbert Preining <preining@logic.at> | 2008-05-08 22:46:53 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-05-08 22:46:53 +0000 |
commit | e3035f3f1d88d6a9f7ae51db12dbfd85337dee97 (patch) | |
tree | bec72994d8c932bda0969452684bb9d890794ff9 | |
parent | 1b289c4eb375632af5c4e6a1cbb34d6da8e47345 (diff) |
another set of changes
git-svn-id: svn://tug.org/texlive/trunk@7955 c570f23f-e606-0410-a88d-b1316a301751
7 files changed, 41 insertions, 57 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl index c6be80d86da..3d5853a9735 100644 --- a/Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-arch.pl @@ -1,7 +1,7 @@ # gui-arch.pl # $Id$ # -# Copyright 2009 Tomasz Luczak, Norbert Preining +# Copyright 2008 Tomasz Luczak, Norbert Preining # # GUI for tlmgr # diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl index 4873af7ab54..5a44e4d0dd9 100644 --- a/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl @@ -1,7 +1,7 @@ # gui-config.pl # $Id$ # -# Copyright 2009 Tomasz Luczak, Norbert Preining +# Copyright 2008 Tomasz Luczak, Norbert Preining # # GUI for tlmgr # diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-install.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-install.pl index 095221b8b46..578ec6b55be 100644 --- a/Master/texmf/scripts/texlive/tlmgrgui/gui-install.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-install.pl @@ -1,7 +1,7 @@ # guinb1.pl # $Id$ # -# Copyright 2009 Tomasz Luczak, Norbert Preining +# Copyright 2008 Tomasz Luczak, Norbert Preining # # GUI for tlmgr # @@ -21,9 +21,8 @@ our $back_f1_f1_l = $back_f1_f1->Label(-text => 'Adding packages', -foreground => "blue", -font => "helvetica 10 bold"); # label .back.f1.f1.l1 -text "Use Ctrl or Shift or drag to select more" our $back_f1_f1_l1 = $back_f1_f1->Label(-text => "Use Ctrl or Shift or drag to select more"); -# grid .back.f1.f1 -row 1 -column 1 -columnspan 2 -padx 2m -pady 2m -sticky nwe $back_f1_f1->grid(-row => 1, -column => 1, -columnspan => 2, - -padx => "2m", -pady => "2m", -sticky => "nwe"); + -padx => "2m", -pady => "2m", -sticky => "we"); # pack .back.f1.f1.l .back.f1.f1.l1 -side top $back_f1_f1_l->pack(-side => "top"); $back_f1_f1_l1->pack(-side => "top"); @@ -33,72 +32,45 @@ $back_f1_f1_l1->pack(-side => "top"); # listbox: packages #labelframe .back.f1.f21 -text "Select packages to install" our $back_f1_f21 = $back_f1->Labelframe(-text => "Select packages to install"); -# grid .back.f1.f21 -row 2 -column 1 -rowspan 2 \ -# -sticky nswe -padx 2m -pady 1m $back_f1_f21->grid(-row => 2, -column => 1, -rowspan => 3, -sticky => "nswe", -padx => "2m", -pady => "1m"); # search field -# frame .back.f1.f21.f our $back_f1_f21_f = $back_f1_f21->Frame; -# pack .back.f1.f21.f -pady 1m $back_f1_f21_f->pack(-pady => "1m"); -# label .back.f1.f21.f.l -text "Search" our $back_f1_f21_f_l = $back_f1_f21_f->Label(-text => "Search"); -# entry .back.f1.f21.f.e -validate key -validatecommand { -# set searchListAdd [.back.f1.f21.lb get 0 end] -# set listPositionAdd [lsearch $searchListAdd " %P*"] -# if {$listPositionAdd ne -1} then { -# .back.f1.f21.lb yview $listPositionAdd -# .back.f1.f21.lb selection set $listPositionAdd -# } -# return 1 -# } our $back_f1_f21_f_e = $back_f1_f21_f->Entry( -validate => "key", -validatecommand => sub { validate_search_input($back_f1_f21_lb, $back_f1_f33_t, $_[0], @allpackages); }); -# button .back.f1.f21.f.b -text "Next" -command {} our $back_f1_f21_f_b = $back_f1_f21_f->Button(-text => "Next", -command => sub { find_next_search_match($back_f1_f21_lb, $back_f1_f21_f_e, $back_f1_f33_t, @allpackages); }); -# pack .back.f1.f21.f.l .back.f1.f21.f.e .back.f1.f21.f.b \ -# -anchor w -side left -padx 1m -pady 1m $back_f1_f21_f_l->pack(-anchor => "w", -side => "left", -padx => "1m", -pady => "1m"); $back_f1_f21_f_e->pack(-anchor => "w", -side => "left", -padx => "1m", -pady => "1m"); $back_f1_f21_f_b->pack(-anchor => "w", -side => "left", -padx => "1m", -pady => "1m"); -# listbox .back.f1.f21.lb -width 40 -height 24 \ -# -selectmode extended \ -# -yscrollcommand ".back.f1.f21.scry set" \ -# -xscrollcommand ".back.f1.f21.scrx set" our $back_f1_f21_scry; our $back_f1_f21_scrx; -$back_f1_f21_lb = $back_f1_f21->Listbox(-width => 30, -height => 24, +$back_f1_f21_lb = $back_f1_f21->Listbox( -listvariable => \@allpackages, -selectmode => "extended", -yscrollcommand => sub { $back_f1_f21_scry->set(@_); }, -xscrollcommand => sub { $back_f1_f21_scrx->set(@_); } ); $back_f1_f21_lb->bind('<<ListboxSelect>>', sub { update_info_window ($back_f1_f21_lb, $back_f1_f33_t, @allpackages); }); -# 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"); -# scrollbar .back.f1.f21.scry -command ".back.f1.f21.lb yview" -orient vertical $back_f1_f21_scry = $back_f1_f21->Scrollbar( -command => sub { $back_f1_f21_lb->yview(@_); }, -orient => "vertical"); -# pack .back.f1.f21.scrx -side bottom -fill x $back_f1_f21_scrx->pack(-side => "bottom", -fill => "x"); # pack .back.f1.f21.scry -side right -fill y -$back_f1_f21_scry->pack(-side => "right", -fill => "y"); -# pack .back.f1.f21.lb -fill y -expand 1 -$back_f1_f21_lb->pack(-fill => "y", -expand => 1); +$back_f1_f21_scry->pack(-side => "right", -fill => "y", -expand => 0); +$back_f1_f21_lb->pack(-fill => "both", -expand => 1); ######################## row 2 col 3 ## CD-ROM -# labelframe .back.f1.f23 -text "CD/DVD" our $back_f1_f23 = $back_f1->Labelframe(-text => "Installation Source"); -# grid .back.f1.f23 -row 2 -column 3 -sticky nswe -padx 2m -pady 1m -$back_f1_f23->grid(-row => 2, -column => 2, -sticky => "nswe", +$back_f1_f23->grid(-row => 2, -column => 2, -sticky => "we", -padx => "2m", -pady => "1m"); ## CD-ROM @@ -125,25 +97,20 @@ $back_f1_f33->grid(-row => 3, -column => 2, -sticky => "nswe", our $back_f1_f33_scry; -our $back_f1_f33_t = $back_f1_f33->Text(-width => 45, -wrap => "word", +our $back_f1_f33_t = $back_f1_f33->ROText(-width => 45, -wrap => "word", -yscrollcommand => sub { $back_f1_f33_scry->set(@_); }); $back_f1_f33_t->insert("end", "\nAttention. Please check if a DVD drive with the TeX Live DVD\nor the correct network address is properly selected.\n\nFirst fill in the list using the \"Search\" button, then select one or more items and click \"Install\" button."); -#scrollbar .back.f1.f33.scry -command ".back.f1.f33.t yview" -orient vertical $back_f1_f33_scry = $back_f1_f33->Scrollbar( -command => sub { $back_f1_f33_t->yview(@_); }, -orient => "vertical"); -# pack .back.f1.f33.scry -side right -fill y - -$back_f1_f33_scry->pack(-side => "right", -fill => "y"); - -# pack .back.f1.f33.t -expand 1 -fill y +$back_f1_f33_scry->pack(-side => "right", -fill => "y", -expand => 0); $back_f1_f33_t->pack(-expand => 1, -fill => "both"); ############### our $back_f1_buttons = $back_f1->Labelframe(); ### -text => "Buttons"); $back_f1_buttons->grid(-row => 4, -column => 2, - -padx => "2m", -pady => "2m", -sticky => "nswe"); + -padx => "2m", -pady => "2m", -sticky => "we"); ## Buttons # button .back.f1.f22.b1 -text "Install" -command {} @@ -156,10 +123,17 @@ our $back_f1_buttons_install = $back_f1_buttons->Button(-text => "Install", push @pl, $foo; } install_selected_packages(@pl); }); -$back_f1_buttons_install->pack(-expand => 1, -fill => "both", +$back_f1_buttons_install->pack(-expand => 0, -fill => "both", -padx => "2m", -pady => "2m"); +$back_f1->gridRowconfigure(1,-weight => 0); +$back_f1->gridRowconfigure(2,-weight => 0); +$back_f1->gridRowconfigure(3,-weight => 1); +$back_f1->gridRowconfigure(4,-weight => 0); +$back_f1->gridColumnconfigure(1,-weight => 1); +$back_f1->gridColumnconfigure(2,-weight => 1); + 1; diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-remove.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-remove.pl index 210df50fa72..195b81d4384 100644 --- a/Master/texmf/scripts/texlive/tlmgrgui/gui-remove.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-remove.pl @@ -1,7 +1,7 @@ # guinb2.pl # $Id$ # -# Copyright 2009 Tomasz Luczak, Norbert Preining +# Copyright 2008 Tomasz Luczak, Norbert Preining # # GUI for tlmgr # @@ -69,7 +69,7 @@ $back_f2_f21_f_b->pack(-anchor => "w", -side => "left", # -xscrollcommand ".back.f2.f21.scrx set" our $back_f2_f21_scry; our $back_f2_f21_scrx; -our $back_f2_f21_lb = $back_f2_f21->Listbox(-width => 30, -height => 24, +our $back_f2_f21_lb = $back_f2_f21->Listbox(-width => 30, -height => 15, -listvariable => \@alllocalpackages, -selectmode => "extended", -yscrollcommand => sub { $back_f2_f21_scry->set(@_); }, @@ -101,7 +101,7 @@ $back_f2_f23->grid(-row => 2, -column => 2, -sticky => "nswe", # text $f323.t -width 65 -wrap word \ # -yscrollcommand "$f323.scry set" our $back_f2_f23_scry; -our $back_f2_f23_t = $back_f2_f23->Text(-width => 45, -wrap => "word", +our $back_f2_f23_t = $back_f2_f23->ROText(-width => 45, -wrap => "word", -yscrollcommand => sub { $back_f2_f23_scry->set(@_); } ); # $f323.t insert end "\nAttention: to display package information, the CD drive with the TeX Live CD should be selected in the \"Add packages\" tab.\n\nFirst fill in the list using the \"Search\" button, then select an item and click the \"Remove\" button to remove the package." $back_f2_f23_t->insert("end", "\nAttention: to display package information, the CD drive with the TeX Live CD should be selected in the \"Add packages\" tab.\n\nFirst fill in the list using the \"Search\" button, then select an item and click the \"Remove\" button to remove the package."); diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl index 34e2e662833..72342d94dd7 100644 --- a/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-uninstall.pl @@ -1,7 +1,7 @@ # gui-uninstall.pl # $Id$ # -# Copyright 2009 Tomasz Luczak, Norbert Preining +# Copyright 2008 Tomasz Luczak, Norbert Preining # # GUI for tlmgr # diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-update.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-update.pl index c541f50a26e..c206bcc8b1a 100644 --- a/Master/texmf/scripts/texlive/tlmgrgui/gui-update.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-update.pl @@ -1,6 +1,6 @@ # $Id$ # -# Copyright 2009 Tomasz Luczak, Norbert Preining +# Copyright 2008 Tomasz Luczak, Norbert Preining # # GUI for tlmgr # @@ -44,7 +44,7 @@ $back_up_f21_f_b->pack(-anchor => "w", -side => "left", -padx => "1m", -pady => our $back_up_f21_scry; our $back_up_f21_scrx; # there was -height => 24, below -$back_up_f21_lb = $back_up_f21->Listbox(-width => 30, +$back_up_f21_lb = $back_up_f21->Listbox(-width => 30, -height => 15, -listvariable => \@updatepackages, -selectmode => "extended", -yscrollcommand => sub { $back_up_f21_scry->set(@_); }, @@ -83,7 +83,7 @@ $back_up_f33->grid(-row => 3, -column => 2, -sticky => "nswe", our $back_up_f33_scry; -our $back_up_f33_t = $back_up_f33->Text(-width => 45, -wrap => "word", +our $back_up_f33_t = $back_up_f33->ROText(-width => 45, -wrap => "word", -yscrollcommand => sub { $back_up_f33_scry->set(@_); }); $back_up_f33_t->insert("end", "\nAttention. Please check if a DVD drive with the TeX Live DVD\nor the correct network address is properly selected.\n\nFirst fill in the list using the \"Search\" button, then select one or more items and click \"Update all\" or \"Update selected\" button.\n\nNote that only packages which have newer revisions available are shown in the list on the left."); diff --git a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl index 60d3dec65f1..c081673fd67 100755 --- a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui.pl @@ -2,7 +2,7 @@ # # $Id$ # -# Copyright 2009 Tomasz Luczak, Norbert Preining +# Copyright 2008 Tomasz Luczak, Norbert Preining # # GUI for tlmgr # @@ -32,6 +32,7 @@ use Tk; use Tk::Dialog; use Tk::NoteBook; use Tk::BrowseEntry; +use Tk::ROText; my $opt_location; my $opt_debug = 0; @@ -98,7 +99,7 @@ our $back = $mw->NoteBook(-borderwidth => 2, -dynamicgeometry => 1); # pack .top .back -side top -fill both -expand 1 -$top->pack(-side => 'top', -fill => 'both', -expand => 1); +$top->pack(-side => 'top', -fill => 'x', -expand => 0); $back->pack(-side => 'top', -fill => 'both', -expand => 1); require("gui-install.pl"); @@ -192,9 +193,18 @@ sub update_info_window { return if (!@selind); my $pkgname = $l[$selind[0]]; $pkgname =~ s/^\s*(\(i\) )?//; - my $tlp = $tlmediatlpdb->get_package($pkgname); - my $longdesc = $tlmediatlpdb->get_package($pkgname)->longdesc; - my $shortdesc = $tlmediatlpdb->get_package($pkgname)->shortdesc; + my $tlp; + my $longdesc; + my $shortdesc; + if (defined($tlmediatlpdb)) { + $tlp = $tlmediatlpdb->get_package($pkgname); + } else { + $tlp = $localtlpdb->get_package($pkgname); + } + if (defined($tlp)) { + $longdesc = $tlp->longdesc; + $shortdesc = $tlp->shortdesc; + } $longdesc || ($longdesc = "(no long description available)"); $shortdesc || ($shortdesc = "(no short description available)"); $iw->delete("0.0", "end"); |