mirror of https://codeberg.org/cage/tinmop/
Compare commits
5 Commits
0b845038bf
...
42f2aa5a1e
Author | SHA1 | Date |
---|---|---|
cage | 42f2aa5a1e | |
cage | a8621b91d5 | |
cage | ae6c5a2986 | |
cage | 8ac8ab2489 | |
cage | e8ff243e93 |
|
@ -165,7 +165,7 @@ Note that, at the moment, the ~quick_quicklisp.sh~ script will *not* install the
|
|||
|
||||
#+BEGIN_SRC sh
|
||||
$ cd $HOME/quicklisp/local-projects/
|
||||
$ git clone https://github.com/McParen/croatoan.git
|
||||
$ git clone https://codeberg.org/McParen/croatoan.git
|
||||
#+END_SRC
|
||||
|
||||
5. build the executable:
|
||||
|
|
|
@ -35,7 +35,7 @@ LISP_SOURCE_REGISTRY_FILE="$LISP_SOURCE_REGISTRY_DIR/source-registry.conf"
|
|||
|
||||
VERIFY_OK_RES=2
|
||||
|
||||
CROATOAN_GIT_URL=https://github.com/McParen/croatoan.git
|
||||
CROATOAN_GIT_URL=https://codeberg.org/McParen/croatoan.git
|
||||
|
||||
CROATOAN_DIR="$QUICKLISP_INSTALL_DIR"/local-projects/croatoan/
|
||||
|
||||
|
|
|
@ -236,7 +236,8 @@
|
|||
:aborting-function
|
||||
#'aborting-function
|
||||
:ignore-certificate-expiration
|
||||
ignore-certificate-expiration)))))
|
||||
ignore-certificate-expiration))
|
||||
:name "stream thread")))
|
||||
(setf (fetching-thread stream-wrapper) stream-thread)
|
||||
stream-wrapper)))))
|
||||
|
||||
|
@ -1170,13 +1171,19 @@ local file paths."
|
|||
((or (gemini-parser:gemini-iri-p actual-iri)
|
||||
needs-proxy)
|
||||
(let ((stream-frame (stream-frame main-window)))
|
||||
;; note: keeps this call before 'start-stream-iri'; the
|
||||
;; latter will recursively call 'open-iri' (this
|
||||
;; function) if a redirect is met, and the procedures to
|
||||
;; delete and repopulate stream frames gets interleaved
|
||||
;; in nodgui because of the same procedure called in
|
||||
;; 'slurp-gemini-stream', but in a different thread.
|
||||
(client-stream-frame::refresh-all-streams
|
||||
(client-stream-frame::table stream-frame))
|
||||
(start-stream-iri (iri-ensure-path actual-iri)
|
||||
main-window
|
||||
use-cache
|
||||
:ignore-certificate-expiration nil
|
||||
:status status)
|
||||
(client-stream-frame::refresh-all-streams
|
||||
(client-stream-frame::table stream-frame))))
|
||||
:status status)))
|
||||
((iri:absolute-url-p iri)
|
||||
(client-os-utils:open-resource-with-external-program main-window iri))
|
||||
((or (fs:file-exists-p actual-iri)
|
||||
|
@ -1234,23 +1241,26 @@ local file paths."
|
|||
|
||||
(defun slurp-non-text-data (main-window iri &key (try-to-open t))
|
||||
(declare (optimize (debug 0) (speed 3)))
|
||||
(labels ((wait-until-download-complete (stream-info support-file)
|
||||
(labels ((stream-completed-p (stream-info)
|
||||
(string-equal (getf stream-info :stream-status)
|
||||
:completed))
|
||||
(wait-until-download-complete (stream-info support-file)
|
||||
(declare (optimize (debug 0) (speed 3)))
|
||||
(if (string-equal (getf stream-info :stream-status)
|
||||
:completed)
|
||||
(if (stream-completed-p stream-info)
|
||||
(if try-to-open
|
||||
(client-os-utils:open-resource-with-external-program main-window support-file)
|
||||
(values (getf stream-info :support-file)
|
||||
(getf stream-info :meta)))
|
||||
(wait-enough-data)))
|
||||
(buffer-filled-enough-to-open-p (buffer-size read-so-far)
|
||||
(buffer-filled-enough-to-open-p (buffer-size read-so-far stream-info)
|
||||
(declare (optimize (debug 0) (speed 3)))
|
||||
(declare (fixnum buffer-size read-so-far))
|
||||
(let ((filled-configuration-threshold (and buffer-size
|
||||
(> read-so-far buffer-size))))
|
||||
(or filled-configuration-threshold
|
||||
(> read-so-far
|
||||
swconf:+buffer-minimum-size-to-open+))))
|
||||
swconf:+buffer-minimum-size-to-open+)
|
||||
(stream-completed-p stream-info))))
|
||||
(wait-enough-data ()
|
||||
(declare (optimize (debug 0) (speed 3)))
|
||||
(let* ((stream-info
|
||||
|
@ -1258,8 +1268,8 @@ local file paths."
|
|||
1
|
||||
ev:+maximum-event-priority+
|
||||
iri))
|
||||
(read-so-far (getf stream-info :octet-count -1))
|
||||
(support-file (getf stream-info :support-file)))
|
||||
(read-so-far (getf stream-info :octet-count -1))
|
||||
(support-file (getf stream-info :support-file)))
|
||||
(multiple-value-bind (program-exists y wait-for-download)
|
||||
(swconf:link-regex->program-to-use support-file)
|
||||
(declare (ignore y))
|
||||
|
@ -1268,7 +1278,9 @@ local file paths."
|
|||
(not try-to-open))
|
||||
(wait-until-download-complete stream-info support-file)
|
||||
(let ((buffer-size (swconf:link-regex->program-to-use-buffer-size support-file)))
|
||||
(if (buffer-filled-enough-to-open-p buffer-size read-so-far)
|
||||
(if (buffer-filled-enough-to-open-p buffer-size
|
||||
read-so-far
|
||||
stream-info)
|
||||
(client-os-utils:open-resource-with-external-program main-window
|
||||
support-file)
|
||||
(wait-enough-data))))
|
||||
|
@ -2103,7 +2115,7 @@ local file paths."
|
|||
:exclusive t))
|
||||
|
||||
(defun init-main-window (starting-iri)
|
||||
(setf gui:*debug-tk* t)
|
||||
(setf gui:*debug-tk* nil)
|
||||
(gui:with-nodgui (:title +program-name+ :debugger-class 'gui:graphical-condition-handler)
|
||||
(icons:load-icons)
|
||||
(setf gui-goodies:*toplevel* gui:*tk*)
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
(make-thread (lambda ()
|
||||
(let ((gui:*wish* gui-goodies:*gui-server*))
|
||||
(loop while (events-loop-running-p) do
|
||||
(ev:dispatch-program-events-or-wait)))))))
|
||||
(ev:dispatch-program-events-or-wait))))
|
||||
:name "GUI events loop")))
|
||||
|
||||
(defmacro with-enqueue-request ((method-name id &rest args) &body on-error)
|
||||
`(ev:with-enqueued-process-and-unblock ()
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
:text iri
|
||||
:column-values
|
||||
(list stream-status
|
||||
(to-s (getf row :octet-count)))
|
||||
(to-s (getf row
|
||||
:octet-count)))
|
||||
:index gui:+treeview-last-index+)))
|
||||
(gui:treeview-insert-item tree :item tree-row)))
|
||||
(gui:treeview-refit-columns-width (gui-goodies:tree stream-table))
|
||||
|
|
Loading…
Reference in New Issue