mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-21 15:08:09 +00:00
Set application menu in AppMenu.setMenu instead of in main.js.
This commit is contained in:
@@ -153,7 +153,7 @@ app.on('activate', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.on('ready', () => {
|
app.on('ready', () => {
|
||||||
electron.Menu.setApplicationMenu(appMenu.getMenu());
|
appMenu.setMenu();
|
||||||
mainWindow = createMainWindow();
|
mainWindow = createMainWindow();
|
||||||
|
|
||||||
const page = mainWindow.webContents;
|
const page = mainWindow.webContents;
|
||||||
|
|||||||
@@ -343,9 +343,10 @@ class AppMenu {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getMenu() {
|
setMenu() {
|
||||||
const tpl = process.platform === 'darwin' ? this.getDarwinTpl() : this.getOtherTpl();
|
const tpl = process.platform === 'darwin' ? this.getDarwinTpl() : this.getOtherTpl();
|
||||||
return Menu.buildFromTemplate(tpl);
|
const menu = Menu.buildFromTemplate(tpl);
|
||||||
|
Menu.setApplicationMenu(menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user