guix-commits
[Top][All Lists]
Advanced

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

102/197: installer: Correct bug where the timezone page returned to the


From: Danny Milosavljevic
Subject: 102/197: installer: Correct bug where the timezone page returned to the wrong page.
Date: Mon, 3 Jul 2017 20:37:08 -0400 (EDT)

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

commit a7ff5ad6c7f77dcab5d6aef6aee5417a9c392c39
Author: John Darrington <address@hidden>
Date:   Sun Jan 15 16:30:49 2017 +0100

    installer: Correct bug where the timezone page returned to the wrong page.
    
    *  gnu/system/installer/time-zone.scm (make-tz-page) : Remove exit-point
    parameter.
    *  gnu/system/installer/guixsd-installer.scm (mount-options): Change call
    to make-tz-page to match new signature.
---
 gnu/system/installer/guixsd-installer.scm |  3 +--
 gnu/system/installer/time-zone.scm        | 12 +++++-------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/gnu/system/installer/guixsd-installer.scm 
b/gnu/system/installer/guixsd-installer.scm
index 348e073..36fb6e5 100644
--- a/gnu/system/installer/guixsd-installer.scm
+++ b/gnu/system/installer/guixsd-installer.scm
@@ -116,8 +116,7 @@
                                (or
                                 (getenv "TZDIR")
                                 (string-append (car (slurp "guix build tzdata" 
#f))
-                                               "/share/zoneinfo"))
-                               page-stack))))
+                                               "/share/zoneinfo"))))))
 
     (hostname . ,(make-task hostname-menu-title
                             '()
diff --git a/gnu/system/installer/time-zone.scm 
b/gnu/system/installer/time-zone.scm
index ad62514..cdbd56d 100644
--- a/gnu/system/installer/time-zone.scm
+++ b/gnu/system/installer/time-zone.scm
@@ -32,16 +32,13 @@
      str)))
 
 
-(define* (make-tz-browser parent directory #:optional (exit-point #f))
+(define (make-tz-browser parent directory)
   (let ((page (make-page (page-surface parent)
                        (gettext "Time Zone")
                        time-zone-page-refresh
                         0
                        time-zone-page-key-handler)))
     (page-set-datum! page 'directory directory)
-    (if exit-point
-       (page-set-datum! page 'exit-point exit-point)
-       (page-set-datum! page 'exit-point (page-datum parent 'exit-point)))
     page))
 
 
@@ -71,19 +68,20 @@
             (st (lstat new-dir)))
        (if (and (file-exists? new-dir)
                 (eq? 'directory (stat:type st)))
-           (let ((p (make-tz-browser
-                     page new-dir)))
+           (let ((p (make-tz-browser page new-dir)))
              (page-set-datum! p 'stem
                               (if (page-datum page 'stem)
                                   (string-append (page-datum page 'stem) "/" i)
                                   i))
+              ;; Don't go back to the current page!
+              (set! page-stack (cdr page-stack))
               (page-enter p))
            (begin
              (set! time-zone
                (if (page-datum page 'stem)
                    (string-append (page-datum page 'stem) "/" i)
                    i))
-             (page-leave (page-datum page 'exit-point))
+             (page-leave)
              #f)))
       ))
   (std-menu-key-handler menu ch)



reply via email to

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