Rollback duplicated feature
This commit is contained in:
		
					parent
					
						
							
								0b9cea334f
							
						
					
				
			
			
				commit
				
					
						828d233f2a
					
				
			
		
					 5 changed files with 0 additions and 27 deletions
				
			
		| 
						 | 
				
			
			@ -200,7 +200,6 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
 | 
			
		|||
  dict.SetMethod("setApplicationMenu", &Menu::SetApplicationMenu);
 | 
			
		||||
  dict.SetMethod("sendActionToFirstResponder",
 | 
			
		||||
                 &Menu::SendActionToFirstResponder);
 | 
			
		||||
  dict.SetMethod("noteNewRecentDocumentURL", &Menu::NoteNewRecentDocumentURL);
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,10 +31,6 @@ class Menu : public mate::TrackableObject<Menu>,
 | 
			
		|||
 | 
			
		||||
  // Fake sending an action from the application menu.
 | 
			
		||||
  static void SendActionToFirstResponder(const std::string& action);
 | 
			
		||||
 | 
			
		||||
  // Add an item corresponding to the data located by a URL to the Open Recent
 | 
			
		||||
  // menu, or replace an existing item with the same URL.
 | 
			
		||||
  static void NoteNewRecentDocumentURL(const std::string& url);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
  AtomMenuModel* model() const { return model_.get(); }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -139,13 +139,6 @@ void Menu::SendActionToFirstResponder(const std::string& action) {
 | 
			
		|||
  [NSApp sendAction:selector to:nil from:[NSApp mainMenu]];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// static
 | 
			
		||||
void Menu::NoteNewRecentDocumentURL(const std::string& url) {
 | 
			
		||||
  [[NSDocumentController sharedDocumentController]
 | 
			
		||||
      noteNewRecentDocumentURL:
 | 
			
		||||
          [NSURL fileURLWithPath:base::SysUTF8ToNSString(url)]];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// static
 | 
			
		||||
mate::WrappableBase* Menu::New(mate::Arguments* args) {
 | 
			
		||||
  return new MenuMac(args->isolate(), args->GetThis());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -43,13 +43,6 @@ emulating default macOS menu behaviors. Usually you would just use the
 | 
			
		|||
See the [macOS Cocoa Event Handling Guide](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html#//apple_ref/doc/uid/10000060i-CH3-SW7)
 | 
			
		||||
for more information on macOS' native actions.
 | 
			
		||||
 | 
			
		||||
#### `Menu.noteNewRecentDocumentURL(url)` _macOS_
 | 
			
		||||
 | 
			
		||||
* `url` String
 | 
			
		||||
 | 
			
		||||
Add an item corresponding to the data located by a URL to the Open Recent menu,
 | 
			
		||||
or replace an existing item with the same URL.
 | 
			
		||||
 | 
			
		||||
#### `Menu.buildFromTemplate(template)`
 | 
			
		||||
 | 
			
		||||
* `template` MenuItemConstructorOptions[]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -174,14 +174,6 @@ Menu.buildFromTemplate = function (template) {
 | 
			
		|||
  return menu
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Menu.noteNewRecentDocumentURL = function (url) {
 | 
			
		||||
  if (process.platform === 'darwin') {
 | 
			
		||||
    bindings.noteNewRecentDocumentURL(url);
 | 
			
		||||
  } else {
 | 
			
		||||
    throw new Error('Not supported')
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Helper Functions */
 | 
			
		||||
 | 
			
		||||
// Search between separators to find a radio menu item and return its group id
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue