feat: add "edit desktop entry" to the desktop file context menu

Opening a .desktop file launches the application it describes, so the
file manager offered no way to look at or change the file itself: the
only way out was a terminal. Reported upstream on 2025-05-11 and still
open.

Add an "Edit desktop entry" action to the context menu, next to the
entry own desktop actions. It opens the file with the default
text/plain handler instead of its application/x-desktop one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lionel DARNIS 2026-08-19 20:42:34 +02:00
parent 9e0c2726ef
commit d78a22d87c
4 changed files with 37 additions and 0 deletions

View file

@ -214,6 +214,8 @@ pub fn context_menu<'a>(
|(i, action)| menu_item(action.name, Action::ExecEntryAction(i)).into(),
));
}
children
.push(menu_item(fl!("edit-desktop-entry"), Action::EditDesktopEntry).into());
children.push(divider::horizontal::light().into());
children.push(menu_item(fl!("rename"), Action::Rename).into());
children.push(menu_item(fl!("cut"), Action::Cut).into());