dannym pushed a commit to branch wip-installer-2
in repository guix.
commit ddf5617aef028f1e233b8378f3b86c8413efc0f8
Author: John Darrington <[email protected]>
Date: Mon Jan 30 11:57:24 2017 +0100
installer: Main page: Redisplay translatable strings upon refresh.
* gnu/system/installer/guixsd-installer.scm (main-page-refresh): Add
display of translatable strings. (main-page-init): Remove display of
translatable strings.
---
gnu/system/installer/guixsd-installer.scm | 50 ++++++++++++++++++++-----------
1 file changed, 32 insertions(+), 18 deletions(-)
diff --git a/gnu/system/installer/guixsd-installer.scm
b/gnu/system/installer/guixsd-installer.scm
index 0aa5582..3674944 100644
--- a/gnu/system/installer/guixsd-installer.scm
+++ b/gnu/system/installer/guixsd-installer.scm
@@ -229,18 +229,38 @@ tail of the list."
(main-menu (make-menu main-options
#:disp-proc (lambda (datum row)
- (format #f "~a"
- (task-title (cdr
datum)))))))
+ (gettext (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)
+ (page-set-datum! page 'text-window text-window)
+ (page-set-datum! page 'background background)
(menu-post main-menu win)
- (push-cursor (page-cursor-visibility page))
+ (push-cursor (page-cursor-visibility page))))
+
+
+(define (main-page-refresh page)
+ (when (not (page-initialised? page))
+ (main-page-init page)
+ (page-set-initialised! page #t))
+
+ (let ((text-window (page-datum page 'text-window))
+ (menu (page-datum page 'menu))
+ (background (page-datum page 'background)))
+
+ (clear background)
+
+ (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.")
+ (gettext installation-menu-title)))
+
+
;; Do the key action labels
(let ((ypos (1- (getmaxy background)))
(str0 (gettext "Get a Shell <F1>"))
@@ -252,19 +272,13 @@ tail of the list."
(truncate (/ (- (getmaxx background)
(string-length str1)) 2)))
(addstr background str2 #:y ypos #:x
- (- (getmaxx background) (string-length str2))))))
-
-
-(define (main-page-refresh page)
- (when (not (page-initialised? page))
- (main-page-init page)
- (page-set-initialised! page #t))
+ (- (getmaxx background) (string-length str2))))
- (touchwin (outer (page-wwin page)))
- (refresh* (outer (page-wwin page)))
- (refresh* (inner (page-wwin page)))
- (menu-redraw (page-datum page 'menu))
- (menu-refresh (page-datum page 'menu)))
+ (touchwin (outer (page-wwin page)))
+ (refresh* (outer (page-wwin page)))
+ (refresh* (inner (page-wwin page)))
+ (menu-redraw menu)
+ (menu-refresh menu)))
(define-public (guixsd-installer)