Any way to change the behaviour of items dragged and dropped onto a custom recycle bin button from 'copy' to either 'move' or 'delete' ?
Here is the code for the button:
@icon:#Large_64px_48px:trash (3a) Leopar'd Icon,RECYCLEBINEMPTY
@keydown:none
Go /trash CONTEXT
@keydown:any
Delete EMPTYRECYCLE FORCE
1 Like
Leo
July 11, 2022, 9:29pm
2
I don't think drag & drop to that button will work, even if it was a move.
You could combine all three things into a single button via scripting, except without context menu support. (I think the only useful thing in the context menu is the Empty option anyway, so that doesn't seem like a big loss.)
Recycle Bin.dcf (1.1 KB)
Modifiers:
(Add your @icon
line here if you want that.)
@filesfromdroponly
Script Code:
function OnClick(clickData)
{
var cmd = clickData.func.command;
if (clickData.func.sourcetab.selected.count != 0)
{
cmd.RunCommand("Delete RECYCLE");
}
else if (clickData.func.qualifiers != "none")
{
cmd.RunCommand("Delete EMPTYRECYCLE FORCE");
}
else
{
cmd.RunCommand("Go /trash");
}
}
Leo
July 11, 2022, 9:30pm
3
Actually, that seems to ignore the @filesfromdroponly
so it'll only go to the recycle bin if nothing is selected. May not do what you want.
Works great, many thanks.