diff --git a/src/gui/client/gui-goodies.lisp b/src/gui/client/gui-goodies.lisp index 8664e2e..4058dfd 100644 --- a/src/gui/client/gui-goodies.lisp +++ b/src/gui/client/gui-goodies.lisp @@ -93,8 +93,8 @@ (defmacro with-busy* ((root-widget) &body body) `(progn - (with-busy (,root-widget) - (with-hourglass ,(list root-widget) + (gui:with-busy (,root-widget) + (gui:with-hourglass ,(list root-widget) ,@body)))) (defun password-dialog (parent title message &key (button-message "OK")) diff --git a/src/gui/client/main-window.lisp b/src/gui/client/main-window.lisp index fb0ea6f..2f6bb0c 100644 --- a/src/gui/client/main-window.lisp +++ b/src/gui/client/main-window.lisp @@ -407,23 +407,25 @@ :inline-image)) (open-inline-callback () (if (inline-possible-p link-value) - (let* ((file-path (slurp-iri main-window link-value)) - (image (gui:make-image file-path)) - (coordinates `(+ (:line ,line-count :char 0) 1 :lines))) - (gui:insert-image (gemtext-widget main-window) image coordinates) - (with-accessors ((ir-lines ir-lines) - (ir-rendered-lines ir-rendered-lines)) main-window - (let* ((parent-line (elt ir-lines (- line-count 1))) - (new-line (copy-list parent-line))) - (setf (getf new-line :type) (inline-type link-value)) - (setf ir-lines - (fresh-vector-insert@ ir-lines - new-line - line-count)) - (setf ir-rendered-lines - (fresh-vector-insert@ ir-lines - "" - line-count))))) + (let ((file-path nil)) + (gui-goodies:with-busy* (main-window) + (setf file-path (slurp-iri main-window link-value))) + (let ((image (gui:make-image file-path)) + (coordinates `(+ (:line ,line-count :char 0) 1 :lines))) + (gui:insert-image (gemtext-widget main-window) image coordinates) + (with-accessors ((ir-lines ir-lines) + (ir-rendered-lines ir-rendered-lines)) main-window + (let* ((parent-line (elt ir-lines (- line-count 1))) + (new-line (copy-list parent-line))) + (setf (getf new-line :type) (inline-type link-value)) + (setf ir-lines + (fresh-vector-insert@ ir-lines + new-line + line-count)) + (setf ir-rendered-lines + (fresh-vector-insert@ ir-lines + "" + line-count)))))) (funcall (link-click-mouse-1-callback-clsr link-value main-window))))) (lambda () (let* ((popup-menu (gui:make-menu nil (_"link menu")))