diff --git a/src/api-client.lisp b/src/api-client.lisp index e06ccd2..bf43478 100644 --- a/src/api-client.lisp +++ b/src/api-client.lisp @@ -170,11 +170,13 @@ authorizations was performed with success." (progn (copy-credentials-to-client) (tooter:authorize *client*) - (when (null (application-credentials)) - (ui:error-dialog-immediate - (format nil - (_ "Credential invalid. Try to remove ~a and restart the software to authenticate again.") - (res:get-data-file +credentials-filename+))))) + (handler-case + (application-credentials) + (error () + (ui:error-dialog-immediate + (format nil + (_ "Credential invalid. Try to remove ~a and restart the software to authenticate again.") + (res:get-data-file +credentials-filename+)))))) (multiple-value-bind (server-socket server-port) (open-catch-code-socket) (setf *client* (make-default-client)) diff --git a/src/windows.lisp b/src/windows.lisp index a430a7d..4ed0c88 100644 --- a/src/windows.lisp +++ b/src/windows.lisp @@ -128,7 +128,11 @@ height, position and so on)" (gen-simple-win->croatoan-specialized-wrapper touch win) -(gen-simple-win->croatoan-specialized-wrapper select menu) +(defun menu-select (window) + (with-croatoan-window (croatoan-window window) + (prog1 + (select croatoan-window) + (win-close window)))) (defun win-visible-p (win) (with-croatoan-window (croatoan-window win) @@ -441,6 +445,7 @@ list of strings (the text lines)." 4)) (message (join-with-strings lines (format nil "~%"))) (dialog-window (make-instance 'dialog-window + :stacked nil :center t :message-text message :input-blocking t