diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-04-28 21:45:16 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-04-28 22:57:07 +0200 |
commit | 1d9fcdacf90764cf168ecaad5f139e7d21a4d7c6 (patch) | |
tree | f035e06acb8547b0b17972145af32a65eae734c8 /gnu/installer/newt | |
parent | 7253c2b6297f85ec94512a2cff39ab25df043ad9 (diff) | |
download | patches-1d9fcdacf90764cf168ecaad5f139e7d21a4d7c6.tar patches-1d9fcdacf90764cf168ecaad5f139e7d21a4d7c6.tar.gz |
installer: Recommended services are pre-selected.
* gnu/installer/services.scm (<system-service>)[recommended?]: New
field.
* gnu/installer/newt/services.scm (run-desktop-environments-cbt-page):
Pass #:selection to 'run-checkbox-tree-page', computed from the
'recommended?' field of each service.
(run-networking-cbt-page): Likewise.
Diffstat (limited to 'gnu/installer/newt')
-rw-r--r-- | gnu/installer/newt/services.scm | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/gnu/installer/newt/services.scm b/gnu/installer/newt/services.scm index 2a221790d2..4f32d9077b 100644 --- a/gnu/installer/newt/services.scm +++ b/gnu/installer/newt/services.scm @@ -31,36 +31,40 @@ (define (run-desktop-environments-cbt-page) "Run a page allowing the user to choose between various desktop environments." - (run-checkbox-tree-page - #:info-text (G_ "Please select the desktop(s) environment(s) you wish to \ + (let ((items (filter desktop-system-service? %system-services))) + (run-checkbox-tree-page + #:info-text (G_ "Please select the desktop(s) environment(s) you wish to \ install. If you select multiple desktops environments, you will be able to \ choose the one to use on the log-in screen.") - #:title (G_ "Desktop environment") - #:items (filter desktop-system-service? %system-services) - #:item->text system-service-name ;no i18n for DE names - #:checkbox-tree-height 5 - #:exit-button-callback-procedure - (lambda () - (raise - (condition - (&installer-step-abort)))))) + #:title (G_ "Desktop environment") + #:items items + #:selection (map system-service-recommended? items) + #:item->text system-service-name ;no i18n for DE names + #:checkbox-tree-height 8 + #:exit-button-callback-procedure + (lambda () + (raise + (condition + (&installer-step-abort))))))) (define (run-networking-cbt-page) "Run a page allowing the user to select networking services." - (run-checkbox-tree-page - #:info-text (G_ "You can now select networking services to run on your \ + (let ((items (filter (lambda (service) + (eq? 'networking (system-service-type service))) + %system-services))) + (run-checkbox-tree-page + #:info-text (G_ "You can now select networking services to run on your \ system.") - #:title (G_ "Network service") - #:items (filter (lambda (service) - (eq? 'networking (system-service-type service))) - %system-services) - #:item->text (compose G_ system-service-name) - #:checkbox-tree-height 5 - #:exit-button-callback-procedure - (lambda () - (raise - (condition - (&installer-step-abort)))))) + #:title (G_ "Network service") + #:items items + #:selection (map system-service-recommended? items) + #:item->text (compose G_ system-service-name) + #:checkbox-tree-height 5 + #:exit-button-callback-procedure + (lambda () + (raise + (condition + (&installer-step-abort))))))) (define (run-network-management-page) "Run a page to select among several network management methods." |