summaryrefslogtreecommitdiff
path: root/gnu/installer/newt/page.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-11-07 21:33:32 +0100
committerMarius Bakke <marius@gnu.org>2020-11-07 21:33:32 +0100
commit32787d652460871a79f99b63230f92759e2e0de2 (patch)
treece883cac0d602b10b7c005755d035a08197e73a9 /gnu/installer/newt/page.scm
parent052939c2f6e36de00a5e756ea29a4cc96884a55d (diff)
parentc2396ceb6eb30ac87755eb8b39583403b35fbd12 (diff)
downloadguix-patches-32787d652460871a79f99b63230f92759e2e0de2.tar
guix-patches-32787d652460871a79f99b63230f92759e2e0de2.tar.gz
Merge branch 'master' into staging
Conflicts: gnu/local.mk gnu/packages/gdb.scm gnu/packages/lisp-xyz.scm gnu/packages/web-browsers.scm
Diffstat (limited to 'gnu/installer/newt/page.scm')
-rw-r--r--gnu/installer/newt/page.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/gnu/installer/newt/page.scm b/gnu/installer/newt/page.scm
index 1d6b9979b4..4209674c28 100644
--- a/gnu/installer/newt/page.scm
+++ b/gnu/installer/newt/page.scm
@@ -32,7 +32,9 @@
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
#:use-module (newt)
- #:export (draw-info-page
+ #:export (default-listbox-height
+
+ draw-info-page
draw-connecting-page
run-input-page
run-error-page
@@ -168,6 +170,10 @@ Like 'run-form', return two values: the exit reason, and an \"argument\"."
(_
(values reason argument))))))
+(define (default-listbox-height)
+ "Return the default listbox height."
+ (max 5 (- (screen-rows) 20)))
+
(define (draw-info-page text title)
"Draw an informative page with the given TEXT as content. Set the title of
this page to TITLE."
@@ -339,7 +345,8 @@ of the page is set to TITLE."
(info-textbox-width 50)
listbox-items
listbox-item->text
- (listbox-height 20)
+ (listbox-height
+ (default-listbox-height))
(listbox-default-item #f)
(listbox-allow-multiple? #f)
(sort-listbox-items? #t)