diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-02-10 10:10:00 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-02-10 10:10:00 +0000 |
commit | 1366ba7668973fede10bc34d0759b7cebd9d2099 (patch) | |
tree | 46771f043d3d5fdba99b663f1a42aacba23a8b0d /perl-install/interactive_newt.pm | |
parent | 46e25ae29ee4cf5aab5e0b439aca9a68f91a2181 (diff) | |
download | drakx-1366ba7668973fede10bc34d0759b7cebd9d2099.tar drakx-1366ba7668973fede10bc34d0759b7cebd9d2099.tar.gz drakx-1366ba7668973fede10bc34d0759b7cebd9d2099.tar.bz2 drakx-1366ba7668973fede10bc34d0759b7cebd9d2099.tar.xz drakx-1366ba7668973fede10bc34d0759b7cebd9d2099.zip |
button behaviour now chosen, and implemented
Diffstat (limited to 'perl-install/interactive_newt.pm')
-rw-r--r-- | perl-install/interactive_newt.pm | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/perl-install/interactive_newt.pm b/perl-install/interactive_newt.pm index b260d60af..4ea1a2a4f 100644 --- a/perl-install/interactive_newt.pm +++ b/perl-install/interactive_newt.pm @@ -102,7 +102,7 @@ sub ask_from_entries_refW { $set = sub { $w->CheckboxSetValue(checkval($_[0])) }; $get = sub { $w->CheckboxGetValue == ord '*' }; } elsif ($e->{type} eq 'button') { - $w = Newt::Component::Button(-1, -1, $e->{text} || ''); + $w = Newt::Component::Button(-1, -1, may_apply($e->{format}, ${$e->{val}})); } elsif ($e->{type} =~ /list/) { my ($h, $wi) = (5, 20); my $scroll = @{$e->{list}} > $h ? 1 << 2 : 0; @@ -182,19 +182,23 @@ sub ask_from_entries_refW { !$error; }; - my ($canceled, $r); + my $canceled; do { - $r = $form->RunForm; + my $r = $form->RunForm; + foreach (@widgets) { + if ($$r == ${$_->{w}}) { + $form->FormDestroy; + Newt::PopWindow; + $_->{e}{clicked}(); + return ask_from_entries_refW($o, $common, $l, $l2); + } + } $canceled = $cancel && $$r == $$cancel; + } until ($check->($common->{callbacks}{$canceled ? 'canceled' : 'complete'})); $form->FormDestroy; Newt::PopWindow; - - foreach (@widgets) { - $_->{e}{clicked}() if $$r == ${$_->{w}}; - } - !$canceled; } |