guix-commits
[Top][All Lists]
Advanced

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

01/03: installer: Factor out register-color-palette!.


From: Danny Milosavljevic
Subject: 01/03: installer: Factor out register-color-palette!.
Date: Sun, 9 Jul 2017 14:57:54 -0400 (EDT)

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

commit 900c0e229efac98191ef1e783f86c38868ec44f0
Author: Danny Milosavljevic <address@hidden>
Date:   Sun Jul 9 19:51:40 2017 +0200

    installer: Factor out register-color-palette!.
    
    * gnu/system/installer/utils.scm (register-color-palette!): New variable.  
Export it.
    * gnu/system/installer/guixsd-installer.scm (guixsd-installer): Use it here.
---
 gnu/system/installer/guixsd-installer.scm | 7 ++-----
 gnu/system/installer/utils.scm            | 5 +++++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/gnu/system/installer/guixsd-installer.scm 
b/gnu/system/installer/guixsd-installer.scm
index 6d81c9d..58f15f5 100644
--- a/gnu/system/installer/guixsd-installer.scm
+++ b/gnu/system/installer/guixsd-installer.scm
@@ -19,8 +19,7 @@
 (define-module (gnu system installer guixsd-installer))
 
 (use-modules (ncurses curses)
-             (ncurses panel)
-            (gurses menu)
+             (gurses menu)
             (gnu system installer utils)
             (gnu system installer misc)
             (gnu system installer partition-reader)
@@ -293,9 +292,7 @@
       (noecho!)
 
       (start-color!)
-
-      (init-pair! livery-title COLOR_MAGENTA COLOR_BLACK)
-      (init-pair! strong-colour COLOR_RED COLOR_BLACK)
+      (register-color-palette!)
 
       (curs-set 0)
 
diff --git a/gnu/system/installer/utils.scm b/gnu/system/installer/utils.scm
index 165ba95..a07fb1e 100644
--- a/gnu/system/installer/utils.scm
+++ b/gnu/system/installer/utils.scm
@@ -35,6 +35,7 @@
             inner
             outer
             deep-visit-windows
+            register-color-palette!
 
            open-input-pipe-with-fallback*
 
@@ -265,6 +266,10 @@ Ignore blank lines."
          (error "~s is not a window" outside))
      outside)))
 
+(define (register-color-palette!)
+  (init-pair! livery-title COLOR_MAGENTA COLOR_BLACK)
+  (init-pair! strong-colour COLOR_RED COLOR_BLACK))
+
 (define* (boxed-window-decoration-refresh pr title)
   (let ((win (outer pr)))
     ;(erase win)



reply via email to

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