guis: disable keyboard shortcuts for launcher
This commit is contained in:
parent
a289b76d46
commit
b02f7b1297
2 changed files with 16 additions and 12 deletions
|
|
@ -23,17 +23,21 @@ module.exports = function(options={}) {
|
|||
|
||||
window.setMenuBarVisibility(false)
|
||||
|
||||
shortcut.register(window,'CmdOrCtrl+R',function(){
|
||||
window.reload()
|
||||
})
|
||||
if (options.shortcuts) {
|
||||
|
||||
shortcut.register(window,'F11',function(){
|
||||
window.setFullScreen(!window.isFullScreen())
|
||||
})
|
||||
shortcut.register(window,'CmdOrCtrl+R',function(){
|
||||
window.reload()
|
||||
})
|
||||
|
||||
shortcut.register(window,'F12',function(){
|
||||
window.toggleDevTools();
|
||||
})
|
||||
shortcut.register(window,'F11',function(){
|
||||
window.setFullScreen(!window.isFullScreen())
|
||||
})
|
||||
|
||||
shortcut.register(window,'F12',function(){
|
||||
window.toggleDevTools();
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
return window
|
||||
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ var start = function(readyApp) {
|
|||
var address = typeof settings.read('guiOnly')=='string'? 'http://' + settings.read('guiOnly') : settings.read('appAddresses')[0]
|
||||
|
||||
if (app.isReady()) {
|
||||
return require('./electron-window')({address:address})
|
||||
return require('./electron-window')({address:address, shortcuts:true})
|
||||
} else {
|
||||
app.on('ready',function(){
|
||||
require('./electron-window')({address:address})
|
||||
require('./electron-window')({address:address, shortcuts:false})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ if (cli) {
|
|||
launcher
|
||||
|
||||
app.on('ready',function(){
|
||||
launcher = require('./electron-window')({address:address, type:'splash', width:600, height:450})
|
||||
launcher = require('./electron-window')({address:address, shortcuts:false, type:'splash', width:600, height:450})
|
||||
})
|
||||
|
||||
ipcMain.on('start',function(e, options){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue