Add context menu management of permanently deleting files and folders

The action replace move-to-trash when shift modifier is active, like on
other desktop environement.
Use modifiers value stored in Tab struct as needed to forward to context_menu
creation.
Started from work of Tim Dengel <tim.dengel.debian@gmail.com>
This commit is contained in:
Gwen Lg 2024-08-12 05:34:07 +02:00
parent e220268954
commit 95aba7c74e
2 changed files with 12 additions and 3 deletions

View file

@ -4855,10 +4855,12 @@ impl Tab {
let mut popover = widget::popover(mouse_area);
if let Some(point) = self.context_menu {
let context_menu = menu::context_menu(self, key_binds, &self.modifiers);
popover = popover
.popup(menu::context_menu(self, key_binds))
.popup(context_menu)
.position(widget::popover::Position::Point(point));
}
let mut tab_column = widget::column::with_capacity(3);
if let Some(location_view) = location_view_opt {
tab_column = tab_column.push(location_view);