From 7bc71025ccd0fabd739803889825e10341fbabdf Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Thu, 9 Apr 2020 02:38:27 +0200 Subject: installer: Include empty variant in keyboard layout selection. Previously for Azerbaijani, no Latin layout but only the Cyrillic variant could be selected. * gnu/installer/newt/keymap.scm (add-empty-variant): New procedure. (run-keymap-page): Use it to insert an empty variant. --- gnu/installer/newt/keymap.scm | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/gnu/installer/newt/keymap.scm b/gnu/installer/newt/keymap.scm index a555a1ecc1..1b3af2f158 100644 --- a/gnu/installer/newt/keymap.scm +++ b/gnu/installer/newt/keymap.scm @@ -104,14 +104,21 @@ different layout at any time from the parameters menu."))) (append (sort main layout <>))) @@ -180,10 +187,14 @@ options." ;; Return #f if the layout does not have any variant. (and (not (null? variants)) (run-variant-page - (sort-variants variants) + (sort-variants (add-empty-variant variants)) (lambda (variant) - (gettext (x11-keymap-variant-description variant) - "xkeyboard-config")))))))))) + (if variant + (gettext (x11-keymap-variant-description variant) + "xkeyboard-config") + ;; Text to opt for no variant at all: + (gettext (x11-keymap-layout-description layout) + "xkeyboard-config"))))))))))) (define (format-result result) (let ((layout (x11-keymap-layout-name -- cgit 1.4.1