Browse Source

:apple: Add roles for macOS native tab menu items

Fixes #9086, #10064.
Michael Kaylan 7 years ago
parent
commit
7741a0e6ad
2 changed files with 10 additions and 0 deletions
  1. 5 0
      atom/browser/ui/cocoa/atom_menu_controller.mm
  2. 5 0
      docs/api/menu-item.md

+ 5 - 0
atom/browser/ui/cocoa/atom_menu_controller.mm

@@ -45,6 +45,11 @@ Role kRolesMap[] = {
   { @selector(performZoom:), "zoom" },
   { @selector(terminate:), "quit" },
   { @selector(toggleFullScreen:), "togglefullscreen" },
+  { @selector(toggleTabBar:), "toggletabbar" },
+  { @selector(selectNextTab:), "selectnexttab" },
+  { @selector(selectPreviousTab:), "selectprevioustab" },
+  { @selector(mergeAllWindows:), "mergeallwindows" },
+  { @selector(moveTabToNewWindow:), "movetabtonewwindow" },
 };
 
 }  // namespace

+ 5 - 0
docs/api/menu-item.md

@@ -80,6 +80,11 @@ The following additional roles are available on macOS:
 * `stopspeaking` - Map to the `stopSpeaking` action
 * `front` - Map to the `arrangeInFront` action
 * `zoom` - Map to the `performZoom` action
+* `toggletabbar` - Map to the `toggleTabBar` action
+* `selectnexttab` - Map to the `selectNextTab` action
+* `selectprevioustab` - Map to the `selectPreviousTab` action
+* `mergeallwindows` - Map to the `mergeAllWindows` action
+* `movetabtonewwindow` - Map to the `moveTabToNewWindow` action
 * `window` - The submenu is a "Window" menu
 * `help` - The submenu is a "Help" menu
 * `services` - The submenu is a "Services" menu