From b06c0f4ad36facc4399b77d8fcb534843040be1e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 13 Feb 2004 23:09:41 +0000 Subject: use interactive->ask_okcancel in order to not have spurious field in text mode (#7593) --- perl-install/wizards.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'perl-install/wizards.pm') diff --git a/perl-install/wizards.pm b/perl-install/wizards.pm index 9fdc33a1e..0c1ff4917 100644 --- a/perl-install/wizards.pm +++ b/perl-install/wizards.pm @@ -155,11 +155,16 @@ sub process { my %yesno = (yes => N("Yes"), no => N("No")); my $yes; $data2 = [ { val => \$yes, type => 'list', list => [ values %yesno ], gtk => { use_boxradio => 1 } } ] if $page->{type} eq "yesorno"; - my $a = $in->ask_from_({ title => $o->{name}, + my $a; + if (ref $data2 eq 'ARRAY' && @$data2) { + $a = $in->ask_from_({ title => $o->{name}, messages => $name, callbacks => { map { $_ => $page->{$_} || $default_callback{$_} } qw(focus_out complete) }, if_($page->{interactive_help_id}, interactive_help_id => $page->{interactive_help_id}), }, $data2); + } else { + $a = $in->ask_okcancel($o->{name}, $name); + } # interactive->ask_yesorno does not support stepping forward or backward: $a = $yes if $a && $page->{type} eq "yesorno"; if ($a) { -- cgit v1.2.1