From 5ee623d3124b13654e9f499e26dbdcde7f644685 Mon Sep 17 00:00:00 2001 From: cage Date: Sat, 11 Feb 2023 20:55:39 +0100 Subject: [PATCH] - fixed default callback in input dialog. --- src/windows.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/windows.lisp b/src/windows.lisp index 7a7370f..4908d37 100644 --- a/src/windows.lisp +++ b/src/windows.lisp @@ -598,7 +598,7 @@ the library." (defun make-input-dialog (screen parent message) "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) (let* ((theme-style (swconf:form-style swconf:+key-input-dialog+)) (style-form (style-class->list theme-style)) @@ -616,12 +616,14 @@ insetred by the user" (button-cancel (make-instance 'c:button :name :b-cancel :title (_ "Cancel") + :callback 'c:cancel :position (list (truncate (1+ (* window-height 3/4))) 2))) (button-accept (make-instance 'c:button :name :b-accept :title (_ "OK") + :callback 'c:accept :position (list (truncate (* window-height 3/4)) 2))) (field (make-instance 'c:field @@ -647,8 +649,6 @@ insetred by the user" (win-set-background window (make-win-background bg :color-fg fg)) (add-flush-left-text window message 2 :has-border-p t) (win-refresh window) - (setf (c:callback button-accept) 'accept) - (setf (c:callback button-cancel) 'cancel) (setf (c:cursor-visible-p screen-low-level) t) (let ((res (croatoan:edit low-level-window))) (setf (c:cursor-visible-p screen-low-level) nil)