guix-commits
[Top][All Lists]
Advanced

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

02/02: installer: When pressing the Tab key in forms, even if a popup is


From: Danny Milosavljevic
Subject: 02/02: installer: When pressing the Tab key in forms, even if a popup is shown, advance to the next field.
Date: Tue, 4 Jul 2017 17:24:15 -0400 (EDT)

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

commit 13cb8e7b83c570e37f6d3f9e87fd83fbd8a50354
Author: Danny Milosavljevic <address@hidden>
Date:   Tue Jul 4 23:22:57 2017 +0200

    installer: When pressing the Tab key in forms, even if a popup is shown,
    advance to the next field.
    
    * gurses/form.scm (form-set-current-field): Modify.
---
 gurses/form.scm | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/gurses/form.scm b/gurses/form.scm
index 5e2150e..f77e218 100644
--- a/gurses/form.scm
+++ b/gurses/form.scm
@@ -273,18 +273,22 @@ label eq? to N"
           (keypad! win #t)
           (menu-refresh menu)
           (let loop ((ch (getch win)))
-            (if (or (eq? ch #\newline))
-                (field-set-value! new-field (menu-get-current-item menu))
+            (if (or (eq? ch #\newline)
+                    (eq? ch #\tab))
+                (begin
+                  (field-set-value! new-field (menu-get-current-item menu))
+                  (hide-panel popup)
+                  (redraw-field form new-field (form-current-item form))
+                  (move win which (form-tabpos form))
+                  (if (eq? ch #\tab)
+                    (form-next-field form)))
                 (begin
                   (std-menu-key-handler menu ch)
                   (menu-redraw menu)
                   (menu-refresh menu)
                   (update-panels)
                   (doupdate)
-                  (loop (getch win)))))
-          (hide-panel popup)
-          (redraw-field form new-field (form-current-item form))
-          (move win which (form-tabpos form)))))
+                  (loop (getch win))))))))
 
 
 (define (form-next-field form)



reply via email to

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