diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2020-03-30 12:24:56 +0200 |
---|---|---|
committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2020-04-06 15:06:03 +0200 |
commit | 786c9c39bc0826737e99f0c750ea30033cdbc202 (patch) | |
tree | fbcd5bc021f312a2fed88013a1a526c6d0458c92 /gnu/installer/newt.scm | |
parent | a274bba2f939ae6637ec613bd0537ba415945835 (diff) | |
download | guix-786c9c39bc0826737e99f0c750ea30033cdbc202.tar guix-786c9c39bc0826737e99f0c750ea30033cdbc202.tar.gz |
installer: Add a help page.
* gnu/installer/newt/help.scm: New file.
* gnu/local.mk (INSTALLER_MODULES): Add it.
* po/guix/POTFILES.in: Add it.
* gnu/installer/record.scm (<installer>): Add 'help-menu' and 'help-page'
fields,
(installer-help-menu, installer-help-page): new exported procedures.
* gnu/installer/newt.scm (init): Set the help line,
(help-menu, help-page): new procedures used ...
(newt-installer): ... here.
* gnu/installer/newt/keymap.scm (run-layout-page): Add a context argument to
differenciate the help context from the main one,
(run-keymap-page): add a context argument and pass it to run-layout-page.
* gnu/installer.scm (compute-keymap-step): Add a context argument and pass it
to 'installer-keymap-page',
(installer-steps): set the help menu and pass the appropriate context to
compute-keymap-step calls,
(guile-newt): update to revision 2.
Diffstat (limited to 'gnu/installer/newt.scm')
-rw-r--r-- | gnu/installer/newt.scm | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/gnu/installer/newt.scm b/gnu/installer/newt.scm index 6c44b4acf6..7ac015eaad 100644 --- a/gnu/installer/newt.scm +++ b/gnu/installer/newt.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,6 +21,7 @@ #:use-module (gnu installer utils) #:use-module (gnu installer newt ethernet) #:use-module (gnu installer newt final) + #:use-module (gnu installer newt help) #:use-module (gnu installer newt hostname) #:use-module (gnu installer newt keymap) #:use-module (gnu installer newt locale) @@ -44,7 +45,9 @@ (define (init) (newt-init) (clear-screen) - (set-screen-size!)) + (set-screen-size!) + (push-help-line + (format #f (G_ "Press <F1> for help.")))) (define (exit) (newt-finish) @@ -91,8 +94,8 @@ problem. The backtrace is displayed below. Please report it by email to \ (define (menu-page steps) (run-menu-page steps)) -(define* (keymap-page layouts) - (run-keymap-page layouts)) +(define* (keymap-page layouts context) + (run-keymap-page layouts #:context context)) (define (network-page) (run-network-page)) @@ -109,6 +112,12 @@ problem. The backtrace is displayed below. Please report it by email to \ (define (services-page) (run-services-page)) +(define (help-menu menu-proc) + (newt-set-help-callback menu-proc)) + +(define (help-page keyboard-layout-selection) + (run-help-page keyboard-layout-selection)) + (define newt-installer (installer (name 'newt) @@ -125,4 +134,6 @@ problem. The backtrace is displayed below. Please report it by email to \ (user-page user-page) (partition-page partition-page) (services-page services-page) - (welcome-page welcome-page))) + (welcome-page welcome-page) + (help-menu help-menu) + (help-page help-page))) |