diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-08-01 21:25:55 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-08-01 21:25:55 +0000 |
commit | b60b957d3a8821b7f1afb298e40809d58deb3c9c (patch) | |
tree | 2a95fbdb96d12ba681ff623f059799fd6e7d5418 /perl-install/install_steps_interactive.pm | |
parent | 6f91f1c65c6afc807f87b6a4a20ae19776cd8a65 (diff) | |
download | drakx-backup-do-not-use-b60b957d3a8821b7f1afb298e40809d58deb3c9c.tar drakx-backup-do-not-use-b60b957d3a8821b7f1afb298e40809d58deb3c9c.tar.gz drakx-backup-do-not-use-b60b957d3a8821b7f1afb298e40809d58deb3c9c.tar.bz2 drakx-backup-do-not-use-b60b957d3a8821b7f1afb298e40809d58deb3c9c.tar.xz drakx-backup-do-not-use-b60b957d3a8821b7f1afb298e40809d58deb3c9c.zip |
- the old $o->{keyboard} is now $o->{keyboard}{KEYBOARD}
- KBCHARSET is $o->{keyboard}{KBCHARSET}
- isNotDelete is $o->{keyboard}{BACKSPACE} (as written in sysconfig/keyboard)
- add GRP_TOGGLE which gives XkbOptions "grp:GRP_TOGGLE"
- add dialog box to choose GRP_TOGGLE
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r-- | perl-install/install_steps_interactive.pm | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 212e3fd4a..b80f0d7f4 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -200,30 +200,28 @@ sub selectKeyboard { my $from_usb = keyboard::from_usb(); my $l = keyboard::lang2keyboards(lang::langs($o->{langs})); - #- good guess, don't ask ($o->{keyboard} already set) - return install_steps::selectKeyboard($o) - if !$::expert && !$clicked && ($from_usb || $l->[0][1] >= 90) && listlength(lang::langs($o->{langs})) == 1; - - my @best = uniq(if_($from_usb, $from_usb), (map { $_->[0] } @$l), 'us_intl'); - - my $format = sub { translate(keyboard::keyboard2text($_[0])) }; - my $other; - my $ext_keyboard = $o->{keyboard}; - $o->ask_from_( - { title => _("Keyboard"), - messages => _("Please choose your keyboard layout."), - advanced_messages => _("Here is the full list of keyboards available"), - advanced_label => _("More"), - callbacks => { changed => sub { $other = $_[0]==1 } }, - }, - [ if_(@best > 1, { val => \$o->{keyboard}, type => 'list', format => $format, sort => 1, - list => [ @best ] }), - { val => \$ext_keyboard, type => 'list', format => $format, - list => [ difference2([ keyboard::keyboards ], \@best) ], advanced => @best > 1 } - ]); - delete $o->{keyboard_unsafe}; - - $o->{keyboard} = $ext_keyboard if $other; + if ($::expert || $clicked || !($from_usb || @$l && $l->[0][1] >= 90) || listlength(lang::langs($o->{langs})) > 1) { + add2hash($o->{keyboard}, $from_usb); + my @best = uniq($from_usb ? $from_usb->{KEYBOARD} : (), (map { $_->[0] } @$l), 'us_intl'); + + my $format = sub { translate(keyboard::KEYBOARD2text($_[0])) }; + my $other; + my $ext_keyboard = my $KEYBOARD = $o->{keyboard}{KEYBOARD}; + $o->ask_from_( + { title => _("Keyboard"), + messages => _("Please choose your keyboard layout."), + advanced_messages => _("Here is the full list of keyboards available"), + advanced_label => _("More"), + callbacks => { changed => sub { $other = $_[0]==1 } }, + }, + [ if_(@best > 1, { 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} = $other ? $ext_keyboard : $KEYBOARD; + } + any::keyboard_group_toggle_choose($o, $o->{keyboard}) or goto &selectKeyboard; install_steps::selectKeyboard($o); } #------------------------------------------------------------------------------ @@ -850,7 +848,7 @@ sub configureNetwork { my ($o, $first_time, $noauto) = @_; require network::netconnect; network::netconnect::main($o->{prefix}, $o->{netcnx} ||= {}, $o->{netc}, $o->{mouse}, $o, $o->{intf}, - $first_time, $o->{lang} eq "fr_FR" && $o->{keyboard} eq "fr", $noauto); + $first_time, $o->{lang} eq "fr_FR" && $o->{keyboard}{KEYBOARD} eq "fr", $noauto); } #-configureNetworkIntf moved to network |