summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-12 16:08:25 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-12 16:08:25 +0000
commit4c01fcc2ee46d5420c1e9ad8530b34e23dc6830c (patch)
treef95eba763ece1363f4a2a750d5b2d9f9a9ae79b4 /perl-install/interactive.pm
parent758b8a5f81916ee983f8a5f2efa400f7ab151fce (diff)
downloaddrakx-4c01fcc2ee46d5420c1e9ad8530b34e23dc6830c.tar
drakx-4c01fcc2ee46d5420c1e9ad8530b34e23dc6830c.tar.gz
drakx-4c01fcc2ee46d5420c1e9ad8530b34e23dc6830c.tar.bz2
drakx-4c01fcc2ee46d5420c1e9ad8530b34e23dc6830c.tar.xz
drakx-4c01fcc2ee46d5420c1e9ad8530b34e23dc6830c.zip
add "label" type
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r--perl-install/interactive.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index 00d450369..510c042fa 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -16,7 +16,8 @@ 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 clicked) (type defaults to button if clicked is there)
+#- button => (with clicked) (type defaults to button if clicked is there) (val need not be a reference)
+#- label => (val need not be a reference) (type defaults to label if val is not a reference)
#- bool (with text)
#- range (with min, max)
#- combo (with list, not_edit)
@@ -232,6 +233,10 @@ sub ask_from_entries_refH_powered_normalize {
} elsif ($e->{type} eq 'button' || $e->{clicked}) {
$e->{type} = 'button';
$e->{clicked} ||= sub {};
+ $e->{val} = \ (my $v = $e->{val}) if !ref($e->{val});
+ } elsif ($e->{type} eq 'label' || !ref($e->{val})) {
+ $e->{type} = 'label';
+ $e->{val} = \ (my $v = $e->{val}) if !ref($e->{val});
}
$e->{disabled} ||= sub { 0 };
}