feat: add empty-trash action to trash view context menu
Right-clicking inside the trash view now shows 'Empty trash' when the trash is not empty, in addition to the existing per-item restore/delete actions and sort options.
This commit is contained in:
parent
30e562c8c2
commit
9e0c2726ef
1 changed files with 6 additions and 0 deletions
|
|
@ -418,6 +418,12 @@ pub fn context_menu<'a>(
|
||||||
if tab.mode.multiple() {
|
if tab.mode.multiple() {
|
||||||
children.push(menu_item(fl!("select-all"), Action::SelectAll).into());
|
children.push(menu_item(fl!("select-all"), Action::SelectAll).into());
|
||||||
}
|
}
|
||||||
|
if !Trash::is_empty() {
|
||||||
|
if !children.is_empty() {
|
||||||
|
children.push(divider::horizontal::light().into());
|
||||||
|
}
|
||||||
|
children.push(menu_item(fl!("empty-trash"), Action::EmptyTrash).into());
|
||||||
|
}
|
||||||
if !children.is_empty() {
|
if !children.is_empty() {
|
||||||
children.push(divider::horizontal::light().into());
|
children.push(divider::horizontal::light().into());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue