summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-07-27 22:19:01 +0000
committerNorbert Preining <preining@logic.at>2008-07-27 22:19:01 +0000
commit5b8e1ac4d3ee6a607787b86d3070ebad62222d7d (patch)
tree55235d7290261a0608635fbdc66e68dee4175f08
parent3288dd73f06b1e9e456433e161226923c4400d10 (diff)
tlmgr gui: more intelligent text in the right pane window, depending on
whether the tlmedia is loaded or not, and whether there are updates or not git-svn-id: svn://tug.org/texlive/trunk@9823 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl2
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgrgui/tlmgrgui-real.pl26
2 files changed, 24 insertions, 4 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl b/Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl
index c4a1547f8bb..f7c62645730 100644
--- a/Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/do_listframe.pl
@@ -167,7 +167,6 @@ sub do_listframe {
$f_textf_text = $f_textf->Scrolled("ROText",
-scrollbars => "e",
-width => 45, -wrap => "word");
- $f_textf_text->insert("end", ___"warningtxt");
$f_textf_text->pack(-expand => 1, -fill => "both");
@@ -216,6 +215,7 @@ sub do_listframe {
$f->gridRowconfigure(3,-weight => 0);
$f->gridColumnconfigure(1,-weight => 1);
$f->gridColumnconfigure(2,-weight => 1);
+ return($f_textf_text);
}
1;
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui-real.pl b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui-real.pl
index aea3aed1729..c209458850b 100755
--- a/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui-real.pl
+++ b/Master/texmf/scripts/texlive/tlmgrgui/tlmgrgui-real.pl
@@ -119,6 +119,8 @@ $TRANS{'en'} = {
reinitlsr => "Reinit file database",
recreateformats => "Recreate all formats",
updatemaps => "Update font map database",
+ warningnonetupdate => "No updates found. Probably because you are installing from a static media. CLick on the avove Change and select the...",
+ pleaseclick => "Please click on an item on the left for details",
};
@@ -325,17 +327,18 @@ require ("do_listframe.pl");
# install screen
our $back_f1 = $back->add("install",-label => ___"install");
$screens{"install"} = $back_f1;
-do_listframe($back_f1,
+my $install_win = do_listframe($back_f1,
___"addpkg",
\@allpackages,
{ install => { -text => ___"installsel",
-command => \&install_selected_packages}},
0,1
);
+set_text_win($install_win, ___"warningtxt");
# update screen
our $back_up = $back->add("update", -label => ___"update");
$screens{"update"} = $back_up;
-do_listframe($back_up,
+my $update_win = do_listframe($back_up,
___"updatepkg",
\@updatepackages,
{ updateall => { -text => ___"updateall",
@@ -347,16 +350,18 @@ do_listframe($back_up,
}},
0,0
);
+set_text_win($update_win, ___"warningtxt");
# remove screen
our $back_f2 = $back->add("remove", -label => ___"remove");
$screens{"remove"} = $back_f2;
-do_listframe($back_f2,
+my $remove_win = do_listframe($back_f2,
___"rempkg",
\@alllocalpackages,
{ remove => { -text => ___"removesel",
-command => \&remove_selected_packages}},
1,1
);
+set_text_win($remove_win, ___"pleaseclick");
# uninstall screen
require("gui-uninstall.pl");
# arch support not be done via tlmgr on win32
@@ -405,10 +410,20 @@ sub init_install_media {
} else {
$tlmediatlpdb = $tlmediasrc->tlpdb;
@allpackages = setup_list(1,$tlmediatlpdb->list_packages);
+ set_text_win($install_win, ___"pleaseclick");
+ set_text_win($remove_win, ___"pleaseclick");
+ set_text_win($update_win, ___"pleaseclick");
}
}
}
+sub set_text_win {
+ my ($w, $t) = @_;
+ $w->delete("0.0", "end");
+ $w->insert("0.0", "$t");
+ $w->see("0.0");
+}
+
sub run_program_show_output {
my $td = $mw->Toplevel(-title => ___"tlmgr process");
$td->transient($mw);
@@ -579,6 +594,11 @@ sub create_update_list {
}
push @ret, $p unless $foundparent;
}
+ # issue a warning if no updates are available, the tlmediatlpdb is loaded
+ # and is not from the net
+ if (($#ret < 0) && ($tlmediasrc->media ne "NET")) {
+ set_text_win($update_win, ___"warningnonetupdate");
+ }
} else {
@ret = ();
}