From 1c1c94a56af934f0fbc6753ce7fbbd2e32f41047 Mon Sep 17 00:00:00 2001 From: cage Date: Sun, 1 Nov 2020 18:01:32 +0100 Subject: [PATCH] - [gemini] prevent overwriting of TOFU warning by other messages. --- src/gemini-viewer.lisp | 3 ++- src/ui-goodies.lisp | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gemini-viewer.lisp b/src/gemini-viewer.lisp index d2bd35a..9b76923 100644 --- a/src/gemini-viewer.lisp +++ b/src/gemini-viewer.lisp @@ -529,7 +529,8 @@ :prompt (format nil (_ "Host ~s signature changed! This is a potential security risk! Ignore this warning? [y/N] ") - host))))) + host) + :priority program-events:+standard-event-priority+)))) (conditions:not-implemented-error (e) (ui:notify (format nil (_ "Error: ~a") e) :as-error t)) diff --git a/src/ui-goodies.lisp b/src/ui-goodies.lisp index d75548d..dcd4f9a 100644 --- a/src/ui-goodies.lisp +++ b/src/ui-goodies.lisp @@ -141,14 +141,16 @@ (defun input-dialog-immediate (message) (windows:make-input-dialog *main-window* *main-window* message)) -(defun error-message (message) +(defun error-message (message &optional (priority +standard-event-priority+)) (let ((event (make-instance 'error-message-event + :priority priority :payload message))) (push-event event))) -(defun info-message (message) +(defun info-message (message &optional (priority +standard-event-priority+)) (let ((event (make-instance 'info-message-event - :payload message))) + :priority priority + :payload message))) (push-event event))) (defun confirm-file-overwrite-dialog-immediate (filepath) @@ -360,7 +362,7 @@ Metadata includes: (setf (windows:in-focus win) nil)) (windows:draw-all) (when info-change-focus-message - (info-message info-change-focus-message))) + (info-message info-change-focus-message +maximum-event-priority+))) (defmacro gen-focus-to-window (function-suffix window-get-focus &key