From 251105d1307f182f1dfe03ff3dffdcb0a22b956c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 14 Feb 2004 01:06:38 +0000 Subject: add "complete" callback support in order to provide an easy way to check for errors and reports them through popups --- drakwizard.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.1