1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-01-30 04:14:47 +01:00

- [kami] prevented crash when editing a file with no associated editing program;

- [kami] added e few informative messages fro the user.
This commit is contained in:
cage 2022-02-04 15:40:20 +01:00
parent 2efaeef4ad
commit 35d784a4c6
2 changed files with 24 additions and 21 deletions

View File

@ -2491,11 +2491,12 @@ printed, on the main window."
(flet ((on-input-complete (maybe-accepted)
(with-valid-yes-at-prompt (maybe-accepted y-pressed-p)
(when y-pressed-p
(info-message (format nil (_"deleting ~a") path))
(with-enqueued-process ()
(fstree:delete-treenode win path))))))
(ask-string-input #'on-input-complete
:prompt
(format nil (_ "Delete ~a? ") path)))))
(format nil (_ "Delete ~a? [y/N] ") path)))))
(defun file-explorer-rename-path ()
"Rename (or move) a file or directory"
@ -2672,13 +2673,15 @@ printed, on the main window."
(flet ((on-input-complete (maybe-accepted)
(with-valid-yes-at-prompt (maybe-accepted y-pressed-p)
(when y-pressed-p
(info-message (format nil (_"deleting ~a") path))
(with-enqueued-process ()
(fstree:recursive-delete-node win path)
(fstree:resync-rows-db win
:selected-path (fs:parent-dir-path path)
:redraw nil)
(windows:win-clear win)
(windows:draw win))))))
(windows:draw win)
(info-message (format nil (_"Completed") path)))))))
(ask-string-input #'on-input-complete
:prompt
(format nil (_ "Delete ~a? ") path)))))
@ -2744,9 +2747,9 @@ if the selected item represents a directory."
(let* ((win *filesystem-explorer-window*)
(fields (line-oriented-window:selected-row-fields win))
(path (fstree:tree-path fields)))
(tui:with-notify-errors
(fstree:edit-node win path)
(info-message (format nil (_ "File ~s was modified on server") path))))
(info-message (format nil (_ "File ~s was modified on server") path)))))
(defun file-explorer-upload-mirror ()
"Upload a filesystem tree."