Derive application menu key equivalents from the keymap
This commit is contained in:
parent
8dd6ad3116
commit
7445197f4d
6 changed files with 23 additions and 34 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue