First, you are doing a wonderful work - muCommander is a really great tool.
My feature request is an action similar to "shift+del" at windows - a delete operation which is not through the recycle bin by default. This operation should be in addition to the existing delete operation which sends the deleted files to the recycle bin by default (while DEFAULT_DELETE_TO_TRASH = true, as it should be).
I implemented this in the following way:
1. changed the signature of the constructor of DeleteDialog to:
public DeleteDialog(MainFrame mainFrame, FileSet files, boolean permanent) ;
and added the following "if" in it:
- Code: Select all
if (!permanent) {
// Allow 'Move to trash' option only if:
// - the current platform has a trash
// - the base folder is not an archive
// - the base folder of the to-be-deleted files is not a trash folder or one of its children
// - the base folder can be moved to the trash (the eligibility conditions should be the same as the files to-be-deleted)
AbstractTrash trash = FileFactory.getTrash();
AbstractFile baseFolder = files.getBaseFolder();
if(trash!=null && !(baseFolder instanceof AbstractArchiveFile) && !trash.isTrashFile(baseFolder) && trash.canMoveToTrash(baseFolder)) {
moveToTrash = MuConfiguration.getVariable(
MuConfiguration.DELETE_TO_TRASH,
MuConfiguration.DEFAULT_DELETE_TO_TRASH);
moveToTrashCheckBox = new JCheckBox(Translator.get("delete_dialog.move_to_trash.option"), moveToTrash);
moveToTrashCheckBox.addItemListener(this);
}
}
2. add to the action_keymap:
<!-- Action : Permanent delete selected file(s). -->
<!-- Default : SHIFT DELETE -->
<action class="com.mucommander.ui.action.PermanentDeleteAction"
alt_keystroke="shift DELETE"/>
3. At DeleteAction I added a "false" field for "permanent" at the call to DeleteDialog construction.
4. Create new action "PermanentDeleteAction" which differ from DeleteAction in one thing- it calls DeleteDialog constructor with permanent=true.
With my Implementation or another, hope it'll be added
Arik.
