This commit is contained in:
Artur Mustafin
2019-08-21 06:43:56 +03:00
parent 9278402d65
commit bd99da560b
3 changed files with 15 additions and 0 deletions

View File

@@ -573,6 +573,10 @@ export = (socket: SocketIO.Socket, app: Electron.App) => {
getWindowById(id).setMenu(menu);
});
socket.on('browserWindowRemoveMenu', (id) => {
getWindowById(id).removeMenu();
});
function addMenuItemClickConnector(menuItems, callback) {
menuItems.forEach((item) => {
if (item.submenu && item.submenu.items.length > 0) {