[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/80: installer: Fix broken keymap change option.
From: |
John Darrington |
Subject: |
02/80: installer: Fix broken keymap change option. |
Date: |
Tue, 3 Jan 2017 15:49:41 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 4644086da9676c0ec5a4084c23705b829c2c4d58
Author: John Darrington <address@hidden>
Date: Sat Dec 17 09:14:23 2016 +0100
installer: Fix broken keymap change option.
* gnu/system/installer/new.scm (base-page-key-handler): Use (which) instead
of (getenv)
---
gnu/system/installer/new.scm | 49 ++++++++++++++++++++++++------------------
1 file changed, 28 insertions(+), 21 deletions(-)
diff --git a/gnu/system/installer/new.scm b/gnu/system/installer/new.scm
index 1e7ee19..4bac4cb 100644
--- a/gnu/system/installer/new.scm
+++ b/gnu/system/installer/new.scm
@@ -33,7 +33,10 @@
(gnu system installer page)
(gnu system installer dialog)
+ (guix build utils)
+
(ice-9 format)
+ (ice-9 match)
(ice-9 pretty-print)
(srfi srfi-9))
@@ -133,27 +136,31 @@
(define (base-page-key-handler page ch)
-(cond
- ((eqv? ch (key-f 1))
- (endwin)
- (let* ((p (mkstemp! (string-copy "/tmp/installer.XXXXXX")))
- (file-name (port-filename p)))
- (format p "echo '~a'\n" (gettext "Type \"exit\" to return to the GuixSD
installer."))
- (close p)
- (system* "bash" "--rcfile" file-name)
- (delete-file file-name)))
-
- ((eqv? ch (key-f 9))
- (setlocale LC_ALL "de_DE.UTF-8")
- )
-
- ((eqv? ch (key-f 10))
- (let ((p (make-file-browser
- page
- (string-append (getenv "kbd_package") "/share/keymaps")
- page-stack)))
- (set! page-stack (cons p page-stack))
- ((page-refresh p) p)))))
+ (cond
+ ((eqv? ch (key-f 1))
+ (endwin)
+ (let* ((p (mkstemp! (string-copy "/tmp/installer.XXXXXX")))
+ (file-name (port-filename p)))
+ (format p "echo '~a'\n" (gettext "Type \"exit\" to return to the GuixSD
installer."))
+ (close p)
+ (system* "bash" "--rcfile" file-name)
+ (delete-file file-name)))
+
+ ((eqv? ch (key-f 9))
+ (setlocale LC_ALL "de_DE.UTF-8")
+ )
+
+ ((eqv? ch (key-f 10))
+ (match (which "loadkeys")
+ (#f #f) ;; Do nothing if loadkeys is not found
+ (loadkeys-directory
+ (let* ((keymap-directory
+ (string-append (dirname loadkeys-directory)
"/../share/keymaps"))
+ (p (make-file-browser
+ page keymap-directory
+ page-stack)))
+ (set! page-stack (cons p page-stack))
+ ((page-refresh p) p)))))))
(define (main-page-key-handler page ch)
(let ((main-menu (page-datum page 'menu)))
- branch wip-installer created (now 9c4d060), John Darrington, 2017/01/03
- 04/80: installer: Fix broken timezone menu., John Darrington, 2017/01/03
- 05/80: installer: fix warning in usage of "format"., John Darrington, 2017/01/03
- 03/80: installer: Remove obsolete procedures/variables, John Darrington, 2017/01/03
- 02/80: installer: Fix broken keymap change option.,
John Darrington <=
- 07/80: installer: Use ice-9 match., John Darrington, 2017/01/03
- 06/80: installer: use ice-9 format everywhere., John Darrington, 2017/01/03
- 08/80: installer: Add IETF contraints for hostname in entry form., John Darrington, 2017/01/03
- 12/80: installer: Add gurses modules., John Darrington, 2017/01/03
- 21/80: gnu: guix: Add dependency: guile-ncurses., John Darrington, 2017/01/03
- 17/80: installer: Add new procedure to get the list of volumes., John Darrington, 2017/01/03
- 19/80: installer: Handle the 'back' action in the filesystems task., John Darrington, 2017/01/03
- 23/80: installer: Fix incorrect host in ping task., John Darrington, 2017/01/03
- 25/80: installer: Use a cleaner way of generating the lspci information., John Darrington, 2017/01/03
- 24/80: installer: Make "interfaces" return an alist., John Darrington, 2017/01/03