mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-01 04:26:47 +01:00
- [GUI] instructed the client to open local file using external software.
This commit is contained in:
parent
559b5dae84
commit
ac32e27fcc
@ -417,7 +417,7 @@
|
||||
(getf response :cached)
|
||||
(getf response :iri)))
|
||||
|
||||
(defun open-local-path (path main-window)
|
||||
(defun open-local-path (path main-window &key (force-rendering nil))
|
||||
(cond
|
||||
((fs:file-exists-p path)
|
||||
(if (fs:has-extension path +gemini-file-extension+)
|
||||
@ -428,13 +428,15 @@
|
||||
(ev:with-enqueued-process-and-unblock ()
|
||||
(clean-gemtext main-window)
|
||||
(collect-ir-lines path gui-goodies:*main-frame* parsed-lines)))
|
||||
(let ((lines (cev:enqueue-request-and-wait-results :gemini-slurp-local-file
|
||||
1
|
||||
ev:+standard-event-priority+
|
||||
path)))
|
||||
(ev:with-enqueued-process-and-unblock ()
|
||||
(clean-gemtext main-window)
|
||||
(set-text-gemtext main-window lines)))))
|
||||
(if force-rendering
|
||||
(let ((lines (cev:enqueue-request-and-wait-results :gemini-slurp-local-file
|
||||
1
|
||||
ev:+standard-event-priority+
|
||||
path)))
|
||||
(ev:with-enqueued-process-and-unblock ()
|
||||
(clean-gemtext main-window)
|
||||
(set-text-gemtext main-window lines)))
|
||||
(client-os-utils:open-resource-with-external-program main-window path))))
|
||||
((fs:directory-exists-p path)
|
||||
(gui:choose-directory :initial-dir path :parent main-window :mustexist t))
|
||||
(t
|
||||
|
@ -28,7 +28,9 @@
|
||||
((swconf:use-tinmop-as-external-program-p program)
|
||||
(if open-for-edit
|
||||
(edit resource)
|
||||
(client-main-window:open-local-path resource main-window)))
|
||||
(client-main-window:open-local-path resource
|
||||
main-window
|
||||
:force-rendering t)))
|
||||
(t
|
||||
(os-utils:open-link-with-program program resource :wait open-for-edit)))
|
||||
(if open-for-edit
|
||||
|
Loading…
x
Reference in New Issue
Block a user