[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/197: installer: Fix broken keymap change option.
From: |
Danny Milosavljevic |
Subject: |
02/197: installer: Fix broken keymap change option. |
Date: |
Mon, 3 Jul 2017 20:36:50 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit 1024125ed12b08e2bf6cbb91d59b530e01e66926
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-2 created (now ff63588), Danny Milosavljevic, 2017/07/03
- 04/197: installer: Fix broken timezone menu., Danny Milosavljevic, 2017/07/03
- 05/197: installer: fix warning in usage of "format"., Danny Milosavljevic, 2017/07/03
- 02/197: installer: Fix broken keymap change option.,
Danny Milosavljevic <=
- 07/197: installer: Use ice-9 match., Danny Milosavljevic, 2017/07/03
- 12/197: installer: Use call-with-temporary-output-file., Danny Milosavljevic, 2017/07/03
- 08/197: installer: Add IETF contraints for hostname in entry form., Danny Milosavljevic, 2017/07/03
- 06/197: installer: use ice-9 format everywhere., Danny Milosavljevic, 2017/07/03
- 11/197: installer: Change "interfaces" from a variable to a procedure., Danny Milosavljevic, 2017/07/03
- 16/197: installer: Add new procedure to get the list of volumes., Danny Milosavljevic, 2017/07/03
- 15/197: installer: Use %default-subsitute-urls instead of our own variable., Danny Milosavljevic, 2017/07/03
- 19/197: installer: Remove unused procedure., Danny Milosavljevic, 2017/07/03
- 18/197: installer: Handle the 'back' action in the filesystems task., Danny Milosavljevic, 2017/07/03
- 13/197: installer: Add alternate method of finding TZDIR., Danny Milosavljevic, 2017/07/03