summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-02-09 16:00:55 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-02-09 16:00:55 +0000
commitc6a4cba373448243762242fd54c72726e7b204da (patch)
treec944dcac55f446e18c767f1355d0ae0b8b263573 /perl-install/interactive.pm
parentebbb550f040057963c91b0e67076d80328d4a331 (diff)
downloaddrakx-backup-do-not-use-c6a4cba373448243762242fd54c72726e7b204da.tar
drakx-backup-do-not-use-c6a4cba373448243762242fd54c72726e7b204da.tar.gz
drakx-backup-do-not-use-c6a4cba373448243762242fd54c72726e7b204da.tar.bz2
drakx-backup-do-not-use-c6a4cba373448243762242fd54c72726e7b204da.tar.xz
drakx-backup-do-not-use-c6a4cba373448243762242fd54c72726e7b204da.zip
add button handling, quite weird behaviour though cuz of newt sillyness
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r--perl-install/interactive.pm4
1 files changed, 4 insertions, 0 deletions
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 };
}