summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2018-12-05 21:58:26 +0900
committerLudovic Courtès <ludo@gnu.org>2019-01-17 14:04:25 +0100
commit77c00b1e573776643a4cfb81415be52f436d3ef3 (patch)
tree3356ef56e3c80655a18df13a3be9c6dbfd7683ac /gnu
parent9e58d4e90e77db150fbc57a559eaa01d85ce03f6 (diff)
downloadguix-patches-77c00b1e573776643a4cfb81415be52f436d3ef3.tar
guix-patches-77c00b1e573776643a4cfb81415be52f436d3ef3.tar.gz
installer: network: Do not show an empty technology list.
If no technology is detected, ask the user if he prefers to continue or to exit the installer. * gnu/installer/newt/network.scm (run-technology-page): Run a choice-window if technology-items procedure returns an empty list.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/installer/newt/network.scm38
1 files changed, 26 insertions, 12 deletions
diff --git a/gnu/installer/newt/network.scm b/gnu/installer/newt/network.scm
index ee6af0674e..64fab2ae9f 100644
--- a/gnu/installer/newt/network.scm
+++ b/gnu/installer/newt/network.scm
@@ -53,18 +53,32 @@ Internet and return the selected technology. For now, only technologies with
(string=? type "wifi"))))
(connman-technologies)))
- (run-listbox-selection-page
- #:info-text (G_ "The install process requires an internet access.\
- Please select a network technology.")
- #:title (G_ "Internet access")
- #:listbox-items (technology-items)
- #:listbox-item->text technology->text
- #:button-text (G_ "Exit")
- #:button-callback-procedure
- (lambda _
- (raise
- (condition
- (&installer-step-abort))))))
+ (let ((items (technology-items)))
+ (if (null? items)
+ (case (choice-window
+ (G_ "Internet access")
+ (G_ "Continue")
+ (G_ "Exit")
+ (G_ "The install process requires an internet access, but no \
+network device were found. Do you want to continue anyway?"))
+ ((1) (raise
+ (condition
+ (&installer-step-break))))
+ ((2) (raise
+ (condition
+ (&installer-step-abort)))))
+ (run-listbox-selection-page
+ #:info-text (G_ "The install process requires an internet access.\
+ Please select a network device.")
+ #:title (G_ "Internet access")
+ #:listbox-items items
+ #:listbox-item->text technology->text
+ #:button-text (G_ "Exit")
+ #:button-callback-procedure
+ (lambda _
+ (raise
+ (condition
+ (&installer-step-abort))))))))
(define (find-technology-by-type technologies type)
"Find and return a technology with the given TYPE in TECHNOLOGIES list."