main: read-only mode (disables, editor and session history)
This commit is contained in:
parent
f8b8a566c5
commit
0899f5bc5e
9 changed files with 73 additions and 23 deletions
|
|
@ -16,6 +16,10 @@ module.exports = {
|
|||
|
||||
if (settings.read('theme')) ipc.send('applyStyle',settings.read('theme'),clientId)
|
||||
|
||||
if (settings.read('readOnly')) {
|
||||
ipc.send('editorDisable',{permanent:true})
|
||||
}
|
||||
|
||||
if (settings.read('newSession')) {
|
||||
ipc.send('sessionNew')
|
||||
return
|
||||
|
|
@ -85,7 +89,7 @@ module.exports = {
|
|||
|
||||
if (data.path) {
|
||||
|
||||
this.sessionAddToHistory(data.path)
|
||||
if (!settings.read('readOnly')) this.sessionAddToHistory(data.path)
|
||||
|
||||
fs.lstat(data.path, (err, stats)=>{
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ if (cli) {
|
|||
launcher
|
||||
|
||||
app.on('ready',function(){
|
||||
launcher = require('./electron-window')({address:address, shortcuts:false, width:600, height:510})
|
||||
launcher = require('./electron-window')({address:address, shortcuts:false, width:600, height:540})
|
||||
})
|
||||
|
||||
ipcMain.on('start',function(e, options){
|
||||
|
|
|
|||
|
|
@ -50,7 +50,13 @@ var options = {
|
|||
true : 'examples can\'t be listed if --load is set'
|
||||
}
|
||||
},
|
||||
'disable-vsync':{type:'boolean',describe:'disable gui\'s vertical synchronization', restart: true}
|
||||
'disable-vsync':{type:'boolean',describe:'disable gui\'s vertical synchronization', restart: true},
|
||||
'read-only':{type:'boolean',describe:'disable session editing',
|
||||
check: (r, argv)=>{
|
||||
return (!argv.b) ?
|
||||
true : 'blank session can\'t be started in read-only mode'
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -95,6 +101,7 @@ var makeDefaultConfig = function(argv){
|
|||
noGui: argv.n || false,
|
||||
guiOnly: typeof argv.g == 'string' ? argv.g.length ? argv.g : true : false,
|
||||
noVsync: argv['disable-vsync'] || false,
|
||||
readOnly: argv['read-only'] || false,
|
||||
midi: argv.m,
|
||||
appAddresses:function(){
|
||||
var appAddresses = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue