Skip to content

Commit

Permalink
Add context menu item for permanently deleting files and folders
Browse files Browse the repository at this point in the history
  • Loading branch information
dengelt committed Aug 15, 2024
1 parent e4f77b7 commit f24cbaa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions i18n/de/cosmic_files.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ new-file = Neue Datei
new-folder = Neuer Ordner
open-in-terminal = Im Terminal öffnen
move-to-trash = In den Papierkorb verschieben
permanently-delete = Dauerhaft löschen...
restore-from-trash = Aus dem Papierkorb wiederherstellen
remove-from-sidebar = Von der Seitenleiste entfernen
sort-by-name = Nach Name sortieren
Expand Down
1 change: 1 addition & 0 deletions i18n/en/cosmic_files.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ new-file = New file...
new-folder = New folder...
open-in-terminal = Open in terminal
move-to-trash = Move to trash
permanently-delete = Delete permanently...
restore-from-trash = Restore from trash
remove-from-sidebar = Remove from sidebar
sort-by-name = Sort by name
Expand Down
2 changes: 2 additions & 0 deletions src/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ pub fn context_menu<'a>(
children.push(menu_item(fl!("add-to-sidebar"), Action::AddToSidebar).into());
children.push(container(horizontal_rule(1)).padding([0, 8]).into());
children.push(menu_item(fl!("move-to-trash"), Action::MoveToTrash).into());
children
.push(menu_item(fl!("permanently-delete"), Action::PermanentlyDelete).into());
} else {
//TODO: need better designs for menu with no selection
//TODO: have things like properties but they apply to the folder?
Expand Down

0 comments on commit f24cbaa

Please sign in to comment.