guix-commits
[Top][All Lists]
Advanced

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

01/01: installer: page key handler: Prefer the form, if enabled, to ever


From: Danny Milosavljevic
Subject: 01/01: installer: page key handler: Prefer the form, if enabled, to everything else. If the menu doesn't want the key, handle it ourselves.
Date: Wed, 5 Jul 2017 05:16:48 -0400 (EDT)

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

commit 8a63ba37b4d2f0ca1fcea4ec3fd355d5fa6f259c
Author: Danny Milosavljevic <address@hidden>
Date:   Wed Jul 5 11:15:35 2017 +0200

    installer: page key handler: Prefer the form, if enabled, to everything 
else.
    If the menu doesn't want the key, handle it ourselves.
    
    * gnu/system/installer/page.scm (page-default-key-handler): Modify.
---
 gnu/system/installer/page.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnu/system/installer/page.scm b/gnu/system/installer/page.scm
index d07dfce..30c3b79 100644
--- a/gnu/system/installer/page.scm
+++ b/gnu/system/installer/page.scm
@@ -86,6 +86,9 @@ If a form is used it's assumed that the menu is not used and 
vice versa."
         (nav  (page-datum page 'navigation))
         (form (page-datum page 'form)))
     (cond
+     ((and form (form-enabled? form) (not (eq? 'ignored (form-enter form ch))))
+     'handled)
+
      ((eq? ch KEY_RIGHT)
       (if menu
         (menu-set-active! menu #f))
@@ -134,8 +137,8 @@ If a form is used it's assumed that the menu is not used 
and vice versa."
      ((select-key? ch)
       (page-activate-focused-item page))
 
-     ((and menu (menu-active menu))
-       (std-menu-key-handler menu ch))
+     ((and menu (menu-active menu) (not (eq? 'ignored (std-menu-key-handler 
menu ch))))
+      'handled)
 
      ((eq? ch KEY_UP)
       (if nav
@@ -155,9 +158,6 @@ If a form is used it's assumed that the menu is not used 
and vice versa."
           (form-set-enabled! form #t)))
       'handled)
 
-     ((and form (form-enabled? form))
-      (form-enter form ch))
-
      ((and nav (buttons-fetch-by-key nav ch))
       (buttons-select-by-symbol nav (buttons-fetch-by-key nav ch))
       (page-activate-focused-item page))



reply via email to

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