[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: installer: Make tab order more natural.
From: |
Danny Milosavljevic |
Subject: |
01/01: installer: Make tab order more natural. |
Date: |
Sun, 9 Jul 2017 12:05:47 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit b9120aa3bdcb32b6ed9cfc2a0e8f08dfdc64b481
Author: Danny Milosavljevic <address@hidden>
Date: Sun Jul 9 18:03:54 2017 +0200
installer: Make tab order more natural.
* gurses/menu.scm (std-menu-key-handler): Report whether or not we handled
KEY_DOWN.
* gnu/system/installer/page.scm (page-default-key-handler): Move menu
handling
to earlier.
---
gnu/system/installer/page.scm | 5 +++--
gurses/menu.scm | 11 +++++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/gnu/system/installer/page.scm b/gnu/system/installer/page.scm
index bb7a4e1..297cac0 100644
--- a/gnu/system/installer/page.scm
+++ b/gnu/system/installer/page.scm
@@ -218,6 +218,9 @@ If a form is used it's assumed that the menu is not used
and vice versa."
((and form (form-enabled? form) (not (eq? 'ignored (form-enter form ch))))
'handled)
+ ((and menu (menu-active menu) (std-menu-key-handler menu ch))
+ 'handled)
+
((eq? ch KEY_RIGHT)
(page-focus-widget-relative page 'next #:buttons? #t)
'handled)
@@ -243,8 +246,6 @@ If a form is used it's assumed that the menu is not used
and vice versa."
(if nav
(buttons-selected-symbol nav)
'default)))))
- ((and menu (menu-active menu) (std-menu-key-handler menu ch))
- 'handled)
((eq? ch KEY_UP)
(page-focus-widget-relative page 'prev #:buttons? #f)
diff --git a/gurses/menu.scm b/gurses/menu.scm
index 32854a1..4a54b26 100644
--- a/gurses/menu.scm
+++ b/gurses/menu.scm
@@ -169,10 +169,17 @@ active."
(menu-goto-end menu)
'handled)
+ ((eq? ch KEY_RIGHT)
+ 'handled)
+
+ ((eq? ch KEY_LEFT)
+ 'handled)
+
((or (eq? ch KEY_DOWN)
(eq? ch #\so))
- (menu-down menu)
- 'handled)
+ (if (menu-down menu)
+ 'handled
+ #f))
((or (eq? ch KEY_UP)
(eq? ch #\dle))