summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-01-22 22:36:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-01-22 22:36:12 +0000
commitf274ed163f035102a4460a815582b8f5a2e1236a (patch)
tree6fbd682b05f298eb2df30f2eef84e79abcaa7ee7 /perl-install/any.pm
parent4db7377ccd7434b49679eb2ca8188174d5891402 (diff)
downloaddrakx-backup-do-not-use-f274ed163f035102a4460a815582b8f5a2e1236a.tar
drakx-backup-do-not-use-f274ed163f035102a4460a815582b8f5a2e1236a.tar.gz
drakx-backup-do-not-use-f274ed163f035102a4460a815582b8f5a2e1236a.tar.bz2
drakx-backup-do-not-use-f274ed163f035102a4460a815582b8f5a2e1236a.tar.xz
drakx-backup-do-not-use-f274ed163f035102a4460a815582b8f5a2e1236a.zip
- remove the default entry when that entry is removed
- use allow_empty_list for displaying the entries
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index f3ad81c22..cd1438d56 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -219,7 +219,7 @@ sub setupBootloader {
while (1) {
$in->set_help(arch() =~ /sparc/ ? 'setupSILOAddEntry' : arch() =~ /ppc/ ? 'setupYabootAddEntry' : 'setupBootloaderAddEntry') unless $::isStandalone;
my ($c, $e);
- $in->ask_from_(
+ $in->ask_from_(
{
messages =>
_("Here are the different entries.
@@ -231,8 +231,8 @@ You can add some more or change the existing ones."),
ref $e ?
"$e->{label} ($e->{kernel_or_dev})" . ($b->{default} eq $e->{label} && " *") :
translate($e);
- }, list => [ @{$b->{entries}} ] },
- (map { my $s = $_; { val => translate($_), clicked_may_quit => sub { $c = $s; 1 } } } (__("Modify"), __("Add"), __("Done"))),
+ }, list => [ @{$b->{entries}} ], allow_empty_list => 1 },
+ (map { my $s = $_; { val => translate($_), clicked_may_quit => sub { $c = $s; 1 } } } (if_(@{$b->{entries}} > 0, __("Modify")), __("Add"), __("Done"))),
]
);
!$c || $c eq "Done" and last;
@@ -318,6 +318,7 @@ if (arch() !~ /ppc/) {
push @{$b->{entries}}, $e if $c eq "Add";
} else {
+ delete $b->{default} if $b->{default} eq $e->{label};
@{$b->{entries}} = grep { $_ != $e } @{$b->{entries}};
}
}