summaryrefslogtreecommitdiffstats
path: root/drakwizard.pl
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-02-14 01:06:38 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-02-14 01:06:38 +0000
commit251105d1307f182f1dfe03ff3dffdcb0a22b956c (patch)
treedc346fc88c820a40248dd2540f5fafee0f82b831 /drakwizard.pl
parentd310ff22287c5e0bcc8aed1e26e278dbb8d750e6 (diff)
downloaddrakwizard-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-xdrakwizard.pl3
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;