Introduce an OSAction that can be associated with menu items for mac platform compatibility.

Co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
Mikayla Maki 2023-02-22 09:02:31 -08:00
parent 24fcad3fa2
commit 71d8ead318
4 changed files with 148 additions and 313 deletions

View file

@ -193,7 +193,8 @@ impl MacForegroundPlatform {
) -> id {
match item {
MenuItem::Separator => NSMenuItem::separatorItem(nil),
MenuItem::Action { name, action } => {
MenuItem::Action { name, action, .. } => {
// TODO
let keystrokes = keystroke_matcher
.bindings_for_action_type(action.as_any().type_id())
.find(|binding| binding.action().eq(action.as_ref()))