summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2014-01-24 01:58:26 +0000
committerNorbert Preining <preining@logic.at>2014-01-24 01:58:26 +0000
commit935659981bc557e4f894692f0998feb9af4c26ce (patch)
treec9eab38890b18492fbecfcfb7ba190710dd97ff0 /Master
parent3069e3d26d44801d191c0ff8bfa9c3b17035a556 (diff)
updates/rewording of tlmgr gui according to Karl
git-svn-id: svn://tug.org/texlive/trunk@32772 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/scripts/texlive/tlmgrgui.pl35
1 files changed, 27 insertions, 8 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgrgui.pl b/Master/texmf-dist/scripts/texlive/tlmgrgui.pl
index 1304098a087..25b7148d7b5 100644
--- a/Master/texmf-dist/scripts/texlive/tlmgrgui.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgrgui.pl
@@ -520,7 +520,7 @@ sub setup_menu_system {
$menu_file->add('command', -label => __("Load cmd line repository:") . " $cmdline_location",
-command => sub { setup_location($cmdline_location); });
}
- $menu_file->add('command', -label => __("Load net repository:") . " $TeXLiveURL",
+ $menu_file->add('command', -label => __("Load standard net repository:") . " $TeXLiveURL",
-command => sub { setup_location($TeXLiveURL); });
if ($mode_expert) {
$menu_file->add('command', -label => __("Load other repository ..."),
@@ -2536,11 +2536,12 @@ sub cb_edit_string_or_dir {
sub cb_edit_location {
my $key = shift;
+ my $okbutton;
my $val;
my $sw = $mw->Toplevel(-title => __("Load package repository"));
$sw->transient($mw);
$sw->grab();
- $sw->Label(-text => __("Package repository:"))->pack(@p_ii);
+ $sw->Label(-text => __("Load this package repository:"))->pack(@p_ii);
my @mirror_list;
push @mirror_list, TeXLive::TLUtils::create_mirror_list();
my $entry = $sw->BrowseEntry(
@@ -2553,33 +2554,51 @@ sub cb_edit_location {
sub {
if ($val !~ m/^ /) {
$val = "";
+ $okbutton->configure(-state => 'disabled');
} elsif ($val =~ m!(http|ftp)://!) {
$val = TeXLive::TLUtils::extract_mirror_entry($val);
+ $okbutton->configure(-state => 'normal');
} else {
$val =~ s/^\s*//;
+ $okbutton->configure(-state => 'normal');
}
},
-variable => \$val);
# end new
$entry->pack(@p_ii);
my $f1 = $sw->Frame;
- $f1->Button(-text => __("Choose Directory"),
+ $f1->Button(-text => __("Choose local directory"),
-command => sub {
my $var = $sw->chooseDirectory();
if (defined($var)) {
$val = $var;
+ $okbutton->configure(-state => 'normal');
}
})->pack(@left, @p_ii);
- $f1->Button(-text => __("Default net package repository"),
+ $f1->Button(-text => __("Use standard net repository"),
-command => sub {
$val = $TeXLiveURL;
+ $okbutton->configure(-state => 'normal');
})->pack(@left, @p_ii);
$f1->pack;
my $f = $sw->Frame;
- my $okbutton = $f->Button(-text => __("Ok"),
- -command => sub { $location = $val;
- $sw->destroy;
- setup_location($location);
+ $okbutton = $f->Button(-text => __("Load"), -state => "disabled",
+ -command => sub {
+ if ($val) {
+ $location = $val;
+ $sw->destroy;
+ my $foo = $mw->Toplevel();
+ $foo->transient($mw);
+ $foo->overrideredirect(1);
+ my $frame = $foo->Frame( -border => 5, -relief => 'groove' )->pack;
+ $frame->Label( -text => __("Loading remote repository - this may take some time, please be patient ...") )->pack( -padx => 5 );
+ $foo->Popup(-popanchor => 'c');
+ setup_location($location);
+ $foo->destroy;
+ } else {
+ # button should be disabled and not clickable
+ # why are we here???
+ }
})->pack(@left, @p_ii);
my $cancelbutton = $f->Button(-text => __("Cancel"),
-command => sub { $sw->destroy })->pack(@right, @p_ii);