Implement Save as, fixes #127

This commit is contained in:
Jeremy Soller 2024-02-15 15:09:32 -07:00
parent 9da0b4575e
commit 76c659fb21
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
4 changed files with 57 additions and 19 deletions

View file

@ -143,13 +143,6 @@ pub fn menu_bar<'a>(
)
};
let menu_key = |label, key, action: Action| {
MenuTree::new(
menu_button!(widget::text(label), horizontal_space(Length::Fill), key)
.on_press(action.message()),
)
};
let menu_tab_width = |tab_width: u16| {
menu_checkbox(
fl!("tab-width", tab_width = tab_width),
@ -199,7 +192,7 @@ pub fn menu_bar<'a>(
MenuTree::with_children(menu_folder(fl!("close-project")), close_projects),
MenuTree::new(horizontal_rule(1)),
menu_item(fl!("save"), Action::Save),
menu_key(fl!("save-as"), "Ctrl + Shift + S", Action::Todo),
menu_item(fl!("save-as"), Action::SaveAsDialog),
MenuTree::new(horizontal_rule(1)),
menu_item(fl!("revert-all-changes"), Action::Todo),
MenuTree::new(horizontal_rule(1)),