installer: Turn "Cancel" buttons into "Exit" buttons.

This change and previous ones were,
Suggested-by: Thorsten Wilms <t_w_@freenet.de>
here: https://lists.gnu.org/archive/html/guix-devel/2018-11/msg00330.html

gnu/installer/newt/ethernet.scm: Turn cancel into exit.
gnu/installer/newt/final.scm: Ditto.
gnu/installer/newt/keymap.scm: Ditto.
gnu/installer/newt/locale.scm: Ditto.
gnu/installer/newt/network.scm: Ditto.
gnu/installer/newt/page.scm: Ditto.
gnu/installer/newt/partition.scm: Ditto.
gnu/installer/newt/services.scm: Ditto.
gnu/installer/newt/timezone.scm: Ditto.
gnu/installer/newt/user.scm: Ditto.
gnu/installer/newt/wifi.scm: Ditto.
This commit is contained in:
Mathieu Othacehe 2018-12-05 19:50:17 +09:00 committed by Ludovic Courtès
parent 30cf5e0426
commit 7d812901da
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
11 changed files with 42 additions and 42 deletions

View file

@ -72,7 +72,7 @@ (define (run-ethernet-page)
#:title (G_ "Ethernet connection") #:title (G_ "Ethernet connection")
#:listbox-items services #:listbox-items services
#:listbox-item->text ethernet-service->text #:listbox-item->text ethernet-service->text
#:button-text (G_ "Cancel") #:button-text (G_ "Exit")
#:button-callback-procedure #:button-callback-procedure
(lambda _ (lambda _
(raise (raise

View file

@ -42,7 +42,7 @@ (define (run-config-display-page)
#:info-textbox-width width #:info-textbox-width width
#:file-textbox-width width #:file-textbox-width width
#:file-textbox-height height #:file-textbox-height height
#:cancel-button-callback-procedure #:exit-button-callback-procedure
(lambda () (lambda ()
(raise (raise
(condition (condition

View file

@ -35,7 +35,7 @@ (define (run-layout-page layouts layout->text)
#:info-text (G_ "Please choose your keyboard layout.") #:info-text (G_ "Please choose your keyboard layout.")
#:listbox-items layouts #:listbox-items layouts
#:listbox-item->text layout->text #:listbox-item->text layout->text
#:button-text (G_ "Cancel") #:button-text (G_ "Exit")
#:button-callback-procedure #:button-callback-procedure
(lambda _ (lambda _
(raise (raise

View file

@ -45,7 +45,7 @@ (define (run-language-page languages language->text)
#:listbox-items languages #:listbox-items languages
#:listbox-item->text language->text #:listbox-item->text language->text
#:sort-listbox-items? #f #:sort-listbox-items? #f
#:button-text (G_ "Cancel") #:button-text (G_ "Exit")
#:button-callback-procedure #:button-callback-procedure
(lambda _ (lambda _
(raise (raise

View file

@ -59,7 +59,7 @@ (define (technology-items)
#:title (G_ "Internet access") #:title (G_ "Internet access")
#:listbox-items (technology-items) #:listbox-items (technology-items)
#:listbox-item->text technology->text #:listbox-item->text technology->text
#:button-text (G_ "Cancel") #:button-text (G_ "Exit")
#:button-callback-procedure #:button-callback-procedure
(lambda _ (lambda _
(raise (raise

View file

@ -404,12 +404,12 @@ (define* (run-checkbox-tree-page #:key
(checkbox-tree-height 10) (checkbox-tree-height 10)
(ok-button-callback-procedure (ok-button-callback-procedure
(const #t)) (const #t))
(cancel-button-callback-procedure (exit-button-callback-procedure
(const #t))) (const #t)))
"Run a page allowing the user to select one or multiple items among ITEMS in "Run a page allowing the user to select one or multiple items among ITEMS in
a checkbox list. The page contains vertically stacked from the top to the a checkbox list. The page contains vertically stacked from the top to the
bottom, an informative text set to INFO-TEXT, the checkbox list and two bottom, an informative text set to INFO-TEXT, the checkbox list and two
buttons, 'Ok' and 'Cancel'. The page title's is set to TITLE. ITEMS are buttons, 'Ok' and 'Exit'. The page title's is set to TITLE. ITEMS are
converted to text using ITEM->TEXT before being displayed in the checkbox converted to text using ITEM->TEXT before being displayed in the checkbox
list. list.
@ -417,7 +417,7 @@ (define* (run-checkbox-tree-page #:key
displayed. CHECKBOX-TREE-HEIGHT is the height of the checkbox list. displayed. CHECKBOX-TREE-HEIGHT is the height of the checkbox list.
OK-BUTTON-CALLBACK-PROCEDURE is called when the 'Ok' button is pressed. OK-BUTTON-CALLBACK-PROCEDURE is called when the 'Ok' button is pressed.
CANCEL-BUTTON-CALLBACK-PROCEDURE is called when the 'Cancel' button is EXIT-BUTTON-CALLBACK-PROCEDURE is called when the 'Exit' button is
pressed. pressed.
This procedure returns the list of checked items in the checkbox list among This procedure returns the list of checked items in the checkbox list among
@ -439,14 +439,14 @@ (define (fill-checkbox-tree checkbox-tree items)
info-textbox-width info-textbox-width
#:flags FLAG-BORDER)) #:flags FLAG-BORDER))
(ok-button (make-button -1 -1 (G_ "Ok"))) (ok-button (make-button -1 -1 (G_ "Ok")))
(cancel-button (make-button -1 -1 (G_ "Cancel"))) (exit-button (make-button -1 -1 (G_ "Exit")))
(grid (vertically-stacked-grid (grid (vertically-stacked-grid
GRID-ELEMENT-COMPONENT info-textbox GRID-ELEMENT-COMPONENT info-textbox
GRID-ELEMENT-COMPONENT checkbox-tree GRID-ELEMENT-COMPONENT checkbox-tree
GRID-ELEMENT-SUBGRID GRID-ELEMENT-SUBGRID
(horizontal-stacked-grid (horizontal-stacked-grid
GRID-ELEMENT-COMPONENT ok-button GRID-ELEMENT-COMPONENT ok-button
GRID-ELEMENT-COMPONENT cancel-button))) GRID-ELEMENT-COMPONENT exit-button)))
(keys (fill-checkbox-tree checkbox-tree items)) (keys (fill-checkbox-tree checkbox-tree items))
(form (make-form))) (form (make-form)))
@ -468,8 +468,8 @@ (define (fill-checkbox-tree checkbox-tree items)
entries))) entries)))
(ok-button-callback-procedure) (ok-button-callback-procedure)
current-items)) current-items))
((components=? argument cancel-button) ((components=? argument exit-button)
(cancel-button-callback-procedure)))))) (exit-button-callback-procedure))))))
(lambda () (lambda ()
(destroy-form-and-pop form)))))) (destroy-form-and-pop form))))))
@ -482,7 +482,7 @@ (define* (run-file-textbox-page #:key
(file-textbox-height 30) (file-textbox-height 30)
(ok-button-callback-procedure (ok-button-callback-procedure
(const #t)) (const #t))
(cancel-button-callback-procedure (exit-button-callback-procedure
(const #t))) (const #t)))
(let* ((info-textbox (let* ((info-textbox
(make-reflowed-textbox -1 -1 info-text (make-reflowed-textbox -1 -1 info-text
@ -495,14 +495,14 @@ (define* (run-file-textbox-page #:key
file-textbox-height file-textbox-height
(logior FLAG-SCROLL FLAG-BORDER))) (logior FLAG-SCROLL FLAG-BORDER)))
(ok-button (make-button -1 -1 (G_ "Ok"))) (ok-button (make-button -1 -1 (G_ "Ok")))
(cancel-button (make-button -1 -1 (G_ "Cancel"))) (exit-button (make-button -1 -1 (G_ "Exit")))
(grid (vertically-stacked-grid (grid (vertically-stacked-grid
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 (horizontal-stacked-grid
GRID-ELEMENT-COMPONENT ok-button GRID-ELEMENT-COMPONENT ok-button
GRID-ELEMENT-COMPONENT cancel-button))) 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 +519,7 @@ (define* (run-file-textbox-page #:key
(cond (cond
((components=? argument ok-button) ((components=? argument ok-button)
(ok-button-callback-procedure)) (ok-button-callback-procedure))
((components=? argument cancel-button) ((components=? argument exit-button)
(cancel-button-callback-procedure)))))) (exit-button-callback-procedure))))))
(lambda () (lambda ()
(destroy-form-and-pop form)))))) (destroy-form-and-pop form))))))

View file

@ -32,7 +32,7 @@ (define-module (gnu installer newt partition)
#:use-module (parted) #:use-module (parted)
#:export (run-partioning-page)) #:export (run-partioning-page))
(define (button-cancel-action) (define (button-exit-action)
"Raise the &installer-step-abort condition." "Raise the &installer-step-abort condition."
(raise (raise
(condition (condition
@ -48,8 +48,8 @@ (define (run-scheme-page)
#:title (G_ "Partition scheme") #:title (G_ "Partition scheme")
#:listbox-items items #:listbox-items items
#:listbox-item->text cdr #:listbox-item->text cdr
#:button-text (G_ "Cancel") #:button-text (G_ "Exit")
#:button-callback-procedure button-cancel-action))) #:button-callback-procedure button-exit-action)))
(car result))) (car result)))
(define (draw-formating-page) (define (draw-formating-page)
@ -71,8 +71,8 @@ (define (device-items)
#:title (G_ "Disk") #:title (G_ "Disk")
#:listbox-items (device-items) #:listbox-items (device-items)
#:listbox-item->text cdr #:listbox-item->text cdr
#:button-text (G_ "Cancel") #:button-text (G_ "Exit")
#:button-callback-procedure button-cancel-action)) #:button-callback-procedure button-exit-action))
(device (car result))) (device (car result)))
device)) device))
@ -84,7 +84,7 @@ (define (run-label-page button-callback)
#:title (G_ "Partition table") #:title (G_ "Partition table")
#:listbox-items '("msdos" "gpt") #:listbox-items '("msdos" "gpt")
#:listbox-item->text identity #:listbox-item->text identity
#:button-text (G_ "Cancel") #:button-text (G_ "Exit")
#:button-callback-procedure button-callback)) #:button-callback-procedure button-callback))
(define (run-type-page partition) (define (run-type-page partition)
@ -103,8 +103,8 @@ (define (run-type-page partition)
#:listbox-items items #:listbox-items items
#:listbox-item->text symbol->string #:listbox-item->text symbol->string
#:sort-listbox-items? #f #:sort-listbox-items? #f
#:button-text (G_ "Cancel") #:button-text (G_ "Exit")
#:button-callback-procedure button-cancel-action))) #:button-callback-procedure button-exit-action)))
(define (run-fs-type-page) (define (run-fs-type-page)
"Run a page asking the user to select a file-system type." "Run a page asking the user to select a file-system type."
@ -114,8 +114,8 @@ (define (run-fs-type-page)
#:listbox-items '(ext4 btrfs fat32 swap) #:listbox-items '(ext4 btrfs fat32 swap)
#:listbox-item->text user-fs-type-name #:listbox-item->text user-fs-type-name
#:sort-listbox-items? #f #:sort-listbox-items? #f
#:button-text (G_ "Cancel") #:button-text (G_ "Exit")
#:button-callback-procedure button-cancel-action)) #:button-callback-procedure button-exit-action))
(define (inform-can-create-partition? user-partition) (define (inform-can-create-partition? user-partition)
"Return #t if it is possible to create USER-PARTITION. This is determined by "Return #t if it is possible to create USER-PARTITION. This is determined by
@ -563,7 +563,7 @@ (define (hotkey-action key listbox-item)
path)) path))
(result (choice-window (G_ "Delete disk") (result (choice-window (G_ "Delete disk")
(G_ "Ok") (G_ "Ok")
(G_ "Cancel") (G_ "Exit")
info-text))) info-text)))
(case result (case result
((1) ((1)
@ -584,7 +584,7 @@ (define (hotkey-action key listbox-item)
number-str)) number-str))
(result (choice-window (G_ "Delete partition") (result (choice-window (G_ "Delete partition")
(G_ "Ok") (G_ "Ok")
(G_ "Cancel") (G_ "Exit")
info-text))) info-text)))
(case result (case result
((1) ((1)
@ -616,8 +616,8 @@ (define (hotkey-action key listbox-item)
#:allow-delete? #t #:allow-delete? #t
#:button-text (G_ "Ok") #:button-text (G_ "Ok")
#:button-callback-procedure button-ok-action #:button-callback-procedure button-ok-action
#:button2-text (G_ "Cancel") #:button2-text (G_ "Exit")
#:button2-callback-procedure button-cancel-action #:button2-callback-procedure button-exit-action
#:listbox-callback-procedure listbox-action #:listbox-callback-procedure listbox-action
#:hotkey-callback-procedure hotkey-action))) #:hotkey-callback-procedure hotkey-action)))
(if (eq? result #t) (if (eq? result #t)
@ -664,8 +664,8 @@ (define (run-page devices)
#:title (G_ "Partitioning method") #:title (G_ "Partitioning method")
#:listbox-items items #:listbox-items items
#:listbox-item->text cdr #:listbox-item->text cdr
#:button-text (G_ "Cancel") #:button-text (G_ "Exit")
#:button-callback-procedure button-cancel-action)) #:button-callback-procedure button-exit-action))
(method (car result))) (method (car result)))
(case method (case method
((entire) ((entire)
@ -674,7 +674,7 @@ (define (run-page devices)
(disk (if disk-type (disk (if disk-type
(disk-new device) (disk-new device)
(let* ((label (run-label-page (let* ((label (run-label-page
button-cancel-action)) button-exit-action))
(disk (mklabel device label))) (disk (mklabel device label)))
(disk-commit disk) (disk-commit disk)
disk))) disk)))

View file

@ -38,7 +38,7 @@ (define (run-desktop-environments-cbt-page)
#:items %desktop-environments #:items %desktop-environments
#:item->text desktop-environment-name #:item->text desktop-environment-name
#:checkbox-tree-height 5 #:checkbox-tree-height 5
#:cancel-button-callback-procedure #:exit-button-callback-procedure
(lambda () (lambda ()
(raise (raise
(condition (condition

View file

@ -60,7 +60,7 @@ (define (loop path)
#:listbox-items timezones #:listbox-items timezones
#:listbox-item->text identity #:listbox-item->text identity
#:button-text (if (null? path) #:button-text (if (null? path)
(G_ "Cancel") (G_ "Exit")
(G_ "Back")) (G_ "Back"))
#:button-callback-procedure #:button-callback-procedure
(if (null? path) (if (null? path)

View file

@ -116,7 +116,7 @@ (define (run users)
'() '()
(list GRID-ELEMENT-COMPONENT del-button))))) (list GRID-ELEMENT-COMPONENT del-button)))))
(ok-button (make-button -1 -1 (G_ "Ok"))) (ok-button (make-button -1 -1 (G_ "Ok")))
(cancel-button (make-button -1 -1 (G_ "Cancel"))) (exit-button (make-button -1 -1 (G_ "Exit")))
(title "User creation") (title "User creation")
(grid (grid
(vertically-stacked-grid (vertically-stacked-grid
@ -126,7 +126,7 @@ (define (run users)
GRID-ELEMENT-SUBGRID listbox-button-grid) GRID-ELEMENT-SUBGRID listbox-button-grid)
GRID-ELEMENT-SUBGRID (horizontal-stacked-grid GRID-ELEMENT-SUBGRID (horizontal-stacked-grid
GRID-ELEMENT-COMPONENT ok-button GRID-ELEMENT-COMPONENT ok-button
GRID-ELEMENT-COMPONENT cancel-button))) GRID-ELEMENT-COMPONENT exit-button)))
(sorted-users (sort users (lambda (a b) (sorted-users (sort users (lambda (a b)
(string<= (user-name a) (string<= (user-name a)
(user-name b))))) (user-name b)))))

View file

@ -198,7 +198,7 @@ (define (run-wifi-page)
(make-reflowed-textbox -1 -1 info-text (make-reflowed-textbox -1 -1 info-text
(info-textbox-width) (info-textbox-width)
#:flags FLAG-BORDER)) #:flags FLAG-BORDER))
(cancel-button (make-button -1 -1 (G_ "Cancel"))) (exit-button (make-button -1 -1 (G_ "Exit")))
(scan-button (make-button -1 -1 (G_ "Scan"))) (scan-button (make-button -1 -1 (G_ "Scan")))
(services (wifi-services)) (services (wifi-services))
(service-items '())) (service-items '()))
@ -211,12 +211,12 @@ (define (run-wifi-page)
(set-grid-field middle-grid 1 0 GRID-ELEMENT-COMPONENT scan-button (set-grid-field middle-grid 1 0 GRID-ELEMENT-COMPONENT scan-button
#:anchor ANCHOR-TOP #:anchor ANCHOR-TOP
#:pad-left 2) #:pad-left 2)
(set-grid-field buttons-grid 0 0 GRID-ELEMENT-COMPONENT cancel-button) (set-grid-field buttons-grid 0 0 GRID-ELEMENT-COMPONENT exit-button)
(add-components-to-form form (add-components-to-form form
info-textbox info-textbox
listbox scan-button listbox scan-button
cancel-button) exit-button)
(make-wrapped-grid-window (make-wrapped-grid-window
(basic-window-grid info-textbox middle-grid buttons-grid) (basic-window-grid info-textbox middle-grid buttons-grid)
(G_ "Wifi")) (G_ "Wifi"))
@ -231,7 +231,7 @@ (define (run-wifi-page)
((components=? argument scan-button) ((components=? argument scan-button)
(run-wifi-scan-page) (run-wifi-scan-page)
(run-wifi-page)) (run-wifi-page))
((components=? argument cancel-button) ((components=? argument exit-button)
(raise (raise
(condition (condition
(&installer-step-abort)))) (&installer-step-abort))))