1
0
Fork 0

- [GUI] used file extension for filtering candidates file when saving a link's contents.

This commit is contained in:
cage 2023-07-12 15:43:52 +02:00
parent 6a601209a3
commit e28cffe2f3
1 changed files with 9 additions and 0 deletions

View File

@ -481,8 +481,17 @@
(funcall (link-click-mouse-1-callback-clsr link-value main-window)))))
(save-link-as-callback ()
(a:when-let* ((suggested-file-name (fs:path-last-element link-value))
(extension (fs:get-extension suggested-file-name))
(extensions-mask (list (list (format nil
(_ "Files ~s")
extension)
(format nil
"*~a"
extension))
'("All Files" "*")))
(output-file (gui:get-save-file :initial-file suggested-file-name
:initial-dir "."
:file-types extensions-mask
:parent main-window
:title (_ "Choose a file for saving")))
(input-file (when (string-not-empty-p output-file)