No need to set menu in spec window
This commit is contained in:
		
					parent
					
						
							
								143453b603
							
						
					
				
			
			
				commit
				
					
						ae2f754d10
					
				
			
		
					 1 changed files with 0 additions and 88 deletions
				
			
		| 
						 | 
				
			
			@ -2,7 +2,6 @@ var app = require('app');
 | 
			
		|||
var ipc = require('ipc');
 | 
			
		||||
var dialog = require('dialog');
 | 
			
		||||
var BrowserWindow = require('browser-window');
 | 
			
		||||
var Menu = require('menu');
 | 
			
		||||
 | 
			
		||||
var window = null;
 | 
			
		||||
process.port = 0;  // will be used by crash-reporter spec.
 | 
			
		||||
| 
						 | 
				
			
			@ -52,93 +51,6 @@ app.on('window-all-closed', function() {
 | 
			
		|||
});
 | 
			
		||||
 | 
			
		||||
app.on('ready', function() {
 | 
			
		||||
  var template = [
 | 
			
		||||
    {
 | 
			
		||||
      label: 'Atom',
 | 
			
		||||
      submenu: [
 | 
			
		||||
        {
 | 
			
		||||
          label: 'Quit',
 | 
			
		||||
          accelerator: 'CommandOrControl+Q',
 | 
			
		||||
          click: function(item, window) { app.quit(); }
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      label: 'Edit',
 | 
			
		||||
      submenu: [
 | 
			
		||||
        {
 | 
			
		||||
          label: 'Undo',
 | 
			
		||||
          accelerator: 'CommandOrControl+Z',
 | 
			
		||||
          selector: 'undo:',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: 'Redo',
 | 
			
		||||
          accelerator: 'CommandOrControl+Shift+Z',
 | 
			
		||||
          selector: 'redo:',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: 'separator',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: 'Cut',
 | 
			
		||||
          accelerator: 'CommandOrControl+X',
 | 
			
		||||
          selector: 'cut:',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: 'Copy',
 | 
			
		||||
          accelerator: 'CommandOrControl+C',
 | 
			
		||||
          selector: 'copy:',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: 'Paste',
 | 
			
		||||
          accelerator: 'CommandOrControl+V',
 | 
			
		||||
          selector: 'paste:',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: 'Select All',
 | 
			
		||||
          accelerator: 'CommandOrControl+A',
 | 
			
		||||
          selector: 'selectAll:',
 | 
			
		||||
        },
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      label: 'View',
 | 
			
		||||
      submenu: [
 | 
			
		||||
        {
 | 
			
		||||
          label: 'Reload',
 | 
			
		||||
          accelerator: 'CommandOrControl+R',
 | 
			
		||||
          click: function(item, window) { window.restart(); }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: 'Enter Fullscreen',
 | 
			
		||||
          click: function(item, window) { window.setFullScreen(true); }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: 'Toggle DevTools',
 | 
			
		||||
          accelerator: 'Alt+CommandOrControl+I',
 | 
			
		||||
          click: function(item, window) { window.toggleDevTools(); }
 | 
			
		||||
        },
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      label: 'Window',
 | 
			
		||||
      submenu: [
 | 
			
		||||
        {
 | 
			
		||||
          label: 'Open',
 | 
			
		||||
          accelerator: 'CommandOrControl+O',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          label: 'Close',
 | 
			
		||||
          accelerator: 'CommandOrControl+W',
 | 
			
		||||
          click: function(item, window) { window.close(); }
 | 
			
		||||
        },
 | 
			
		||||
      ]
 | 
			
		||||
    },
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  var menu = Menu.buildFromTemplate(template);
 | 
			
		||||
  app.setApplicationMenu(menu);
 | 
			
		||||
 | 
			
		||||
  // Test if using protocol module would crash.
 | 
			
		||||
  require('protocol').registerStringProtocol('test-if-crashes', function() {});
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue