Browse Source

Rename roles

Zhuo Lu 7 years ago
parent
commit
dcdc3621ac

+ 2 - 2
atom/browser/ui/cocoa/atom_menu_controller.mm

@@ -50,7 +50,7 @@ Role kRolesMap[] = {
   { @selector(selectPreviousTab:), "selectprevioustab" },
   { @selector(mergeAllWindows:), "mergeallwindows" },
   { @selector(moveTabToNewWindow:), "movetabtonewwindow" },
-  { @selector(clearRecentDocuments:), "clearrecent" },
+  { @selector(clearRecentDocuments:), "clearrecentdocuments" },
 };
 
 }  // namespace
@@ -218,7 +218,7 @@ NSMenu* swapMenu_;
       [NSApp setHelpMenu:submenu];
     else if (role == base::ASCIIToUTF16("services"))
       [NSApp setServicesMenu:submenu];
-    else if (role == base::ASCIIToUTF16("openrecent"))
+    else if (role == base::ASCIIToUTF16("recentdocuments"))
       [self replaceSubmenuShowingRecentDocuments:item];
   } else {
     // The MenuModel works on indexes so we can't just set the command id as the

+ 2 - 2
lib/browser/api/menu-item-roles.js

@@ -102,10 +102,10 @@ const roles = {
   services: {
     label: 'Services'
   },
-  openrecent: {
+  recentdocuments: {
     label: 'Open Recent'
   },
-  clearrecent: {
+  clearrecentdocuments: {
     label: 'Clear Menu'
   },
   startspeaking: {