mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-02 04:36:43 +01:00
- added a visual hint while a gemini page is streaming contents.
This commit is contained in:
parent
4891408492
commit
bb07663a0a
@ -508,6 +508,8 @@ open-message-link-window.input.selected.foreground = #FF00FF
|
||||
|
||||
# gemini browser
|
||||
|
||||
gemini.downloading = "⮘ ⮙ ⮚ ⮛"
|
||||
|
||||
gemini.favicon = "🌍"
|
||||
|
||||
gemini.link.scheme.gemini.prefix = "→ "
|
||||
|
@ -196,6 +196,23 @@
|
||||
(draw-buffer-line-mark object))
|
||||
(call-next-method))))
|
||||
|
||||
(let ((index 0)
|
||||
(frames -1)
|
||||
(slowness 30))
|
||||
(declare (fixnum index frames slowness))
|
||||
(defun draw-downloading-animation (window)
|
||||
(declare (optimize (debug 0) (speed 2)))
|
||||
(let* ((animation-frames (swconf:gemini-downloading))
|
||||
(max (length (the list animation-frames))))
|
||||
(print-text window
|
||||
(elt animation-frames index)
|
||||
0 0
|
||||
:attributes (attribute-bold))
|
||||
(incf frames)
|
||||
(when (= (rem frames slowness)
|
||||
0)
|
||||
(setf index (rem (1+ index) max))))))
|
||||
|
||||
(defgeneric row-add-original-object (lines original-object))
|
||||
|
||||
(defmethod row-add-original-object ((lines line) original-object)
|
||||
|
@ -1111,6 +1111,7 @@
|
||||
:perform-missing-value-check
|
||||
:load-config-file
|
||||
:external-editor
|
||||
:gemini-downloading
|
||||
:gemini-default-favicon
|
||||
:directory-symbol
|
||||
:gemini-fetch-favicon-p
|
||||
@ -1986,6 +1987,7 @@
|
||||
:display-chat-p
|
||||
:row-get-original-object
|
||||
:viewport-width
|
||||
:draw-downloading-animation
|
||||
:visible-rows
|
||||
:row-vertical-space-p
|
||||
:row-preformatted-p
|
||||
|
@ -1167,10 +1167,11 @@
|
||||
(multiple-value-bind (x start length)
|
||||
(message-window:visible-rows win)
|
||||
(declare (ignore x))
|
||||
(when (or (not append-text)
|
||||
(< (+ start length)
|
||||
(windows:win-height-no-border win)))
|
||||
(windows:draw win))))))))
|
||||
(if (or (not append-text)
|
||||
(< (+ start length)
|
||||
(windows:win-height-no-border win)))
|
||||
(windows:draw win)
|
||||
(message-window:draw-downloading-animation win))))))))
|
||||
|
||||
(defclass gemini-abort-downloading-event (program-event) ())
|
||||
|
||||
|
@ -400,6 +400,7 @@
|
||||
width
|
||||
height
|
||||
position
|
||||
downloading
|
||||
x
|
||||
y
|
||||
error
|
||||
@ -562,6 +563,12 @@
|
||||
(access-key->user-directive keys))))
|
||||
value)))
|
||||
|
||||
(defun gemini-downloading ()
|
||||
(let ((animation (access-non-null-conf-value *software-configuration*
|
||||
+key-gemini+
|
||||
+key-downloading+)))
|
||||
(text-utils:split-words animation)))
|
||||
|
||||
(defun gemini-default-favicon ()
|
||||
(access-non-null-conf-value *software-configuration*
|
||||
+key-gemini+
|
||||
|
Loading…
x
Reference in New Issue
Block a user