diff --git a/src/api-client.lisp b/src/api-client.lisp index 1c08ba2..a7f5e87 100644 --- a/src/api-client.lisp +++ b/src/api-client.lisp @@ -233,18 +233,19 @@ Returns nil if the user did not provided a server in the configuration file" (save-credentials () (let* ((message (_ "Please enter below the file where to save the address")) (filepath (ui:input-dialog-immediate message))) - (cond - ((null filepath) - (save-credentials)) - ((fs:file-exists-p filepath) - (if (ui:confirm-file-overwrite-dialog-immediate filepath) - (progn - (fs:dump-sequence-to-file url filepath) - (notify-file-saved filepath)) - (save-credentials))) - (t - (fs:dump-sequence-to-file url filepath) - (notify-file-saved filepath)))))) + (when (not (eq filepath :canceled)) + (cond + ((null filepath) + (save-credentials)) + ((fs:file-exists-p filepath) + (if (ui:confirm-file-overwrite-dialog-immediate filepath) + (progn + (fs:dump-sequence-to-file url filepath) + (notify-file-saved filepath)) + (save-credentials))) + (t + (fs:dump-sequence-to-file url filepath) + (notify-file-saved filepath))))))) (cond ((string= choosen open-item) (os-utils:xdg-open url) diff --git a/src/windows.lisp b/src/windows.lisp index 4908d37..9fcbae9 100644 --- a/src/windows.lisp +++ b/src/windows.lisp @@ -648,13 +648,14 @@ inserted by the user" :croatoan-window low-level-window))) (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) + (win-refresh window) (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) (win-close window) - (and res - (c:value field)))))) + (if (null res) + :canceled + (c:value field)))))) (defun make-checklist-dialog (screen parent title options) (with-croatoan-window (screen-low-level screen)