From 341111e85b2a5425188349dced71e11ac4b178e3 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 9 Jan 2001 23:33:42 +0000 Subject: (ask_from_entries_refH_powered_normalize): field "disabled" added, "advanced_messages" added --- perl-install/interactive.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'perl-install/interactive.pm') diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 84c5fe6cc..6373911a8 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -14,6 +14,7 @@ use common qw(:common :functional); #- icon => icon to put before the description #- help => tooltip #- advanced => wether it is shown in by default or only in advanced mode +#- disabled => function returning wether it should be disabled (grayed) #- type => #- bool (with text) #- range (with min, max) @@ -213,12 +214,13 @@ sub ask_from_entries_refH_powered_normalize { $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})); } + $e->{disabled} ||= sub { 0 }; } #- don't display empty lists @$l = grep { !($_->{list} && @{$_->{list}} == () && $_->{not_edit}) } @$l; - $common->{messages} = [ deref($common->{messages}) ]; + $common->{$_} = [ deref($common->{$_}) ] foreach qw(messages advanced_messages); add2hash_($common, { ok => _("Ok"), cancel => _("Cancel") }) if !exists $common->{ok}; add2hash_($common->{callbacks} ||= {}, { changed => sub {}, focus_out => sub {}, complete => sub { 0 } }); } -- cgit v1.2.1