summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-05-21 00:00:14 +0000
committerNorbert Preining <preining@logic.at>2012-05-21 00:00:14 +0000
commitf5ca71ef24478be2ca71433b0a1d5743b7edb516 (patch)
tree7e5bab832a6d36ad71c64ea12dede729765f626e /Master/texmf
parentbcc3d992e34edef3faac96f69e998a87ae42f795 (diff)
provide list of mirrors also in "load other repository"
git-svn-id: svn://tug.org/texlive/trunk@26520 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui.pl31
1 files changed, 24 insertions, 7 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgrgui.pl b/Master/texmf/scripts/texlive/tlmgrgui.pl
index 08467db383c..9899078a302 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui.pl
@@ -2524,26 +2524,43 @@ sub cb_edit_location {
$sw->transient($mw);
$sw->grab();
$sw->Label(-text => __("Package repository:"))->pack(@p_ii);
- my $entry = $sw->Entry(-text => $location, -width => 30);
- $entry->pack();
+ my @mirror_list;
+ push @mirror_list, TeXLive::TLUtils::create_mirror_list();
+ my $entry = $sw->BrowseEntry(
+ -listheight => 12,
+ -listwidth => 400,
+ -width => 50,
+ -autolistwidth => 1,
+ -choices => \@mirror_list,
+ -browsecmd =>
+ sub {
+ if ($val !~ m/^ /) {
+ $val = "";
+ } elsif ($val =~ m!(http|ftp)://!) {
+ $val = TeXLive::TLUtils::extract_mirror_entry($val);
+ } else {
+ $val =~ s/^\s*//;
+ }
+ },
+ -variable => \$val);
+ # end new
+ $entry->pack(@p_ii);
my $f1 = $sw->Frame;
$f1->Button(-text => __("Choose Directory"),
-command => sub {
my $var = $sw->chooseDirectory();
if (defined($var)) {
- $entry->delete(0,"end");
- $entry->insert(0,$var);
+ $val = $var;
}
})->pack(@left, @p_ii);
$f1->Button(-text => __("Default net package repository"),
-command => sub {
- $entry->delete(0,"end");
- $entry->insert(0,$TeXLiveURL);
+ $val = $TeXLiveURL;
})->pack(@left, @p_ii);
$f1->pack;
my $f = $sw->Frame;
my $okbutton = $f->Button(-text => __("Ok"),
- -command => sub { $location = $entry->get;
+ -command => sub { $location = $val;
$sw->destroy;
setup_location($location);
})->pack(@left, @p_ii);