diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2018-02-21 21:07:01 +0000 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2018-02-21 21:07:01 +0000 |
| commit | 4ef675b2b7803c72ed6e74ee13841e356a71f103 (patch) | |
| tree | f9790dbfad0bc23cb73e60000d40cd3fa22ef429 /main.js | |
| parent | b81c0f834f7f2285c40cfd57eb2943140025edad (diff) | |
| download | sql-plus-plus-4ef675b2b7803c72ed6e74ee13841e356a71f103.tar.xz sql-plus-plus-4ef675b2b7803c72ed6e74ee13841e356a71f103.zip | |
Make connection tab title configurable
Diffstat (limited to 'main.js')
| -rw-r--r-- | main.js | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -43,7 +43,7 @@ app.on("activate", () => { function createNewConnectionDialog() { newConnectionDialog = new BrowserWindow({ width: 400, - height: 470 + height: 540 }); newConnectionDialog.loadURL(url.format({ pathname: path.join(__dirname, "new-connection.html"), @@ -83,10 +83,14 @@ ipcMain.on("newConnection.createConnection", (event, payload) => { }); -ipcMain.on("queryExecutor.initialiseConnectionCallback", (event, payload) => { +ipcMain.on("queryExecutor.initialiseConnectionCallback", (event, executorId) => { // TODO - handle connection initialisation errors - uiWindow.webContents.send("instanceManager.registerNewInstance", payload); + // Bit of a hack, cant guarantee this was the executor which just got initalised.executor + // Should pass it back from the executor via the payload + let connectionName = queryExecutors[queryExecutors.length -1].connectionConfig.name; + + uiWindow.webContents.send("instanceManager.registerNewInstance", {assignedQueryExecutorId: executorId, connectionName: connectionName}); newConnectionDialog.close(); }); |