[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/21: installer: Fix broken keymap change option.
From: |
John Darrington |
Subject: |
02/21: installer: Fix broken keymap change option. |
Date: |
Thu, 22 Dec 2016 19:58:39 +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 704f546), John Darrington, 2016/12/22
- 05/21: installer: fix warning in usage of "format"., John Darrington, 2016/12/22
- 02/21: installer: Fix broken keymap change option.,
John Darrington <=
- 06/21: installer: use ice-9 format everywhere., John Darrington, 2016/12/22
- 03/21: installer: Remove obsolete procedures/variables, John Darrington, 2016/12/22
- 07/21: installer: Use ice-9 match., John Darrington, 2016/12/22
- 20/21: installer: Remove unused procedure., John Darrington, 2016/12/22
- 14/21: installer: Add alternate method of finding TZDIR., John Darrington, 2016/12/22
- 21/21: gnu: guix: Add dependency: guile-ncurses., John Darrington, 2016/12/22
- 17/21: installer: Add new procedure to get the list of volumes., John Darrington, 2016/12/22
- 18/21: installer: Add completion predicate for disk task., John Darrington, 2016/12/22
- 04/21: installer: Fix broken timezone menu., John Darrington, 2016/12/22
- 11/21: installer: Change "interfaces" from a variable to a procedure., John Darrington, 2016/12/22