installer: Make exit button optional for run-file-textbox-page.

* gnu/installer/newt/page.scm (run-file-textbox-page)[exit-button?]: New argument.
This commit is contained in:
Mathieu Othacehe 2018-12-06 11:00:43 +09:00 committed by Ludovic Courtès
parent d700d131be
commit 3d0f6a055c
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 8 additions and 3 deletions

View File

@ -480,6 +480,7 @@ ITEMS when 'Ok' is pressed."
(info-textbox-width 50) (info-textbox-width 50)
(file-textbox-width 50) (file-textbox-width 50)
(file-textbox-height 30) (file-textbox-height 30)
(exit-button? #t)
(ok-button-callback-procedure (ok-button-callback-procedure
(const #t)) (const #t))
(exit-button-callback-procedure (exit-button-callback-procedure
@ -500,9 +501,12 @@ ITEMS when 'Ok' is pressed."
GRID-ELEMENT-COMPONENT info-textbox GRID-ELEMENT-COMPONENT info-textbox
GRID-ELEMENT-COMPONENT file-textbox GRID-ELEMENT-COMPONENT file-textbox
GRID-ELEMENT-SUBGRID GRID-ELEMENT-SUBGRID
(horizontal-stacked-grid (apply
horizontal-stacked-grid
GRID-ELEMENT-COMPONENT ok-button GRID-ELEMENT-COMPONENT ok-button
GRID-ELEMENT-COMPONENT exit-button))) `(,@(if exit-button?
(list GRID-ELEMENT-COMPONENT exit-button)
'())))))
(form (make-form))) (form (make-form)))
(set-textbox-text file-textbox file-text) (set-textbox-text file-textbox file-text)
@ -519,7 +523,8 @@ ITEMS when 'Ok' is pressed."
(cond (cond
((components=? argument ok-button) ((components=? argument ok-button)
(ok-button-callback-procedure)) (ok-button-callback-procedure))
((components=? argument exit-button) ((and exit-button?
(components=? argument exit-button))
(exit-button-callback-procedure)))))) (exit-button-callback-procedure))))))
(lambda () (lambda ()
(destroy-form-and-pop form)))))) (destroy-form-and-pop form))))))