diff options
author | Arnaud Desmons <adesmons@mandriva.com> | 2002-08-02 15:13:47 +0000 |
---|---|---|
committer | Arnaud Desmons <adesmons@mandriva.com> | 2002-08-02 15:13:47 +0000 |
commit | 64f9dabca60dc279a29cfa31dd1f5a4ca45edb7c (patch) | |
tree | 8b8878b3b8f2eda1efd86f44ffc9177a890f9def | |
parent | e505c007ae0aef872b88ca6f00f513f4875b3562 (diff) | |
download | drakwizard-64f9dabca60dc279a29cfa31dd1f5a4ca45edb7c.tar drakwizard-64f9dabca60dc279a29cfa31dd1f5a4ca45edb7c.tar.gz drakwizard-64f9dabca60dc279a29cfa31dd1f5a4ca45edb7c.tar.bz2 drakwizard-64f9dabca60dc279a29cfa31dd1f5a4ca45edb7c.tar.xz drakwizard-64f9dabca60dc279a29cfa31dd1f5a4ca45edb7c.zip |
improved subWizard by catching cancel and fixed cancel warnings
-rwxr-xr-x | drakwizard.pl | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/drakwizard.pl b/drakwizard.pl index 039e69ba..7ddcdeb1 100755 --- a/drakwizard.pl +++ b/drakwizard.pl @@ -107,11 +107,12 @@ sub display { $::Wizard_no_previous = 1; $in->ask_okcancel(translate($page->{name}), translate($page->{info})) or quit_global($in, 0); - $in->exit; - } elsif (!$page->{freetext}) { + die; + } + elsif (!$page->{freetext}) { $in->ask_okcancel(translate($page->{name}), - translate($page->{info})) or navigation($o, $page->{old_page}); - } + translate($page->{info})) or navigation($o, $page->{old_page}); + } else { my $valeur; my @liste; @@ -169,7 +170,7 @@ sub navigation { find_page($o, $page->{jumpPage}), $page->{old_page}; } } - elsif($page->{jumpScript}) { + elsif ($page->{jumpScript}) { system("source $lib_script ; $page->{jumpScript}"); if ($page->{Target}->{jumpIndex}) { $? = $? >> 8; @@ -179,11 +180,13 @@ sub navigation { $page->{next_page}, $page->{old_page}; } } - elsif($page->{subWizard}) { - my $o = []; - my $xmltree = XML::Parser->new(Style => 'Tree')->parsefile($page->{subWizard}); - get_parameter($o, $xmltree); - eval { navigation($o, $o->[0]); }; + elsif ($page->{subWizard}) { + my $sub_o = []; + my $sub_xmltree = XML::Parser->new(Style => 'Tree')->parsefile($page->{subWizard}); + get_parameter($sub_o, $sub_xmltree); + eval { navigation($sub_o, $sub_o->[0]); }; + $in->exit if $@ =~ /wizcancel/; + $o->[0], undef; } else { $page->{next_page}, $page; @@ -204,4 +207,4 @@ $::direct = /-direct/; $::Wizard_no_previous = 1; $::isWizard = 1; eval { navigation($o, $o->[0]); }; -$in->exit if $@ =~ /wizcancel/; +$in->exit; |