diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2018-12-05 21:55:51 +0900 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-01-17 14:04:25 +0100 |
commit | 9e58d4e90e77db150fbc57a559eaa01d85ce03f6 (patch) | |
tree | 07b1e92b190a6c81295d20cda415bea77756a9ca /gnu/installer | |
parent | 479414e1c9e13ddce9e0c8741eb9f50dff62e333 (diff) | |
download | guix-9e58d4e90e77db150fbc57a559eaa01d85ce03f6.tar.gz guix-9e58d4e90e77db150fbc57a559eaa01d85ce03f6.zip |
installer: keymap: Fix keymap selection of layouts with not variant.
* gnu/installer/newt/keymap.scm (run-keymap-page): Test if the layout has no
variant at 'variant step, instead of raising a condition at 'layout step.
Diffstat (limited to 'gnu/installer')
-rw-r--r-- | gnu/installer/newt/keymap.scm | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/gnu/installer/newt/keymap.scm b/gnu/installer/newt/keymap.scm index 9178a4341a..55a0aa6bf9 100644 --- a/gnu/installer/newt/keymap.scm +++ b/gnu/installer/newt/keymap.scm @@ -66,28 +66,24 @@ names of the selected keyboard layout and variant." (id 'layout) (compute (lambda _ - (let* ((layout (run-layout-page - layouts - (lambda (layout) - (x11-keymap-layout-description layout))))) - (if (null? (x11-keymap-layout-variants layout)) - ;; Break if this layout does not have any variant. - (raise - (condition - (&installer-step-break))) - layout))))) + (run-layout-page + layouts + (lambda (layout) + (x11-keymap-layout-description layout)))))) ;; Propose the user to select a variant among those supported by the ;; previously selected layout. (installer-step (id 'variant) (compute (lambda (result _) - (let ((variants (x11-keymap-layout-variants - (result-step result 'layout)))) - (run-variant-page variants - (lambda (variant) - (x11-keymap-variant-description - variant))))))))) + (let* ((layout (result-step result 'layout)) + (variants (x11-keymap-layout-variants layout))) + ;; Return #f if the layout does not have any variant. + (and (not (null? variants)) + (run-variant-page variants + (lambda (variant) + (x11-keymap-variant-description + variant)))))))))) (define (format-result result) (let ((layout (x11-keymap-layout-name |