guix-commits
[Top][All Lists]
Advanced

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

74/80: installer: Add option to final page to reboot the system.


From: John Darrington
Subject: 74/80: installer: Add option to final page to reboot the system.
Date: Tue, 3 Jan 2017 15:49:46 +0000 (UTC)

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

commit 61aa6fe0b583820971f67a7c182977131f31f0e4
Author: John Darrington <address@hidden>
Date:   Mon Jan 2 11:05:45 2017 +0100

    installer: Add option to final page to reboot the system.
    
    * gnu/system/installer/install.scm (install-page-key-handler): Add
    option to reboot.
---
 gnu/system/installer/install.scm |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/gnu/system/installer/install.scm b/gnu/system/installer/install.scm
index 65e7520..4e97548 100644
--- a/gnu/system/installer/install.scm
+++ b/gnu/system/installer/install.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016 John Darrington <address@hidden>
+;;; Copyright © 2016, 2017 John Darrington <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -42,6 +42,7 @@
 
 
 (define my-buttons `((continue ,(N_ "_Continue") #t)
+                     (reboot ,(N_ "_Reboot") #t)
                      (back ,(N_ "_Back") #t)))
 
 (define (install-page-key-handler page ch)
@@ -73,6 +74,9 @@
       (delwin (inner (page-wwin page)))
       (set! page-stack (cdr page-stack)))
 
+     ((buttons-key-matches-symbol? nav ch 'reboot)
+      (system* "reboot"))
+
      ((buttons-key-matches-symbol? nav ch 'continue)
       (let ((target "/target")
             (window-port (make-window-port config-window))
@@ -99,7 +103,7 @@
                                  target))
 
              (display (gettext
-                       "Installation is complete.  You should reboot now.")
+                       "Installation is complete.  You should remove the 
device containing the installer image and reboot now.")
                       window-port)))
           (lambda (key . args)
             #f)
@@ -130,7 +134,7 @@
                       3 (getmaxx (inner pr))
                       0 0
                       #:panel #f))
-                       
+
         (bwin (derwin (inner pr)
                       3 (getmaxx (inner pr))
                       (- (getmaxy (inner pr)) 3) 0
@@ -161,4 +165,4 @@
     (refresh (outer pr))
     (refresh text-window)
     (refresh bwin)))
-                       
+



reply via email to

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