guix-commits
[Top][All Lists]
Advanced

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

06/26: installer: Add an explanatory text to the main page.


From: John Darrington
Subject: 06/26: installer: Add an explanatory text to the main page.
Date: Sun, 22 Jan 2017 12:09:24 +0000 (UTC)

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

commit f748a8bb91deecc80bed3d7a98849cc4e9b21c72
Author: John Darrington <address@hidden>
Date:   Tue Jan 17 08:06:46 2017 +0100

    installer: Add an explanatory text to the main page.
    
    * gnu/system/installer/guixsd-installer.scm (main-page-init): Add
    a text box and some text for it.
---
 gnu/system/installer/guixsd-installer.scm |   41 ++++++++++++++++++-----------
 1 file changed, 25 insertions(+), 16 deletions(-)

diff --git a/gnu/system/installer/guixsd-installer.scm 
b/gnu/system/installer/guixsd-installer.scm
index cb930be..0d5c320 100644
--- a/gnu/system/installer/guixsd-installer.scm
+++ b/gnu/system/installer/guixsd-installer.scm
@@ -222,32 +222,41 @@ tail of the list."
 (define (main-page-init page)
   (let* ((frame (make-boxed-window (page-surface page) (lines) (cols) 0 0
                                    #:title (page-title page)))
-         (background (inner frame)))
+         (background (inner frame))
 
-    (let ((win (derwin background (- (getmaxy background) 3)
-                      (- (getmaxx background) 2) 0 1 #:panel #f))
-         (main-menu (make-menu main-options
-                               #:disp-proc (lambda (datum row)
-                                              (format #f "~a"
-                                                      (task-title (cdr 
datum)))))))
 
-      (page-set-wwin! page frame)
-      (page-set-datum! page 'menu main-menu)
-      (menu-post main-menu win))
+        (text-window (derwin background 4 (getmaxx background)
+                             0 0))
+
+         (win (derwin background (- (getmaxy background) (getmaxy text-window) 
3)
+                      (- (getmaxx background) 2) (getmaxy text-window) 1 
#:panel #f))
+
+         (main-menu (make-menu main-options
+                               #:disp-proc (lambda (datum row)
+                                             (format #f "~a"
+                                                     (task-title (cdr 
datum)))))))
+
+    (addstr* text-window (format  #f
+      (gettext
+       "To start the complete installation process, choose ~s.  Alternatively, 
you may run each step individually for a slower, more controlled experience.")  
installation-menu-title))
+
+    (page-set-wwin! page frame)
+    (page-set-datum! page 'menu main-menu)
+    (menu-post main-menu win)
 
     (push-cursor (page-cursor-visibility page))
     ;; Do the key action labels
     (let ((ypos (1- (getmaxy background)))
-         (str0 (gettext "Get a Shell <F1>"))
-         (str1 (gettext "Language <F9>"))
-         (str2 (gettext "Keyboard <F10>")))
+          (str0 (gettext "Get a Shell <F1>"))
+          (str1 (gettext "Language <F9>"))
+          (str2 (gettext "Keyboard <F10>")))
 
       (addstr background str0 #:y ypos #:x 0)
       (addstr background str1 #:y ypos #:x
-             (truncate (/ (- (getmaxx background)
-                             (string-length str1)) 2)))
+              (truncate (/ (- (getmaxx background)
+                              (string-length str1)) 2)))
       (addstr background str2 #:y ypos #:x
-             (- (getmaxx background) (string-length str2))))))
+              (- (getmaxx background) (string-length str2))))))
 
 
 (define (main-page-refresh page)



reply via email to

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