diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2022-11-03 18:00:52 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-11-15 12:16:43 +0100 |
| commit | 6b39c3afccbc2fa91746f379f46f6acfa47c8f62 (patch) | |
| tree | 4e06519c8cb4859aa87522f2958f5c3a565d27de /gnu/installer | |
| parent | 938d6161cbebf96727ec01309e7b805c04b4bda4 (diff) | |
installer: Error page width is parameterized.
* gnu/installer/newt/page.scm (run-error-page): Add #:width and honor
it.
Diffstat (limited to 'gnu/installer')
| -rw-r--r-- | gnu/installer/newt/page.scm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gnu/installer/newt/page.scm b/gnu/installer/newt/page.scm index 0f508a31c09..e1623a51fd0 100644 --- a/gnu/installer/newt/page.scm +++ b/gnu/installer/newt/page.scm | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> | 2 | ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> |
| 3 | ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org> | 3 | ;;; Copyright © 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org> |
| 4 | ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> | 4 | ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
| 5 | ;;; | 5 | ;;; |
| 6 | ;;; This file is part of GNU Guix. | 6 | ;;; This file is part of GNU Guix. |
| @@ -278,12 +278,12 @@ input box, such as FLAG-PASSWORD." | |||
| 278 | (destroy-form-and-pop form) | 278 | (destroy-form-and-pop form) |
| 279 | input)))))))) | 279 | input)))))))) |
| 280 | 280 | ||
| 281 | (define (run-error-page text title) | 281 | (define* (run-error-page text title #:key (width 40)) |
| 282 | "Run a page to inform the user of an error. The page contains the given TEXT | 282 | "Run a page to inform the user of an error. The page is WIDTH column wide |
| 283 | to explain the error and an \"OK\" button to acknowledge the error. The title | 283 | and contains the given TEXT to explain the error and an \"OK\" button to |
| 284 | of the page is set to TITLE." | 284 | acknowledge the error. The title of the page is set to TITLE." |
| 285 | (let* ((text-box | 285 | (let* ((text-box |
| 286 | (make-reflowed-textbox -1 -1 text 40 | 286 | (make-reflowed-textbox -1 -1 text width |
| 287 | #:flags FLAG-BORDER)) | 287 | #:flags FLAG-BORDER)) |
| 288 | (grid (make-grid 1 2)) | 288 | (grid (make-grid 1 2)) |
| 289 | (ok-button (make-button -1 -1 "OK")) | 289 | (ok-button (make-button -1 -1 "OK")) |
