Add Ctrl+W shortcut to close/hide window

Close #52
This commit is contained in:
Yuya Ochiai
2016-05-17 23:40:36 +09:00
parent fe94705b12
commit 40b6e36ddb

View File

@@ -135,6 +135,18 @@ var createTemplate = function(mainWindow) {
}
}, ]
});
template.push({
label: '&Window',
submenu: [{
label: 'Close',
accelerator: 'CmdOrCtrl+W',
click: function(item, focusedWindow) {
if (focusedWindow) {
focusedWindow.close();
}
}
}]
});
return template;
};