From c6a4cba373448243762242fd54c72726e7b204da Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 9 Feb 2001 16:00:55 +0000 Subject: add button handling, quite weird behaviour though cuz of newt sillyness --- perl-install/interactive.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'perl-install/interactive.pm') diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 48353c8a8..e584e5336 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -16,6 +16,7 @@ use common qw(:common :functional); #- advanced => wether it is shown in by default or only in advanced mode #- disabled => function returning wether it should be disabled (grayed) #- type => +#- button => (with text, clicked) (type defaults to button if clicked is there) #- bool (with text) #- range (with min, max) #- combo (with list, not_edit) @@ -219,6 +220,9 @@ sub ask_from_entries_refH_powered_normalize { } elsif ($e->{type} eq 'range') { $e->{min} <= $e->{max} or die "bad range min $e->{min} > max $e->{max} (called from " . join(':', caller()) . ")"; ${$e->{val}} = max($e->{min}, min(${$e->{val}}, $e->{max})); + } elsif ($e->{type} eq 'button' || $e->{clicked}) { + $e->{type} = 'button'; + $e->{clicked} ||= sub {}; } $e->{disabled} ||= sub { 0 }; } -- cgit v1.2.1