diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2018-12-06 11:00:43 +0900 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-01-17 14:04:25 +0100 |
commit | 3d0f6a055c366a5414c35262bb4b31c0f602fcd3 (patch) | |
tree | 2fc3cee8c1c614df08ea4a6da05c9b7021f11151 | |
parent | d700d131be31bd2838206bfc13ddd418affb185b (diff) | |
download | guix-3d0f6a055c366a5414c35262bb4b31c0f602fcd3.tar.gz |
installer: Make exit button optional for run-file-textbox-page.
* gnu/installer/newt/page.scm (run-file-textbox-page)[exit-button?]: New argument.
-rw-r--r-- | gnu/installer/newt/page.scm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gnu/installer/newt/page.scm b/gnu/installer/newt/page.scm index c6577c8a8c..c0d7547293 100644 --- a/gnu/installer/newt/page.scm +++ b/gnu/installer/newt/page.scm @@ -480,6 +480,7 @@ ITEMS when 'Ok' is pressed." (info-textbox-width 50) (file-textbox-width 50) (file-textbox-height 30) + (exit-button? #t) (ok-button-callback-procedure (const #t)) (exit-button-callback-procedure @@ -500,9 +501,12 @@ ITEMS when 'Ok' is pressed." GRID-ELEMENT-COMPONENT info-textbox GRID-ELEMENT-COMPONENT file-textbox GRID-ELEMENT-SUBGRID - (horizontal-stacked-grid + (apply + horizontal-stacked-grid GRID-ELEMENT-COMPONENT ok-button - GRID-ELEMENT-COMPONENT exit-button))) + `(,@(if exit-button? + (list GRID-ELEMENT-COMPONENT exit-button) + '()))))) (form (make-form))) (set-textbox-text file-textbox file-text) @@ -519,7 +523,8 @@ ITEMS when 'Ok' is pressed." (cond ((components=? argument ok-button) (ok-button-callback-procedure)) - ((components=? argument exit-button) + ((and exit-button? + (components=? argument exit-button)) (exit-button-callback-procedure)))))) (lambda () (destroy-form-and-pop form)))))) |