1
0
Fork 0

- fixed default callback in input dialog.

This commit is contained in:
cage 2023-02-11 20:55:39 +01:00
parent a973a8fbe1
commit 5ee623d312
1 changed files with 3 additions and 3 deletions

View File

@ -598,7 +598,7 @@ the library."
(defun make-input-dialog (screen parent message) (defun make-input-dialog (screen parent message)
"A dialog window with a single input field, returns the input "A dialog window with a single input field, returns the input
insetred by the user" inserted by the user"
(with-croatoan-window (screen-low-level screen) (with-croatoan-window (screen-low-level screen)
(let* ((theme-style (swconf:form-style swconf:+key-input-dialog+)) (let* ((theme-style (swconf:form-style swconf:+key-input-dialog+))
(style-form (style-class->list theme-style)) (style-form (style-class->list theme-style))
@ -616,12 +616,14 @@ insetred by the user"
(button-cancel (make-instance 'c:button (button-cancel (make-instance 'c:button
:name :b-cancel :name :b-cancel
:title (_ "Cancel") :title (_ "Cancel")
:callback 'c:cancel
:position (list (truncate (1+ (* window-height :position (list (truncate (1+ (* window-height
3/4))) 3/4)))
2))) 2)))
(button-accept (make-instance 'c:button (button-accept (make-instance 'c:button
:name :b-accept :name :b-accept
:title (_ "OK") :title (_ "OK")
:callback 'c:accept
:position (list (truncate (* window-height 3/4)) :position (list (truncate (* window-height 3/4))
2))) 2)))
(field (make-instance 'c:field (field (make-instance 'c:field
@ -647,8 +649,6 @@ insetred by the user"
(win-set-background window (make-win-background bg :color-fg fg)) (win-set-background window (make-win-background bg :color-fg fg))
(add-flush-left-text window message 2 :has-border-p t) (add-flush-left-text window message 2 :has-border-p t)
(win-refresh window) (win-refresh window)
(setf (c:callback button-accept) 'accept)
(setf (c:callback button-cancel) 'cancel)
(setf (c:cursor-visible-p screen-low-level) t) (setf (c:cursor-visible-p screen-low-level) t)
(let ((res (croatoan:edit low-level-window))) (let ((res (croatoan:edit low-level-window)))
(setf (c:cursor-visible-p screen-low-level) nil) (setf (c:cursor-visible-p screen-low-level) nil)