summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-08-08 03:08:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-08-08 03:08:26 +0000
commit0ad24d9d6bc491c6c45a09b12fbec2e529d1ec44 (patch)
treeeec60fa5673b1589acbb795c2effec90d95c0ef0 /perl-install/install_steps_interactive.pm
parentc7d6130922eeb1dd93d5098ec32d8a83b5f13eef (diff)
downloaddrakx-backup-do-not-use-0ad24d9d6bc491c6c45a09b12fbec2e529d1ec44.tar
drakx-backup-do-not-use-0ad24d9d6bc491c6c45a09b12fbec2e529d1ec44.tar.gz
drakx-backup-do-not-use-0ad24d9d6bc491c6c45a09b12fbec2e529d1ec44.tar.bz2
drakx-backup-do-not-use-0ad24d9d6bc491c6c45a09b12fbec2e529d1ec44.tar.xz
drakx-backup-do-not-use-0ad24d9d6bc491c6c45a09b12fbec2e529d1ec44.zip
when we have only one "best" keyboard to propose, we don't display it, but in that case we must not remove it from the list of proposed keyboards (bugzilla #16873)
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r--perl-install/install_steps_interactive.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index c9b306377..560f5feb9 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -109,6 +109,7 @@ sub selectKeyboard {
if ($::expert || $clicked || !($from_usb || @$l && $l->[0][1] >= 90) || listlength(lang::langs($o->{locale}{langs})) > 1) {
add2hash($o->{keyboard}, $from_usb);
my @best = uniq($from_usb ? $from_usb->{KEYBOARD} : (), map { $_->[0] } @$l);
+ @best = () if @best == 1;
my $format = sub { translate(keyboard::KEYBOARD2text($_[0])) };
my $other;
@@ -121,12 +122,12 @@ sub selectKeyboard {
advanced_label => N("More"),
callbacks => { changed => sub { $other = $_[0] == 1 } },
},
- [ if_(@best > 1, { val => \$KEYBOARD, type => 'list', format => $format, sort => 1,
- list => [ @best ] }),
+ [ if_(@best, { val => \$KEYBOARD, type => 'list', format => $format, sort => 1,
+ list => [ @best ] }),
{ val => \$ext_keyboard, type => 'list', format => $format,
list => [ difference2([ keyboard::KEYBOARDs() ], \@best) ], advanced => @best > 1 }
]);
- $o->{keyboard}{KEYBOARD} = @best <= 1 || $other ? $ext_keyboard : $KEYBOARD;
+ $o->{keyboard}{KEYBOARD} = !@best || $other ? $ext_keyboard : $KEYBOARD;
delete $o->{keyboard}{unsafe};
}
keyboard::group_toggle_choose($o, $o->{keyboard}) or goto &selectKeyboard;