Add Show option under the Window menu
Window > Show will reveal the mainWindow after it has been closed. // FREEBIE
This commit is contained in:
parent
0c8e769c2a
commit
d018fa63ff
2 changed files with 11 additions and 4 deletions
12
main.js
12
main.js
|
@ -157,11 +157,15 @@ app.on('ready', function() {
|
||||||
setInterval(function() { autoUpdater.checkForUpdates(); }, autoUpdaterInterval);
|
setInterval(function() { autoUpdater.checkForUpdates(); }, autoUpdaterInterval);
|
||||||
}
|
}
|
||||||
|
|
||||||
let template = require('./menu.js');
|
|
||||||
const menu = Menu.buildFromTemplate(template)
|
|
||||||
Menu.setApplicationMenu(menu)
|
|
||||||
|
|
||||||
createWindow();
|
createWindow();
|
||||||
|
|
||||||
|
let template = require('./menu.js');
|
||||||
|
template[3].submenu[3].click = function() {
|
||||||
|
mainWindow.show();
|
||||||
|
};
|
||||||
|
const menu = Menu.buildFromTemplate(template);
|
||||||
|
Menu.setApplicationMenu(menu);
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
app.on('before-quit', function() {
|
app.on('before-quit', function() {
|
||||||
|
|
3
menu.js
3
menu.js
|
@ -137,6 +137,9 @@ if (process.platform === 'darwin') {
|
||||||
label: 'Zoom',
|
label: 'Zoom',
|
||||||
role: 'zoom'
|
role: 'zoom'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Show',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue