Automatically convert menu with tile of 'Window' to Window menu in application menu.
This commit is contained in:
parent
84c320ea7f
commit
fae3137463
2 changed files with 32 additions and 2 deletions
|
@ -61,7 +61,31 @@ delegate.browserMainParts.preMainMessageLoopRun = function() {
|
|||
}
|
||||
}));
|
||||
|
||||
var windowMenu = new Menu;
|
||||
windowMenu.append(new MenuItem({
|
||||
label: 'Minimize',
|
||||
accelerator: 'Command+M',
|
||||
click: function() {
|
||||
Menu.sendActionToFirstResponder('performMiniaturize:');
|
||||
}
|
||||
}));
|
||||
windowMenu.append(new MenuItem({
|
||||
label: 'Close',
|
||||
accelerator: 'Command+W',
|
||||
click: function() {
|
||||
Menu.sendActionToFirstResponder('performClose:');
|
||||
}
|
||||
}));
|
||||
windowMenu.append(new MenuItem({ type: 'separator' }));
|
||||
windowMenu.append(new MenuItem({
|
||||
label: 'Bring All to Front',
|
||||
click: function() {
|
||||
Menu.sendActionToFirstResponder('arrangeInFront:');
|
||||
}
|
||||
}));
|
||||
|
||||
menu.append(new MenuItem({ type: 'submenu', submenu: appleMenu }));
|
||||
menu.append(new MenuItem({ label: 'Window', type: 'submenu', submenu: windowMenu }));
|
||||
|
||||
Menu.setApplicationMenu(menu);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue