Mentions légales du service

Skip to content
Snippets Groups Projects

Resolve "double click on a file doesn't open the file if the editor is not opened"

1 file
+ 10
0
Compare changes
  • Side-by-side
  • Inline
+ 10
0
@@ -15,6 +15,7 @@ const headless = process.argv.includes('--headless=true');
let mainWindow;
let splashWindow;
let filepath = process.argv[1] ? path.normalize(process.argv[1]) : null;
let fileToOpen = null;
app.on('will-finish-launching', () => {
app.on('open-file', async (event, path) => {
@@ -26,6 +27,8 @@ app.on('will-finish-launching', () => {
'epocProjectPicked',
JSON.stringify({ name: null, modified: null, filepath: filepath, workdir: null }),
);
} else {
fileToOpen = path;
}
});
});
@@ -67,6 +70,13 @@ app.whenReady().then(() => {
console.log('Update ready');
console.log(e);
});
ipcMain.on('initialized', () => {
mainWindow.webContents.send(
'epocProjectPicked',
JSON.stringify({ name: null, modified: null, filepath: fileToOpen, workdir: null }),
);
});
});
ipcMain.on('newWindow', () => {
Loading