diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-02-14 01:06:38 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-02-14 01:06:38 +0000 |
commit | 251105d1307f182f1dfe03ff3dffdcb0a22b956c (patch) | |
tree | dc346fc88c820a40248dd2540f5fafee0f82b831 /drakwizard.pl | |
parent | d310ff22287c5e0bcc8aed1e26e278dbb8d750e6 (diff) | |
download | drakwizard-251105d1307f182f1dfe03ff3dffdcb0a22b956c.tar drakwizard-251105d1307f182f1dfe03ff3dffdcb0a22b956c.tar.gz drakwizard-251105d1307f182f1dfe03ff3dffdcb0a22b956c.tar.bz2 drakwizard-251105d1307f182f1dfe03ff3dffdcb0a22b956c.tar.xz drakwizard-251105d1307f182f1dfe03ff3dffdcb0a22b956c.zip |
add "complete" callback support in order to provide an easy way to
check for errors and reports them through popups
Diffstat (limited to 'drakwizard.pl')
-rwxr-xr-x | drakwizard.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drakwizard.pl b/drakwizard.pl index 46854b0c..4da1cd41 100755 --- a/drakwizard.pl +++ b/drakwizard.pl @@ -91,6 +91,7 @@ sub wizard { exit() if ! $::testing } } + $::in = $in; # so that steps "complete" callbacks can call interactive->ask_warn() :-( my $next = 'welcome'; my @steps; @@ -119,7 +120,7 @@ sub wizard { push @$data2, $d } } - my $a = $in->ask_from($o->{name}, $page->{name}, $data2); + my $a = $in->ask_from($o->{name}, $page->{name}, $data2, if_($page->{complete}, complete => $page->{complete})); if ($a) { push @steps, $next if !$page->{ignore} && $steps[-1] ne $next; $next = defined $page->{post} ? $page->{post}() : 0; |