feat: add missing file menu entries
This commit is contained in:
parent
b011bc7635
commit
f03fc1e3ab
4 changed files with 20 additions and 15 deletions
|
|
@ -102,11 +102,11 @@ undo = Undo
|
||||||
unknown-folder = unknown folder
|
unknown-folder = unknown folder
|
||||||
|
|
||||||
## Open with
|
## Open with
|
||||||
open-with = Open with
|
open-with = Open with...
|
||||||
default-app = {$name} (default)
|
default-app = {$name} (default)
|
||||||
|
|
||||||
## Properties
|
## Show details
|
||||||
properties = Properties
|
show-details = Show details
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
settings = Settings
|
settings = Settings
|
||||||
|
|
@ -129,8 +129,8 @@ light = Light
|
||||||
|
|
||||||
# Context menu
|
# Context menu
|
||||||
add-to-sidebar = Add to sidebar
|
add-to-sidebar = Add to sidebar
|
||||||
new-file = New file
|
new-file = New file...
|
||||||
new-folder = New folder
|
new-folder = New folder...
|
||||||
open-in-terminal = Open in terminal
|
open-in-terminal = Open in terminal
|
||||||
move-to-trash = Move to trash
|
move-to-trash = Move to trash
|
||||||
restore-from-trash = Restore from trash
|
restore-from-trash = Restore from trash
|
||||||
|
|
@ -145,7 +145,8 @@ sort-by-size = Sort by size
|
||||||
file = File
|
file = File
|
||||||
new-tab = New tab
|
new-tab = New tab
|
||||||
new-window = New window
|
new-window = New window
|
||||||
rename = Rename
|
rename = Rename...
|
||||||
|
menu-show-details = Show details...
|
||||||
close-tab = Close tab
|
close-tab = Close tab
|
||||||
quit = Quit
|
quit = Quit
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -280,7 +280,7 @@ impl ContextPage {
|
||||||
Self::About => String::new(),
|
Self::About => String::new(),
|
||||||
Self::EditHistory => fl!("edit-history"),
|
Self::EditHistory => fl!("edit-history"),
|
||||||
Self::OpenWith => fl!("open-with"),
|
Self::OpenWith => fl!("open-with"),
|
||||||
Self::Properties(..) => fl!("properties"),
|
Self::Properties(..) => String::default(),
|
||||||
Self::Settings => fl!("settings"),
|
Self::Settings => fl!("settings"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1051,7 +1051,7 @@ impl Application for App {
|
||||||
),
|
),
|
||||||
cosmic::widget::menu::Item::Divider,
|
cosmic::widget::menu::Item::Divider,
|
||||||
cosmic::widget::menu::Item::Button(
|
cosmic::widget::menu::Item::Button(
|
||||||
fl!("properties"),
|
fl!("show-details"),
|
||||||
NavMenuAction::Properties(id),
|
NavMenuAction::Properties(id),
|
||||||
),
|
),
|
||||||
cosmic::widget::menu::Item::Divider,
|
cosmic::widget::menu::Item::Divider,
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ pub fn key_binds() -> HashMap<KeyBind, Action> {
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bind!([Ctrl], Key::Character("d".into()), AddToSidebar);
|
||||||
bind!([Ctrl], Key::Character("c".into()), Copy);
|
bind!([Ctrl], Key::Character("c".into()), Copy);
|
||||||
bind!([Ctrl], Key::Character("x".into()), Cut);
|
bind!([Ctrl], Key::Character("x".into()), Cut);
|
||||||
bind!([Ctrl], Key::Character("l".into()), EditLocation);
|
bind!([Ctrl], Key::Character("l".into()), EditLocation);
|
||||||
|
|
|
||||||
13
src/menu.rs
13
src/menu.rs
|
|
@ -116,8 +116,7 @@ pub fn context_menu<'a>(
|
||||||
children.push(menu_item(fl!("copy"), Action::Copy).into());
|
children.push(menu_item(fl!("copy"), Action::Copy).into());
|
||||||
//TODO: Print?
|
//TODO: Print?
|
||||||
children.push(container(horizontal_rule(1)).padding([0, 8]).into());
|
children.push(container(horizontal_rule(1)).padding([0, 8]).into());
|
||||||
//TODO: change to Show details
|
children.push(menu_item(fl!("show-details"), Action::Properties).into());
|
||||||
children.push(menu_item(fl!("properties"), Action::Properties).into());
|
|
||||||
children.push(container(horizontal_rule(1)).padding([0, 8]).into());
|
children.push(container(horizontal_rule(1)).padding([0, 8]).into());
|
||||||
children.push(menu_item(fl!("add-to-sidebar"), Action::AddToSidebar).into());
|
children.push(menu_item(fl!("add-to-sidebar"), Action::AddToSidebar).into());
|
||||||
children.push(container(horizontal_rule(1)).padding([0, 8]).into());
|
children.push(container(horizontal_rule(1)).padding([0, 8]).into());
|
||||||
|
|
@ -142,7 +141,7 @@ pub fn context_menu<'a>(
|
||||||
children.push(menu_item(fl!("select-all"), Action::SelectAll).into());
|
children.push(menu_item(fl!("select-all"), Action::SelectAll).into());
|
||||||
if selected > 0 {
|
if selected > 0 {
|
||||||
children.push(container(horizontal_rule(1)).padding([0, 8]).into());
|
children.push(container(horizontal_rule(1)).padding([0, 8]).into());
|
||||||
children.push(menu_item(fl!("properties"), Action::Properties).into());
|
children.push(menu_item(fl!("show-details"), Action::Properties).into());
|
||||||
children.push(container(horizontal_rule(1)).padding([0, 8]).into());
|
children.push(container(horizontal_rule(1)).padding([0, 8]).into());
|
||||||
children
|
children
|
||||||
.push(menu_item(fl!("restore-from-trash"), Action::RestoreFromTrash).into());
|
.push(menu_item(fl!("restore-from-trash"), Action::RestoreFromTrash).into());
|
||||||
|
|
@ -192,9 +191,13 @@ pub fn menu_bar<'a>(
|
||||||
menu::Item::Button(fl!("new-file"), Action::NewFile),
|
menu::Item::Button(fl!("new-file"), Action::NewFile),
|
||||||
menu::Item::Button(fl!("new-folder"), Action::NewFolder),
|
menu::Item::Button(fl!("new-folder"), Action::NewFolder),
|
||||||
menu::Item::Button(fl!("open"), Action::Open),
|
menu::Item::Button(fl!("open"), Action::Open),
|
||||||
|
menu::Item::Button(fl!("open-with"), Action::OpenWith),
|
||||||
menu::Item::Divider,
|
menu::Item::Divider,
|
||||||
menu::Item::Button(fl!("rename"), Action::Rename),
|
menu::Item::Button(fl!("rename"), Action::Rename),
|
||||||
//TOOD: add to sidebar, then divider
|
menu::Item::Divider,
|
||||||
|
menu::Item::Button(fl!("menu-show-details"), Action::Properties),
|
||||||
|
menu::Item::Divider,
|
||||||
|
menu::Item::Button(fl!("add-to-sidebar"), Action::AddToSidebar),
|
||||||
menu::Item::Divider,
|
menu::Item::Divider,
|
||||||
menu::Item::Button(fl!("move-to-trash"), Action::MoveToTrash),
|
menu::Item::Button(fl!("move-to-trash"), Action::MoveToTrash),
|
||||||
menu::Item::Divider,
|
menu::Item::Divider,
|
||||||
|
|
@ -274,7 +277,7 @@ pub fn location_context_menu<'a>(ancestor_index: usize) -> Element<'a, tab::Mess
|
||||||
))
|
))
|
||||||
.into(),
|
.into(),
|
||||||
container(horizontal_rule(1)).padding([0, 8]).into(),
|
container(horizontal_rule(1)).padding([0, 8]).into(),
|
||||||
menu_button!(widget::text(fl!("properties")))
|
menu_button!(widget::text(fl!("show-details")))
|
||||||
.on_press(tab::Message::LocationMenuAction(
|
.on_press(tab::Message::LocationMenuAction(
|
||||||
LocationMenuAction::Properties(ancestor_index),
|
LocationMenuAction::Properties(ancestor_index),
|
||||||
))
|
))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue