aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/tryton.scm
diff options
context:
space:
mode:
authorZheng Junjie <zhengjunjie@iscas.ac.cn>2024-11-07 19:00:09 +0800
committerZheng Junjie <zhengjunjie@iscas.ac.cn>2024-11-12 12:20:38 +0800
commitcea2e7633ddbce9ce467d752d1db61f7d6c63aa9 (patch)
tree254f83ef81efcc398a4d815411bbfc377df5a02c /gnu/packages/tryton.scm
parentef84004825cd8a60734258c054bed194c6628f8e (diff)
downloadguix-cea2e7633ddbce9ce467d752d1db61f7d6c63aa9.tar.gz
guix-cea2e7633ddbce9ce467d752d1db61f7d6c63aa9.zip
gnu: liblouisutdml: Update to 2.12.0-0.00ca783.
* gnu/packages/language.scm (liblouisutdml): Update to 2.12.0-0.00ca783. [arguments]: Use G-expressions. [native-inputs]: Remove labels. [propagated-inputs]: Remove labels. Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail> Change-Id: Iedbcb5b3073f26a42805ae02550a28f6f1abee86
Diffstat (limited to 'gnu/packages/tryton.scm')
0 files changed, 0 insertions, 0 deletions
) listbox-key)) service-items)) (service (service-item-service item)) (service-name (service-name service)) (form (draw-connecting-page service-name))) (dynamic-wind (const #t) (lambda () (guard (c ((connman-password-error? c) (run-wrong-password-page service-name) #f) ((connman-already-connected-error? c) #t) ((connman-connection-error? c) (run-unknown-error-page service-name) #f)) (connman-connect-with-auth service password-callback))) (lambda () (destroy-form-and-pop form))))) (define (run-wifi-scan-page) "Force a wifi scan and draw a page during the operation." (let ((form (draw-scanning-page))) (force-wifi-scan) (destroy-form-and-pop form))) (define (wifi-services) "Return all the connman services of wifi type." (let ((services (connman-services))) (filter (lambda (service) (and (string=? (service-type service) "wifi") (service-name service) (not (string-null? (service-name service))))) services))) (define* (fill-wifi-services listbox wifi-services) "Append all the services in WIFI-SERVICES to the given LISTBOX." (clear-listbox listbox) (map (lambda (service) (let* ((text (service->text service)) (key (append-entry-to-listbox listbox text))) (service-item (service service) (key key)))) wifi-services)) ;; Maximum length of a wifi service name. (define service-name-max-length (make-parameter 20)) ;; Height of the listbox displaying wifi services. (define wifi-listbox-height (make-parameter (default-listbox-height))) ;; Information textbox width. (define info-textbox-width (make-parameter 40)) (define (service->text service) "Return a string composed of the name and the strength of the given SERVICE. A '*' preceding the service name indicates that it is connected." (let* ((name (service-name service)) (padded-name (string-pad-right name (service-name-max-length))) (strength (service-strength service)) (strength-string (strength->string strength)) (state (service-state service)) (connected? (or (string=? state "online") (string=? state "ready")))) (format #f "~c ~a ~a~%" (if connected? #\* #\ ) padded-name strength-string))) (define (run-wifi-page) "Run a page displaying available wifi networks in a listbox. Connect to the network when the corresponding listbox entry is selected. A button allow to force a wifi scan." (let* ((listbox (make-listbox -1 -1 (wifi-listbox-height) (logior FLAG-SCROLL FLAG-BORDER FLAG-RETURNEXIT))) (form (make-form)) (buttons-grid (make-grid 1 1)) (middle-grid (make-grid 2 1)) (info-text (G_ "Please select a wifi network.")) (info-textbox (make-reflowed-textbox -1 -1 info-text (info-textbox-width) #:flags FLAG-BORDER)) (exit-button (make-button -1 -1 (G_ "Exit"))) (scan-button (make-button -1 -1 (G_ "Scan"))) (services (wifi-services)) (service-items '())) (if (null? services) (append-entry-to-listbox listbox (G_ "No wifi detected")) (set! service-items (fill-wifi-services listbox services))) (set-grid-field middle-grid 0 0 GRID-ELEMENT-COMPONENT listbox) (set-grid-field middle-grid 1 0 GRID-ELEMENT-COMPONENT scan-button #:anchor ANCHOR-TOP #:pad-left 2) (set-grid-field buttons-grid 0 0 GRID-ELEMENT-COMPONENT exit-button) (add-components-to-form form info-textbox listbox scan-button exit-button) (make-wrapped-grid-window (basic-window-grid info-textbox middle-grid buttons-grid) (G_ "Wifi")) (receive (exit-reason argument) (run-form form) (dynamic-wind (const #t) (lambda () (when (eq? exit-reason 'exit-component) (cond ((components=? argument scan-button) (run-wifi-scan-page) (run-wifi-page)) ((components=? argument exit-button) (abort-to-prompt 'installer-step 'abort)) ((components=? argument listbox) (let ((result (connect-wifi-service listbox service-items))) (unless result (run-wifi-page))))))) (lambda () (destroy-form-and-pop form))))))