mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-10 07:20:35 +01:00
- [TUI] refactored quitting dialog test code in a function.
This commit is contained in:
parent
6472ede4b0
commit
8deb702090
@ -497,6 +497,10 @@ this exact quantity would go beyond the length or rows or zero."
|
||||
(declare (ignore redraw))
|
||||
t)
|
||||
|
||||
(defun event-quit-blocking-list-dialog-window-p (event)
|
||||
(or (string= event "q")
|
||||
(string= event "^G")))
|
||||
|
||||
(defun make-blocking-list-dialog-window (screen all-fields text-lines callback
|
||||
&optional (title (_ "Information")))
|
||||
"Draw a window with a scrollable list of entries, pressing enter
|
||||
@ -548,8 +552,7 @@ will fire the `callback' function (with the selected field from `all-fields'
|
||||
(draw)
|
||||
(loop named inner
|
||||
for c = (tui:decode-key-event (c:get-wide-event low-level-window))
|
||||
while (and (string/= c "q")
|
||||
(string/= c "^G"))
|
||||
while (not (event-quit-blocking-list-dialog-window-p c))
|
||||
do
|
||||
(cond
|
||||
((string= c :key-arrow-up)
|
||||
|
Loading…
x
Reference in New Issue
Block a user