guix-commits
[Top][All Lists]
Advanced

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

110/197: installer: Add an explanatory text to the main page.


From: Danny Milosavljevic
Subject: 110/197: installer: Add an explanatory text to the main page.
Date: Mon, 3 Jul 2017 20:37:09 -0400 (EDT)

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

commit c00aea621dd592607ed56fa4cc45ea8690147c53
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]