summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-06 00:38:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-06 00:38:57 +0000
commitc75193289b79d4c0687aa6a597b51436568f8360 (patch)
tree0dde0958b1d48a729e30be420f9f8c94004b7ef8 /perl-install/any.pm
parentc5d30320d3d120ccd291ccc7b7271400a4f20e4a (diff)
downloaddrakx-backup-do-not-use-c75193289b79d4c0687aa6a597b51436568f8360.tar
drakx-backup-do-not-use-c75193289b79d4c0687aa6a597b51436568f8360.tar.gz
drakx-backup-do-not-use-c75193289b79d4c0687aa6a597b51436568f8360.tar.bz2
drakx-backup-do-not-use-c75193289b79d4c0687aa6a597b51436568f8360.tar.xz
drakx-backup-do-not-use-c75193289b79d4c0687aa6a597b51436568f8360.zip
no_comment
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm17
1 files changed, 11 insertions, 6 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 7f59db74a..7e50c1dbc 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -122,11 +122,17 @@ _("Restrict command line options") => { val => \$b->{restricted}, type => "bool"
until ($::beginner && $more <= 1) {
$in->set_help(arch() =~ /sparc/ ? 'setupSILOAddEntry' : 'setupBootloaderAddEntry') unless $::isStandalone;
- my $c = $in->ask_from_list_([''],
+ my $c = $in->ask_from_listf([''],
_("Here are the different entries.
You can add some more or change the existing ones."),
- [ (sort @{[map { "$_->{label} ($_->{kernel_or_dev})" . ($b->{default} eq $_->{label} && " *") } @{$b->{entries}}]}), __("Add"), __("Done") ],
- );
+ sub {
+ my ($e) = @_;
+ ref $e ?
+ "$e->{label} ($e->{kernel_or_dev})" . ($b->{default} eq $e->{label} && " *") :
+ translate($e);
+ },
+ [ @{$b->{entries}}, __("Add"), __("Done") ]);
+
$c eq "Done" and last;
my ($e);
@@ -147,9 +153,8 @@ You can add some more or change the existing ones."),
}
$e->{label} = $prefix;
for (my $nb = 0; member($e->{label}, @labels); $nb++) { $e->{label} = "$prefix-$nb" }
- } else {
- $c =~ /(.*) \(/;
- ($e) = grep { $_->{label} eq $1 } @{$b->{entries}};
+ } else {
+ $e = $c;
}
my %old_e = %$e;
my $default = my $old_default = $e->{label} eq $b->{default};