main: init app menu on ready event to fix macOs menus & shortcuts -> 0.24.2
This commit is contained in:
parent
d4c7b868fe
commit
37b095844e
5 changed files with 19 additions and 18 deletions
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## 0.24.2
|
||||
|
||||
- bug fixes
|
||||
- macOs app menu & shortcuts
|
||||
|
||||
## 0.24.1
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -13,12 +13,6 @@ if (settings.read('noGpu') || (!settings.cli && settings.read('argv')['disable-
|
|||
app.disableHardwareAcceleration()
|
||||
}
|
||||
|
||||
app.on('window-all-closed', function() {
|
||||
if (process.platform != 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
var template = [{
|
||||
label: 'Edit',
|
||||
submenu: [
|
||||
|
|
@ -60,8 +54,6 @@ if (process.platform === 'darwin') {
|
|||
}
|
||||
]
|
||||
})
|
||||
|
||||
// Add Window menu (OS X)
|
||||
template.push(
|
||||
{
|
||||
label: 'Window',
|
||||
|
|
@ -101,9 +93,19 @@ if (process.platform === 'darwin') {
|
|||
)
|
||||
}
|
||||
|
||||
app.on('before-quit',()=>{
|
||||
process.exit()
|
||||
})
|
||||
|
||||
var menu = Menu.buildFromTemplate(template)
|
||||
Menu.setApplicationMenu(menu)
|
||||
app.on('ready',()=>{
|
||||
var menu = Menu.buildFromTemplate(template)
|
||||
Menu.setApplicationMenu(menu)
|
||||
})
|
||||
|
||||
app.on('window-all-closed', function() {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = app
|
||||
|
|
|
|||
|
|
@ -37,16 +37,10 @@ var start = function(readyApp) {
|
|||
address += settings.read('urlOptions')
|
||||
if (app.isReady()) {
|
||||
var win = require('./electron-window')({address:address, shortcuts:true})
|
||||
app.on('before-quit',()=>{
|
||||
process.exit()
|
||||
})
|
||||
return win
|
||||
} else {
|
||||
app.on('ready',function(){
|
||||
var win = require('./electron-window')({address:address, shortcuts:true})
|
||||
app.on('before-quit',()=>{
|
||||
process.exit()
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "open-stage-control",
|
||||
"productName": "Open Stage Control",
|
||||
"description": "Libre and modular OSC / MIDI controller",
|
||||
"version": "0.24.1",
|
||||
"version": "0.24.2",
|
||||
"author": {
|
||||
"name": "Jean-Emmanuel Doucet / AMMD",
|
||||
"email": "jeannot@ammd.net"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "open-stage-control-builder",
|
||||
"description": "[Builder package] Libre and modular OSC / MIDI controller",
|
||||
"version": "0.24.1",
|
||||
"version": "0.24.2",
|
||||
"author": {
|
||||
"name": "Jean-Emmanuel Doucet / AMMD",
|
||||
"email": "jeannot@ammd.net"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue