Clean up mime app handling and make it possible to set default application, part of #325

This commit is contained in:
Jeremy Soller 2025-01-24 11:55:56 -07:00
parent 691719ade7
commit ceab7835ad
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
37 changed files with 306 additions and 114 deletions

View file

@ -157,7 +157,7 @@ pub fn context_menu<'a>(
children.push(menu_item(fl!("open"), Action::Open).into());
}
if selected == 1 {
children.push(menu_item(fl!("open-with"), Action::OpenWith).into());
children.push(menu_item(fl!("menu-open-with"), Action::OpenWith).into());
if selected_dir == 1 {
children
.push(menu_item(fl!("open-in-terminal"), Action::OpenTerminal).into());
@ -531,7 +531,7 @@ pub fn menu_bar<'a>(
Action::Open,
(selected > 0 && selected_dir == 0) || (selected_dir == 1 && selected == 1),
),
menu_button_optional(fl!("open-with"), Action::OpenWith, selected == 1),
menu_button_optional(fl!("menu-open-with"), Action::OpenWith, selected == 1),
menu::Item::Divider,
menu_button_optional(fl!("rename"), Action::Rename, selected > 0),
menu::Item::Divider,