summaryrefslogtreecommitdiff
path: root/Master/tlpkg/installer
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-07-07 20:41:42 +0000
committerNorbert Preining <preining@logic.at>2008-07-07 20:41:42 +0000
commitc345bbaf0f02368643dc7dfce846e8d1938012b2 (patch)
treec108f10a98f2f673dd90a2473c700153cb4979e0 /Master/tlpkg/installer
parent6e1a47c2d9c0da69ac493a6e627bd89676d461a2 (diff)
GUI installer:
- do some magic that the window is always smaller than 800 - scale texlive2008.png a bit smaller git-svn-id: svn://tug.org/texlive/trunk@9345 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer')
-rw-r--r--Master/tlpkg/installer/install-menu-perltk.pl45
-rw-r--r--Master/tlpkg/installer/texlive2008.pngbin22567 -> 32412 bytes
2 files changed, 30 insertions, 15 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl
index 44feb27351b..d659181e797 100644
--- a/Master/tlpkg/installer/install-menu-perltk.pl
+++ b/Master/tlpkg/installer/install-menu-perltk.pl
@@ -62,6 +62,7 @@ if (defined($::opt_lang)) {
}
my $mw;
+my $mainwindow;
my $bintextbutton;
my $schemebutton;
@@ -225,7 +226,9 @@ sub run_menu {
}
debug("setting column widths to a=$a, c=$c\n");
calc_depends;
- $mw = MainWindow->new;
+ $mainwindow = Tk::MainWindow->new;
+ $mw = $mainwindow->Frame;
+
# image frame on the left
my $fl = $mw->Frame(-background => "#0078b8");
@@ -352,25 +355,37 @@ sub run_menu {
-command => sub { do_installation();
$return = $MENU_ALREADYDONE;
$fr->Dialog(-text => $text{'finished'}, -buttons => [ $text{'finbut'} ])->Show;
- $mw->destroy },
+ $mainwindow->destroy },
)->pack(-side => 'left');
my $quitbutton = $f3->Button(
-text => $text{'quit'},
- -command => sub { $return = $MENU_ABORT; $mw->destroy }
+ -command => sub { $return = $MENU_ABORT; $mainwindow->destroy }
)->pack(-side => 'right');
$mw->bind('<Escape>', [ $quitbutton, 'Invoke' ]);
$f3->pack(-expand => 'x');
$::statusbar = $fr->Label(-text => $text{'status'});
$::statusbar->pack;
menu_update_texts();
+ $mw->update;
+ my $rh = $mw->reqheight;
+ # if the window is bigger than 780 (800 - some decorations)
+ # we pack it into a paned frame
+ if (($rh >= 780) && !win32()) {
+ require Tk::Pane;
+ my $foo = $mainwindow->Scrolled("Frame", -scrollbars => "oe", -height => 780);
+ $mw->pack(-in => $foo);
+ $foo->pack;
+ } else {
+ $mw->pack;
+ }
Tk::MainLoop();
return($return);
}
sub menu_edit_vars_value {
my $key = shift;
- my $sw = $mw->Toplevel(-title => $text{'changevar'});
- $sw->transient($mw);
+ my $sw = $mainwindow->Toplevel(-title => $text{'changevar'});
+ $sw->transient($mainwindow);
$sw->grab();
my $val = $vars{$key};
$sw->Label(-text => $text{'enterpath'} . " $key:" . $text{'hinthome'})->pack(-padx => "2m", -pady => "2m");
@@ -388,8 +403,8 @@ sub menu_edit_vars_value {
}
sub menu_select_scheme {
- my $sw = $mw->Toplevel(-title => $labels{'scheme'});
- $sw->transient($mw);
+ my $sw = $mainwindow->Toplevel(-title => $labels{'scheme'});
+ $sw->transient($mainwindow);
$sw->grab();
my @schemes;
foreach my $pkg ($tlpdb->list_packages) {
@@ -432,8 +447,8 @@ sub menu_select_scheme {
}
sub menu_select_standard_collections {
- my $sw = $mw->Toplevel(-title => $labels{'stdcoll'});
- $sw->transient($mw);
+ my $sw = $mainwindow->Toplevel(-title => $labels{'stdcoll'});
+ $sw->transient($mainwindow);
$sw->grab();
my $fb = $sw->Frame;
my $fc = $sw->Frame;
@@ -471,8 +486,8 @@ sub menu_select_standard_collections {
}
sub menu_select_lang_collections {
- my $sw = $mw->Toplevel(-title => $labels{'langcoll'});
- $sw->transient($mw);
+ my $sw = $mainwindow->Toplevel(-title => $labels{'langcoll'});
+ $sw->transient($mainwindow);
$sw->grab();
my $f1 = $sw->Frame;
$f1->pack;
@@ -557,8 +572,8 @@ sub menu_select_symlink {
menu_update_texts();
}
set_unset_buttons();
- my $sw = $mw->Toplevel(-title => $labels{'symlink'});
- $sw->transient($mw);
+ my $sw = $mainwindow->Toplevel(-title => $labels{'symlink'});
+ $sw->transient($mainwindow);
$sw->grab();
$sw->Checkbutton(-variable => \$osym,
-text => $text{'createsym'},
@@ -590,8 +605,8 @@ sub menu_select_symlink {
sub menu_select_binsystems {
our $f2r;
our $f2;
- my $sw = $mw->Toplevel(-title => $labels{'binsys'});
- $sw->transient($mw);
+ my $sw = $mainwindow->Toplevel(-title => $labels{'binsys'});
+ $sw->transient($mainwindow);
$sw->grab();
my @diskarchs = ();
foreach my $key (keys %vars) {
diff --git a/Master/tlpkg/installer/texlive2008.png b/Master/tlpkg/installer/texlive2008.png
index 02a5f799beb..9aefd9648cd 100644
--- a/Master/tlpkg/installer/texlive2008.png
+++ b/Master/tlpkg/installer/texlive2008.png
Binary files differ