If a keymap file is not found for the selected country then default to the more

common USA ISO rather than index 0 (Belgian).

Reviewed by:	jhb
MFC after:	1 day
This commit is contained in:
Andrew Thompson 2006-03-15 21:20:01 +00:00
parent 47e2996e8b
commit 01eb65dbbf
2 changed files with 10 additions and 4 deletions

View File

@ -103,8 +103,11 @@ keymapMenuSelect(dialogMenuItem *self)
if ((choice = keymapSetDefault(prefix)) == -1) if ((choice = keymapSetDefault(prefix)) == -1)
{ {
snprintf(prefix, sizeof(prefix), "keymap=%s", lang); snprintf(prefix, sizeof(prefix), "keymap=%s", lang);
if ((choice = keymapSetDefault(prefix)) == -1) if ((choice = keymapSetDefault(prefix)) == -1) {
choice = 0; snprintf(prefix, sizeof(prefix), "keymap=us.iso", lang);
if ((choice = keymapSetDefault(prefix)) == -1)
choice = 0;
}
} }
dmenuSetDefaultIndex(&MenuSysconsKeymap, &choice, &scroll, &curr, &max); dmenuSetDefaultIndex(&MenuSysconsKeymap, &choice, &scroll, &curr, &max);

View File

@ -103,8 +103,11 @@ keymapMenuSelect(dialogMenuItem *self)
if ((choice = keymapSetDefault(prefix)) == -1) if ((choice = keymapSetDefault(prefix)) == -1)
{ {
snprintf(prefix, sizeof(prefix), "keymap=%s", lang); snprintf(prefix, sizeof(prefix), "keymap=%s", lang);
if ((choice = keymapSetDefault(prefix)) == -1) if ((choice = keymapSetDefault(prefix)) == -1) {
choice = 0; snprintf(prefix, sizeof(prefix), "keymap=us.iso", lang);
if ((choice = keymapSetDefault(prefix)) == -1)
choice = 0;
}
} }
dmenuSetDefaultIndex(&MenuSysconsKeymap, &choice, &scroll, &curr, &max); dmenuSetDefaultIndex(&MenuSysconsKeymap, &choice, &scroll, &curr, &max);