diff options
author | Norbert Preining <preining@logic.at> | 2009-02-04 23:53:18 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-02-04 23:53:18 +0000 |
commit | 5c8afec4982eb3f53cc05cc59a340851ad9be370 (patch) | |
tree | 1dddd349f3bd29ba629544899d877c80e3965032 /Master/tlpkg/installer/install-menu-perltk.pl | |
parent | e2a159a8ffdc2564177dea3d004773e1072fc1d9 (diff) |
make wizard and normal gui switch switch able
git-svn-id: svn://tug.org/texlive/trunk@12082 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer/install-menu-perltk.pl')
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 56 |
1 files changed, 36 insertions, 20 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index ffe2cfbf699..f61e2795186 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -103,26 +103,28 @@ my $optfmtstate; my $optsrcstate; my $optdocstate; -push @::info_hook, - sub { - return unless defined $mainwindow; - update_status(join(" ",@_)); - $mainwindow->update; - }; -push @::warn_hook, - sub { - return unless defined $mainwindow ; - update_status(join(" ",@_)); - $mainwindow->update; - }; -push @::install_packages_hook, \&update_progressbar; -push @::install_packages_hook, - sub { - return unless defined $mainwindow; - return unless defined $::sww; - $mainwindow->update; - $::sww->update; - }; +sub setup_hooks_perltk { + push @::info_hook, + sub { + return unless defined $mainwindow; + update_status(join(" ",@_)); + $mainwindow->update; + }; + push @::warn_hook, + sub { + return unless defined $mainwindow ; + update_status(join(" ",@_)); + $mainwindow->update; + }; + push @::install_packages_hook, \&update_progressbar; + push @::install_packages_hook, + sub { + return unless defined $mainwindow; + return unless defined $::sww; + $mainwindow->update; + $::sww->update; + }; +} sub update_status { my ($p) = @_; @@ -177,6 +179,7 @@ my %text = ( title => 'TeX Live 2008 Installation', finished => 'See TEXDIR/index.html for links to documentation.\nThe TeX Live web site\n(http://tug.org/texlive/) contains any updates and corrections.\nTeX Live is a joint project of the TeX user groups around the world;\nplease consider supporting it by joining the group best for you. The\nlist of groups is available on the web at http://tug.org/usergroups.html.', finishedpath => 'Add TEXDIR/texmf/doc/man to MANPATH.\nAdd TEXDIR/texmf/doc/info to INFOPATH.\nMost importantly, add TEXDIR/bin/PLATFORM\nto your PATH for current and future sessions.', welcome => 'Welcome to TeX Live!', + wizard => 'Go to Wizard', ); @@ -235,6 +238,7 @@ my $docyesno = ( $vars{'option_doc'} ? $text{'yes'} : $text{'no'} ); sub run_menu_perltk { calc_depends(); $mainwindow = Tk::MainWindow->new; + setup_hooks_perltk(); if (!win32()) { require Tk::Pane; @@ -390,6 +394,18 @@ sub run_menu_perltk { -command => sub { $return = $MENU_ABORT; $mainwindow->destroy } )->pack(-side => 'right', -padx => "2m", -pady => "2m"); $mw->bind('<Escape>', [ $quitbutton, 'Invoke' ]); + my $wizardbutton = $f3->Button( + -text => $text{'wizard'}, + -command => sub { + $mainwindow->destroy; + @::warn_hook = (); + @::debug_hook = (); + @::info_hook = (); + @::install_packages_hook = (); + require("installer/install-menu-wizard.pl"); + setup_hooks_wizard(); + $return = run_menu_wizard(); + })->pack(-side => 'right', -padx => "2m", -pady => "2m"); $row++; $f3->grid(-row => $row, -column => 1, -columnspan => 3); menu_update_texts(); |