add option to copy path when pressing down shift
This commit is contained in:
parent
f1a8e4ea19
commit
4e77e398f2
4 changed files with 22 additions and 2 deletions
12
src/menu.rs
12
src/menu.rs
|
|
@ -174,7 +174,11 @@ pub fn context_menu<'a>(
|
|||
children.push(divider::horizontal::light().into());
|
||||
children.push(menu_item(fl!("rename"), Action::Rename).into());
|
||||
children.push(menu_item(fl!("cut"), Action::Cut).into());
|
||||
children.push(menu_item(fl!("copy"), Action::Copy).into());
|
||||
if modifiers.shift() && !modifiers.control() {
|
||||
children.push(menu_item(fl!("copy-path"), Action::CopyPath).into());
|
||||
} else {
|
||||
children.push(menu_item(fl!("copy"), Action::Copy).into());
|
||||
}
|
||||
// Should this simply bypass trash and remove the shortcut?
|
||||
children.push(menu_item(fl!("move-to-trash"), Action::Delete).into());
|
||||
} else if selected > 0 {
|
||||
|
|
@ -204,7 +208,11 @@ pub fn context_menu<'a>(
|
|||
children.push(menu_item(fl!("rename"), Action::Rename).into());
|
||||
children.push(menu_item(fl!("cut"), Action::Cut).into());
|
||||
}
|
||||
children.push(menu_item(fl!("copy"), Action::Copy).into());
|
||||
if modifiers.shift() && !modifiers.control() {
|
||||
children.push(menu_item(fl!("copy-path"), Action::CopyPath).into());
|
||||
} else {
|
||||
children.push(menu_item(fl!("copy"), Action::Copy).into());
|
||||
}
|
||||
if selected_mount_point == 0 {
|
||||
children.push(menu_item(fl!("move-to"), Action::MoveTo).into());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue