Panel/VFS: Rework of deletion/moveToTrash/virtualRemove of files and directories
ClosedPublic

Authored by abika on Jan 27 2017, 6:19 PM.

Details

Summary

Behaviour changes:

  • "Move to trash" option in context menu only if trashing is possible
  • DEL_Key, F11 or "Move to trash" option now moves files to trash on virtual

FS (if possible for all selected files)

Panel: rework of ListPanelFunc::deleteFiles()
And vfs::deleteFiles() expects the final decision for "moveToTrash" argument now!

Panel: Move files to trash if this is possible and activated in user settings
Else, fallback to real deletion.
It is now possible to move virtual files to trash.

Moved code for deciding if files can be moved to trash to VFS

Panel: show trash option in right-click popup menu only if trashing is supported

VFS: separate virtual deletion and real/trash deletion in virtual vfs.
And call appropriate method in panel.

VFS: merged common code for deleting/trashing files in vfs subclasses into superclass

Panel: split code for deleting/trashing files and removing virtual files

Test Plan

Tested all (possible) operations on {local FS, virtual FS, remote FS (FTP)}

Diff Detail

Repository
R167 Krusader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
abika updated this revision to Diff 10632.Jan 27 2017, 6:19 PM
abika retitled this revision from to Panel/VFS: Rework of deletion/moveToTrash/virtualRemove of files and directories.
abika updated this object.
abika edited the test plan for this revision. (Show Details)
abika added a reviewer: Krusader.
martinkostolny accepted this revision.Jan 28 2017, 4:09 PM
martinkostolny added a reviewer: martinkostolny.
martinkostolny added a subscriber: martinkostolny.

Good improvement, thanks, Alex!

Just a question: by F11 you meant F8 for delete key, right? Or maybe I'm missing something.

This revision is now accepted and ready to land.Jan 28 2017, 4:09 PM
Closed by commit R167:37c2fcf0621b: Merge branch 'my-delete_rework' (authored by Alexander Bikadorov <alex.bikadorov@kdemail.net>). · Explain WhyJan 28 2017, 5:41 PM
This revision was automatically updated to reflect the committed changes.
abika added a comment.Jan 28 2017, 5:43 PM

Thanks! Merged with master.

Just a question: by F11 you meant F8 for delete key, right? Or maybe I'm missing something.

Oh, yes. I changed the key to F11 because it was too close to "new dir" and "open terminal" .)

asensi added a subscriber: asensi.Jan 29 2017, 9:10 AM

Thank you very much!

About that F11 subject: Is it a change in the user interface of Krusader? :-?

About that F11 subject: Is it a change in the user interface of Krusader? :-?

I was also wondering that for a moment :-) but I believe Alex was talking about his own key bindings. It's still F8 by default in the code.

abika added a comment.Jan 29 2017, 2:35 PM
In D4316#81044, @asensi wrote:

About that F11 subject: Is it a change in the user interface of Krusader? :-?

Oh, no. Only in my settings. Sorry for the confusion