diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-04-11 12:39:57 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-04-11 12:39:57 +0000 |
commit | 820a9a51d454c1fb687fe3cb1bbe47a5c0af08e5 (patch) | |
tree | c9286238679d9c2ee9c79653282aabf8f65b0103 /perl-install | |
parent | 36fd2f4ddb613aecd0284732882c49de6c2d1cb8 (diff) | |
download | drakx-820a9a51d454c1fb687fe3cb1bbe47a5c0af08e5.tar drakx-820a9a51d454c1fb687fe3cb1bbe47a5c0af08e5.tar.gz drakx-820a9a51d454c1fb687fe3cb1bbe47a5c0af08e5.tar.bz2 drakx-820a9a51d454c1fb687fe3cb1bbe47a5c0af08e5.tar.xz drakx-820a9a51d454c1fb687fe3cb1bbe47a5c0af08e5.zip |
(setupBootloader): nicer look&feel
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index e9d846fee..c1d07b219 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -202,24 +202,24 @@ sub setupBootloader { while ($::expert || $more > 1) { $in->set_help(arch() =~ /sparc/ ? 'setupSILOAddEntry' : arch() =~ /ppc/ ? 'setupYabootAddEntry' : 'setupBootloaderAddEntry') unless $::isStandalone; - my $c; - $in->ask_from_entries_refH_powered( + my ($c, $e); + eval { $in->ask_from_entries_refH_powered( { messages => _("Here are the different entries. You can add some more or change the existing ones."), ok => '', }, - [ { val => \$c, format => sub { + [ { val => \$e, format => sub { my ($e) = @_; ref $e ? "$e->{label} ($e->{kernel_or_dev})" . ($b->{default} eq $e->{label} && " *") : translate($e); - }, list => [ @{$b->{entries}}, __("Add"), __("Done") ] } ] - ); - $c eq "Done" and last; - - my ($e); + }, list => [ @{$b->{entries}} ] }, + (map { my $s = $_; { val => translate($_), clicked => sub { $c = $s; die } } } (__("Modify"), __("Add"), __("Done"))), + ] + ) }; + !$c || $c eq "Done" and last; if ($c eq "Add") { my @labels = map { $_->{label} } @{$b->{entries}}; @@ -238,8 +238,6 @@ 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 { - $e = $c; } my %old_e = %$e; my $default = my $old_default = $e->{label} eq $b->{default}; |