From 9e0c2726efb37b4116e782b51d5e637f114271a2 Mon Sep 17 00:00:00 2001 From: Lionel DARNIS Date: Sat, 25 Jul 2026 22:54:15 +0200 Subject: [PATCH] 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. --- src/menu.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/menu.rs b/src/menu.rs index 0937595..8439655 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -418,6 +418,12 @@ pub fn context_menu<'a>( if tab.mode.multiple() { 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() { children.push(divider::horizontal::light().into()); }