summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-12-18 14:27:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-12-18 14:27:13 +0000
commit8ca860266ac5204d738cb5d87fcf055f86787ec0 (patch)
treed17b4bd1a9cfae352521700c30958ffece729973 /tools
parent7e9d87c3d822dcbd12408b311e812ebe7fbddcc5 (diff)
downloaddrakx-kbd-mouse-x11-8ca860266ac5204d738cb5d87fcf055f86787ec0.tar
drakx-kbd-mouse-x11-8ca860266ac5204d738cb5d87fcf055f86787ec0.tar.gz
drakx-kbd-mouse-x11-8ca860266ac5204d738cb5d87fcf055f86787ec0.tar.bz2
drakx-kbd-mouse-x11-8ca860266ac5204d738cb5d87fcf055f86787ec0.tar.xz
drakx-kbd-mouse-x11-8ca860266ac5204d738cb5d87fcf055f86787ec0.zip
- keyboarddrake:
o correctly handle default XkbModel (so that we do not force pc105 when we should not) (nb: this is not very important nowadays because XkbModel is deprecated with evdev, but hell, it's easy to fix :)
Diffstat (limited to 'tools')
-rwxr-xr-xtools/keyboarddrake12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/keyboarddrake b/tools/keyboarddrake
index fb5d9be..d508018 100755
--- a/tools/keyboarddrake
+++ b/tools/keyboarddrake
@@ -26,7 +26,11 @@ if (my ($kb) = grep { !/^-/ } @ARGV) {
my ($xkb_models, $model2text) = keyboard::xkb_models();
s/ /|/ foreach values %$model2text;
- $keyboard->{XkbModel} ||= 'pc105';
+ my $default_XkbModel;
+ if (!$keyboard->{XkbModel}) {
+ $default_XkbModel = 1;
+ $keyboard->{XkbModel} = keyboard::default_XkbModel($keyboard);
+ }
choose:
$in->ask_from(N("Keyboard"),
@@ -38,6 +42,11 @@ if (my ($kb) = grep { !/^-/ } @ARGV) {
format => sub { translate(keyboard::KEYBOARD2text($_[0])) },
list => [ keyboard::KEYBOARDs() ],
type => 'list',
+ changed => sub {
+ if ($default_XkbModel) {
+ $keyboard->{XkbModel} = keyboard::default_XkbModel($keyboard);
+ }
+ },
},
{ label => N("Keyboard type"),
title => 1,
@@ -45,6 +54,7 @@ if (my ($kb) = grep { !/^-/ } @ARGV) {
{ val => \$keyboard->{XkbModel},
format => sub { $model2text->{$_[0]} },
separator => '|',
+ changed => sub { $default_XkbModel = 0 },
list => $xkb_models },
]) or goto end;