diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2018-12-05 14:36:22 +0900 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-01-17 14:04:23 +0100 |
commit | c088b2e47f6675199f1ef545df7d04d4532e64e3 (patch) | |
tree | 335f80e187ea1da73fbb39a1ca296166e714db90 /gnu/installer/newt/keymap.scm | |
parent | dc5f3275ecbddc804875899e9e457299a835d7ab (diff) | |
download | patches-c088b2e47f6675199f1ef545df7d04d4532e64e3.tar patches-c088b2e47f6675199f1ef545df7d04d4532e64e3.tar.gz |
installer: Do not ask for keyboard model.
Suppose that the keyboard model is "pc105".
* gnu/installer.scm (apply-keymap): Remove model ...
* gnu/installer/newt/keymap.scm (run-keymap-page): passed here.
(run-model-page): remove procedure
* gnu/installer/record.scm (installer): Edit keymap-page prototype in comment.
* gnu/installer/keymap.scm (default-keyboard-model): New exported parameter.
Diffstat (limited to 'gnu/installer/newt/keymap.scm')
-rw-r--r-- | gnu/installer/newt/keymap.scm | 44 |
1 files changed, 6 insertions, 38 deletions
diff --git a/gnu/installer/newt/keymap.scm b/gnu/installer/newt/keymap.scm index 0c9432bba2..0c38a79e19 100644 --- a/gnu/installer/newt/keymap.scm +++ b/gnu/installer/newt/keymap.scm @@ -56,43 +56,13 @@ (condition (&installer-step-abort))))))) -(define (run-model-page models model->text) - (let ((title (G_ "Keyboard model selection"))) - (run-listbox-selection-page - #:title title - #:info-text (G_ "Please choose your keyboard model.") - #:listbox-items models - #:listbox-item->text model->text - #:listbox-default-item (find (lambda (model) - (string=? (x11-keymap-model-name model) - "pc105")) - models) - #:sort-listbox-items? #f - #:button-text (G_ "Back") - #:button-callback-procedure - (lambda _ - (raise - (condition - (&installer-step-abort))))))) - -(define* (run-keymap-page #:key models layouts) - "Run a page asking the user to select a keyboard model, layout and -variant. MODELS and LAYOUTS are lists of supported X11-KEYMAP-MODEL and -X11-KEYMAP-LAYOUT. Return a list of three elements, the names of the selected -keyboard model, layout and variant." +(define* (run-keymap-page layouts) + "Run a page asking the user to select a keyboard layout and variant. LAYOUTS +is a list of supported X11-KEYMAP-LAYOUT. Return a list of two elements, the +names of the selected keyboard layout and variant." (define keymap-steps (list (installer-step - (id 'model) - (compute - (lambda _ - ;; TODO: Understand why (run-model-page models x11-keymap-model-name) - ;; fails with: warning: possibly unbound variable - ;; `%x11-keymap-model-description-procedure. - (run-model-page models (lambda (model) - (x11-keymap-model-description - model)))))) - (installer-step (id 'layout) (compute (lambda _ @@ -120,13 +90,11 @@ keyboard model, layout and variant." variant))))))))) (define (format-result result) - (let ((model (x11-keymap-model-name - (result-step result 'model))) - (layout (x11-keymap-layout-name + (let ((layout (x11-keymap-layout-name (result-step result 'layout))) (variant (and=> (result-step result 'variant) (lambda (variant) (x11-keymap-variant-name variant))))) - (list model layout (or variant "")))) + (list layout (or variant "")))) (format-result (run-installer-steps #:steps keymap-steps))) |