feat: dnd to trash
This commit is contained in:
parent
50ca5316f9
commit
11a2d0deef
3 changed files with 25 additions and 7 deletions
|
|
@ -435,6 +435,7 @@ pub enum Command {
|
|||
Scroll(widget::Id, AbsoluteOffset),
|
||||
DropFiles(PathBuf, ClipboardPaste),
|
||||
Timeout(Duration, Message),
|
||||
MoveToTrash(Vec<PathBuf>),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
|
@ -1322,8 +1323,11 @@ impl Tab {
|
|||
}
|
||||
commands.push(Command::DropFiles(to, from))
|
||||
}
|
||||
Location::Trash if matches!(from.kind, ClipboardKind::Cut) => {
|
||||
commands.push(Command::MoveToTrash(from.paths))
|
||||
}
|
||||
Location::Trash => {
|
||||
// TODO
|
||||
log::warn!("Copy to trash is not supported.");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue