From 4db7377ccd7434b49679eb2ca8188174d5891402 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 22 Jan 2002 22:34:54 +0000 Subject: add feature "allow_empty_list" for "list" entries (disables the special cases for 0 and 1 element lists) --- perl-install/interactive.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 6cfc277f2..ed6b0184d 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -26,7 +26,8 @@ use common; #- range (with min, max) #- combo (with list, not_edit) #- list (with list, icon2f (aka icon), separator (aka tree), format (aka pre_format function), -#- help can be a hash or a function) +#- help can be a hash or a function, +#- allow_empty_list disables the special cases for 0 and 1 element lists) #- entry (the default) (with hidden) # #- heritate from this class and you'll get all made interactivity for same steps. @@ -270,7 +271,7 @@ sub ask_from_normalize { #- don't display empty lists and one element lists @$l = grep { - if ($_->{list} && $_->{not_edit}) { + if ($_->{list} && $_->{not_edit} && !$_->{allow_empty_list}) { if (@{$_->{list}} == ()) { eval { require log; -- cgit v1.2.1