1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-25 03:33:14 +01:00

Allow pass filename cmd line

https://github.com/mifi/lossless-cut/issues/9
This commit is contained in:
Mikael Finstad 2016-11-21 19:05:48 +01:00
parent b622df997e
commit 3d47759b0f
2 changed files with 9 additions and 0 deletions

View File

@ -48,3 +48,10 @@ app.on('activate', () => {
createWindow();
}
});
electron.ipcMain.on('renderer-ready', () => {
if (!isDev) {
const fileToOpen = process.argv[1];
if (fileToOpen) mainWindow.webContents.send('file-opened', [fileToOpen]);
}
});

View File

@ -111,6 +111,8 @@ class App extends React.Component {
keyboardJs.bind('e', () => this.cutClick());
keyboardJs.bind('i', () => this.setCutStart());
keyboardJs.bind('o', () => this.setCutEnd());
electron.ipcRenderer.send('renderer-ready');
}
onPlay(playing) {