Derive application menu key equivalents from the keymap

This commit is contained in:
Max Brunsfeld 2022-05-19 10:04:01 -07:00
parent 8dd6ad3116
commit 7445197f4d
6 changed files with 23 additions and 34 deletions

View file

@ -154,7 +154,6 @@ pub struct Menu<'a> {
pub enum MenuItem<'a> {
Action {
name: &'a str,
keystroke: Option<&'a str>,
action: Box<dyn Action>,
},
Separator,
@ -1070,7 +1069,8 @@ impl MutableAppContext {
}
pub fn set_menus(&mut self, menus: Vec<Menu>) {
self.foreground_platform.set_menus(menus);
self.foreground_platform
.set_menus(menus, &self.keystroke_matcher);
}
fn prompt(