guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

08/21: installer: Prepare for new wireless network features.


From: John Darrington
Subject: 08/21: installer: Prepare for new wireless network features.
Date: Sun, 29 Jan 2017 07:35:02 +0000 (UTC)

jmd pushed a commit to branch wip-installer
in repository guix.

commit 998ff46e9cb8a27e2bbb2eeb1d592fc506b14236
Author: John Darrington <address@hidden>
Date:   Tue Jan 24 13:09:38 2017 +0100

    installer: Prepare for new wireless network features.
    
    * gnu/system/installer/passphrase.scm (make-passphrase-page): Pass the 
entire
    access-point structure instead of just the network name:
    * gnu/system/installer/wireless.scm (wireless-connect): Deal with the
    consequences.
---
 gnu/system/installer/passphrase.scm |   12 ++++++++----
 gnu/system/installer/wireless.scm   |    2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/gnu/system/installer/passphrase.scm 
b/gnu/system/installer/passphrase.scm
index 18dc959..491ac8c 100644
--- a/gnu/system/installer/passphrase.scm
+++ b/gnu/system/installer/passphrase.scm
@@ -37,14 +37,14 @@
 
 (define my-fields `((passphrase   ,(M_ "Passphrase") ,max-length)))
 
-(define (make-passphrase-page parent title ifce network)
+(define (make-passphrase-page parent title ifce access-point)
   (let ((page
          (make-page (page-surface parent)
                     title
                     passphrase-refresh
                     1
                     passphrase-key-handler)))
-    (page-set-datum! page 'network network)
+    (page-set-datum! page 'access-point access-point)
     (page-set-datum! page 'ifce ifce)
     page))
 
@@ -54,13 +54,16 @@
     (page-set-initialised! page #t))
 
   (let ((form  (page-datum page 'form))
+        (access-point (page-datum page 'access-point))
         (text-window (page-datum page 'text-window)))
+
     (clear text-window)
     (addstr*
      text-window
      (gettext
       (format #f "Enter the passphrase for the network ~a."
-              (page-datum page 'network))))
+              (assq-ref access-point 'essid))))
+
     (refresh* text-window)
     (refresh* (outer (page-wwin page)))
     (refresh* (form-window form))))
@@ -68,6 +71,7 @@
 (define (passphrase-key-handler page ch)
   (let ((form  (page-datum page 'form))
         (nav   (page-datum page 'navigation))
+        (access-point (page-datum page 'access-point))
         (dev   (page-datum page 'device)))
 
     (cond
@@ -89,7 +93,7 @@
      ((select-key? ch)
       (wireless-connect
        (page-datum page 'ifce)
-       (page-datum page 'network)
+       (assq-ref access-point 'essid)
        (form-get-value form 'passphrase))
       (page-leave (cdr (cdr page-stack))))
 
diff --git a/gnu/system/installer/wireless.scm 
b/gnu/system/installer/wireless.scm
index 96c35af..a6e3b71 100644
--- a/gnu/system/installer/wireless.scm
+++ b/gnu/system/installer/wireless.scm
@@ -86,7 +86,7 @@
                          page
                          (M_ "Passphrase entry")
                          ifce
-                         (assq-ref ap 'essid))))
+                         ap)))
               (page-enter next))
             (begin
               (and (zero? (system* "ip" "link" "set" ifce "up"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]