mirror of https://codeberg.org/cage/tinmop/
- [gemini] expand 'pwd' when printing the directory's contents;
- [gemini] forced displaying of director with tinmop.
This commit is contained in:
parent
ad21da5957
commit
02ea992ca8
|
@ -73,7 +73,8 @@
|
|||
(defun open-message-link (url enqueue)
|
||||
(let* ((parsed (iri:iri-parse url))
|
||||
(scheme (uri:scheme parsed)))
|
||||
(if (string= gemini-constants:+gemini-scheme+ scheme)
|
||||
(cond
|
||||
((string= gemini-constants:+gemini-scheme+ scheme)
|
||||
(let ((program-events:*process-events-immediately* t)
|
||||
(event (make-instance 'program-events:gemini-push-behind-downloading-event
|
||||
:priority program-events:+maximum-event-priority+)))
|
||||
|
@ -82,8 +83,15 @@
|
|||
(gemini-viewer:ensure-just-one-stream-rendering)
|
||||
(program-events:push-event event)
|
||||
(gemini-viewer:request url :enqueue enqueue
|
||||
:use-cached-file-if-exists t))
|
||||
(os-utils:open-resource-with-external-program url nil))))
|
||||
:use-cached-file-if-exists t)))
|
||||
((fs:dirp url)
|
||||
(let ((program-events:*process-events-immediately* t)
|
||||
(event (make-instance 'program-events:gemini-push-behind-downloading-event
|
||||
:priority program-events:+maximum-event-priority+)))
|
||||
(program-events:push-event event)
|
||||
(gemini-viewer:load-gemini-url url :give-focus-to-message-window nil)))
|
||||
(t
|
||||
(os-utils:open-resource-with-external-program url nil)))))
|
||||
|
||||
(defclass open-links-window ()
|
||||
((links
|
||||
|
|
|
@ -1017,12 +1017,13 @@
|
|||
((gemini-client:absolute-gemini-url-p url)
|
||||
(gemini-viewer:request url :use-cached-file-if-exists use-cached-file-if-exists))
|
||||
((fs:dirp url)
|
||||
(let* ((all-paths (fs:prepend-pwd (fs:collect-children url)))
|
||||
(let* ((index-path (fs:prepend-pwd url))
|
||||
(all-paths (fs:collect-children index-path))
|
||||
(raw-text (with-output-to-string (stream)
|
||||
(write-sequence (gemini-parser:geminize-h1
|
||||
(format nil
|
||||
(_ "Index of local directory ~a~2%")
|
||||
url))
|
||||
index-path))
|
||||
stream)
|
||||
(loop for path in all-paths do
|
||||
(let* ((dirp (fs:dirp path))
|
||||
|
@ -1043,7 +1044,7 @@
|
|||
(text (gemini-parser:sexp->text parsed
|
||||
gemini-client:*gemini-page-theme*)))
|
||||
(gemini-viewer:maybe-initialize-metadata window)
|
||||
(gemini-viewer:add-url-to-history window url)
|
||||
(gemini-viewer:add-url-to-history window index-path)
|
||||
(refresh-gemini-message-window links raw-text text nil)
|
||||
(windows:draw window)))
|
||||
(t
|
||||
|
|
Loading…
Reference in New Issue