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.
This commit is contained in:
parent
479414e1c9
commit
9e58d4e90e
|
@ -66,28 +66,24 @@ names of the selected keyboard layout and variant."
|
||||||
(id 'layout)
|
(id 'layout)
|
||||||
(compute
|
(compute
|
||||||
(lambda _
|
(lambda _
|
||||||
(let* ((layout (run-layout-page
|
(run-layout-page
|
||||||
layouts
|
layouts
|
||||||
(lambda (layout)
|
(lambda (layout)
|
||||||
(x11-keymap-layout-description 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)))))
|
|
||||||
;; Propose the user to select a variant among those supported by the
|
;; Propose the user to select a variant among those supported by the
|
||||||
;; previously selected layout.
|
;; previously selected layout.
|
||||||
(installer-step
|
(installer-step
|
||||||
(id 'variant)
|
(id 'variant)
|
||||||
(compute
|
(compute
|
||||||
(lambda (result _)
|
(lambda (result _)
|
||||||
(let ((variants (x11-keymap-layout-variants
|
(let* ((layout (result-step result 'layout))
|
||||||
(result-step result 'layout))))
|
(variants (x11-keymap-layout-variants layout)))
|
||||||
(run-variant-page variants
|
;; Return #f if the layout does not have any variant.
|
||||||
(lambda (variant)
|
(and (not (null? variants))
|
||||||
(x11-keymap-variant-description
|
(run-variant-page variants
|
||||||
variant)))))))))
|
(lambda (variant)
|
||||||
|
(x11-keymap-variant-description
|
||||||
|
variant))))))))))
|
||||||
|
|
||||||
(define (format-result result)
|
(define (format-result result)
|
||||||
(let ((layout (x11-keymap-layout-name
|
(let ((layout (x11-keymap-layout-name
|
||||||
|
|
Loading…
Reference in New Issue