diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-07-07 16:07:25 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-07-07 16:07:25 +0000 |
commit | 56f71590d8582780ca7a44b33c2f5d3975999398 (patch) | |
tree | 5288bf5396221a68132e40ba737663096e701842 /perl-install | |
parent | 1294daaae9eeece73029f63e425f1c17ccffe61f (diff) | |
download | drakx-56f71590d8582780ca7a44b33c2f5d3975999398.tar drakx-56f71590d8582780ca7a44b33c2f5d3975999398.tar.gz drakx-56f71590d8582780ca7a44b33c2f5d3975999398.tar.bz2 drakx-56f71590d8582780ca7a44b33c2f5d3975999398.tar.xz drakx-56f71590d8582780ca7a44b33c2f5d3975999398.zip |
make the buttons work in all cases
- workaround segfaults
- ensure the perl values are set when calling the clicked_may_quit callback
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/interactive_newt.pm | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/perl-install/interactive_newt.pm b/perl-install/interactive_newt.pm index 431a39930..d930b9f29 100644 --- a/perl-install/interactive_newt.pm +++ b/perl-install/interactive_newt.pm @@ -193,26 +193,22 @@ sub ask_fromW { local $::setstep = 1; $form->RunForm; }; - foreach (@widgets) { - if ($$r == ${$_->{w}}) { - $destroyed = 1; - $form->FormDestroy; - Newt::PopWindow; - my $v = do { - local $::setstep = 1; - $_->{e}{clicked_may_quit}(); - }; - $v or return ask_fromW($o, $common, $l, $l2); - } - } $canceled = $cancel && $$r == $$cancel; + if (my ($button) = grep { $$r == ${$_->{w}} } @widgets) { + $get_all->(); + my $v = do { + local $::setstep = 1; + $button->{e}{clicked_may_quit}(); + }; + $form->FormDestroy; + Newt::PopWindow; + return $v || &ask_fromW; + } } until ($check->($common->{callbacks}{$canceled ? 'canceled' : 'complete'})); - if (!$destroyed) { - $form->FormDestroy; - Newt::PopWindow; - } + $form->FormDestroy; + Newt::PopWindow; !$canceled; } |