From 4ef675b2b7803c72ed6e74ee13841e356a71f103 Mon Sep 17 00:00:00 2001 From: James Barnett Date: Wed, 21 Feb 2018 21:07:01 +0000 Subject: Make connection tab title configurable --- main.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'main.js') diff --git a/main.js b/main.js index 2639034..493d066 100644 --- a/main.js +++ b/main.js @@ -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(); }); -- cgit v1.2.3