summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-03 19:15:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-03 19:15:20 +0000
commit4fb359379d79b1adc17d6f94815ac08691a411d2 (patch)
tree471467d0967ba4b663e286195bcc4703797ef2b3 /perl-install
parent31641090b339410f7b61a9aaaa25d641eb12e4f7 (diff)
downloaddrakx-backup-do-not-use-4fb359379d79b1adc17d6f94815ac08691a411d2.tar
drakx-backup-do-not-use-4fb359379d79b1adc17d6f94815ac08691a411d2.tar.gz
drakx-backup-do-not-use-4fb359379d79b1adc17d6f94815ac08691a411d2.tar.bz2
drakx-backup-do-not-use-4fb359379d79b1adc17d6f94815ac08691a411d2.tar.xz
drakx-backup-do-not-use-4fb359379d79b1adc17d6f94815ac08691a411d2.zip
since "format" is now handled for combo boxes, combo boxes are used in much too many places. Fix this by forcing type "list" for some cases, and using type "list" when a ask_from has only one entry
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm4
-rw-r--r--perl-install/interactive.pm3
2 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 726d19139..471d0fbe0 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -235,7 +235,7 @@ _("Here are the different entries.
You can add some more or change the existing ones."),
ok => '',
},
- [ { val => \$e, format => sub {
+ [ { val => \$e, type => 'list', format => sub {
my ($e) = @_;
ref $e ?
"$e->{label} ($e->{kernel_or_dev})" . ($b->{default} eq $e->{label} && " *") :
@@ -1021,7 +1021,7 @@ Security features are at their maximum.")),
$in->ask_from('', _("Choose security level") . "\n\n" .
join('', map { "$l{$_}: $help{$_}\n\n" } keys %l),
[
- { label => _("Security level"), val => $security, list => [ sort keys %l ], format => sub { $l{$_} } },
+ { label => _("Security level"), val => $security, list => [ sort keys %l ], format => sub { $l{$_} }, type => 'list' },
if_($in->do_pkgs->is_installed('libsafe') && arch() =~ /^i.86/,
{ label => _("Use libsafe for servers"), val => $libsafe, type => 'bool', text =>
_("A library which defends against buffer overflow and format string attacks.") }
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index a9d98c9f4..c3c76c0af 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -260,7 +260,8 @@ sub ask_from_normalize {
}
$e->{type} = 'iconlist' if $e->{icon2f};
$e->{type} = 'treelist' if $e->{separator};
- add2hash_($e, { not_edit => 1, type => 'combo' });
+ add2hash_($e, { not_edit => 1 });
+ $e->{type} ||= $e->{not_edit} && @$l == 1 ? 'list' : 'combo';
${$e->{val}} = $l->[0] if ($e->{type} ne 'combo' || $e->{not_edit}) && !member(${$e->{val}}, @$l);
if ($e->{type} eq 'combo' && $e->{format}) {
my @l = map { $e->{format}->($_) } @{$e->{list}};
ons'>-458/+572 * change a bit how strings are passed to advertising systemGuillaume Cottenceau2003-06-1216-1252/+1632 * cookerGuillaume Cottenceau2003-06-061-0/+0 * updated Estonien, Japanese, Albanian and Vietnamese po filesPablo Saratxaga2003-06-033-3301/+3539 * UpdateArkadiusz Lipiec2003-06-021-195/+308 * updated Spanish translationsFabián Mandelbaum2003-06-021-154/+271 * changed the name of the russian phonetic layoutPablo Saratxaga2003-05-3147-6454/+11245 * updated Vietnamese filePablo Saratxaga2003-05-302-67/+68 * updated Albanian filePablo Saratxaga2003-05-281-5/+46 * updated pot filePablo Saratxaga2003-05-261-3/+43 * updated pot filePablo Saratxaga2003-05-222-75/+134 * updated pot filePablo Saratxaga2003-05-202-98/+147 * updated German, Estonian and Finnish filesPablo Saratxaga2003-05-203-1420/+1964 * update french translationThierry Vignaud2003-05-201-67/+54 * updated Spanish translationsFabián Mandelbaum2003-05-191-221/+176 * updated pot filePablo Saratxaga2003-05-16