mirror of https://codeberg.org/cage/tinmop/
- [GUI] added visual hint that the process of inlining an image is in progress.
This commit is contained in:
parent
6b12729128
commit
b6bed17984
|
@ -93,8 +93,8 @@
|
||||||
|
|
||||||
(defmacro with-busy* ((root-widget) &body body)
|
(defmacro with-busy* ((root-widget) &body body)
|
||||||
`(progn
|
`(progn
|
||||||
(with-busy (,root-widget)
|
(gui:with-busy (,root-widget)
|
||||||
(with-hourglass ,(list root-widget)
|
(gui:with-hourglass ,(list root-widget)
|
||||||
,@body))))
|
,@body))))
|
||||||
|
|
||||||
(defun password-dialog (parent title message &key (button-message "OK"))
|
(defun password-dialog (parent title message &key (button-message "OK"))
|
||||||
|
|
|
@ -407,23 +407,25 @@
|
||||||
:inline-image))
|
:inline-image))
|
||||||
(open-inline-callback ()
|
(open-inline-callback ()
|
||||||
(if (inline-possible-p link-value)
|
(if (inline-possible-p link-value)
|
||||||
(let* ((file-path (slurp-iri main-window link-value))
|
(let ((file-path nil))
|
||||||
(image (gui:make-image file-path))
|
(gui-goodies:with-busy* (main-window)
|
||||||
(coordinates `(+ (:line ,line-count :char 0) 1 :lines)))
|
(setf file-path (slurp-iri main-window link-value)))
|
||||||
(gui:insert-image (gemtext-widget main-window) image coordinates)
|
(let ((image (gui:make-image file-path))
|
||||||
(with-accessors ((ir-lines ir-lines)
|
(coordinates `(+ (:line ,line-count :char 0) 1 :lines)))
|
||||||
(ir-rendered-lines ir-rendered-lines)) main-window
|
(gui:insert-image (gemtext-widget main-window) image coordinates)
|
||||||
(let* ((parent-line (elt ir-lines (- line-count 1)))
|
(with-accessors ((ir-lines ir-lines)
|
||||||
(new-line (copy-list parent-line)))
|
(ir-rendered-lines ir-rendered-lines)) main-window
|
||||||
(setf (getf new-line :type) (inline-type link-value))
|
(let* ((parent-line (elt ir-lines (- line-count 1)))
|
||||||
(setf ir-lines
|
(new-line (copy-list parent-line)))
|
||||||
(fresh-vector-insert@ ir-lines
|
(setf (getf new-line :type) (inline-type link-value))
|
||||||
new-line
|
(setf ir-lines
|
||||||
line-count))
|
(fresh-vector-insert@ ir-lines
|
||||||
(setf ir-rendered-lines
|
new-line
|
||||||
(fresh-vector-insert@ ir-lines
|
line-count))
|
||||||
""
|
(setf ir-rendered-lines
|
||||||
line-count)))))
|
(fresh-vector-insert@ ir-lines
|
||||||
|
""
|
||||||
|
line-count))))))
|
||||||
(funcall (link-click-mouse-1-callback-clsr link-value main-window)))))
|
(funcall (link-click-mouse-1-callback-clsr link-value main-window)))))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let* ((popup-menu (gui:make-menu nil (_"link menu")))
|
(let* ((popup-menu (gui:make-menu nil (_"link menu")))
|
||||||
|
|
Loading…
Reference in New Issue