cleanup for merge

This commit is contained in:
rafael-aero
2021-08-18 10:42:24 +02:00
parent bd08938c49
commit 336c3b9400
12 changed files with 27 additions and 49 deletions

View File

@@ -190,7 +190,7 @@ export = (socket: Socket, app: Electron.App) => {
electronSocket.emit('appRequestSingleInstanceLockCompleted', success);
app.on('second-instance', (event, args = [], workingDirectory = '') => {
electronSocket.emit('secondInstance', [args, workingDirectory]);
electronSocket.emit('secondInstance', { args: args, workingDirectory: workingDirectory });
});
});

View File

@@ -9,12 +9,12 @@ export = (socket: Socket) => {
const window = BrowserWindow.fromId(browserWindow.id);
const messageBoxReturnValue = await dialog.showMessageBox(window, options);
electronSocket.emit('showMessageBoxComplete' + guid, [messageBoxReturnValue.response, messageBoxReturnValue.checkboxChecked]);
electronSocket.emit('showMessageBoxComplete' + guid, { response: messageBoxReturnValue.response, checked: messageBoxReturnValue.checkboxChecked });
} else {
const id = guid || options;
const messageBoxReturnValue = await dialog.showMessageBox(browserWindow);
electronSocket.emit('showMessageBoxComplete' + id, [messageBoxReturnValue.response, messageBoxReturnValue.checkboxChecked]);
electronSocket.emit('showMessageBoxComplete' + id, { response: messageBoxReturnValue.response, checked: messageBoxReturnValue.checkboxChecked });
}
});

View File

@@ -9,7 +9,7 @@ export = (socket: Socket) => {
const menu = Menu.buildFromTemplate(menuItems);
addContextMenuItemClickConnector(menu.items, browserWindowId, (id, windowId) => {
electronSocket.emit('contextMenuItemClicked', [id, windowId]);
electronSocket.emit('contextMenuItemClicked', { id: id, windowId: windowId });
});
const index = contextMenuItems.findIndex(contextMenu => contextMenu.browserWindowId === browserWindowId);

View File

@@ -18,7 +18,7 @@ export = (socket: Socket) => {
socket.on('register-screen-display-metrics-changed', (id) => {
screen.on('display-metrics-changed', (event, display, changedMetrics) => {
electronSocket.emit('screen-display-metrics-changed-event' + id, [display, changedMetrics]);
electronSocket.emit('screen-display-metrics-changed-event' + id, { display: display, changedMetrics: changedMetrics });
});
});

View File

@@ -8,7 +8,7 @@ export = (socket: Socket) => {
socket.on('register-tray-click', (id) => {
if (tray.value) {
tray.value.on('click', (event, bounds) => {
electronSocket.emit('tray-click-event' + id, [(<any>event).__proto__, bounds]);
electronSocket.emit('tray-click-event' + id, {eventArgs: (<any>event).__proto__, bounds: bounds });
});
}
});
@@ -16,7 +16,7 @@ export = (socket: Socket) => {
socket.on('register-tray-right-click', (id) => {
if (tray.value) {
tray.value.on('right-click', (event, bounds) => {
electronSocket.emit('tray-right-click-event' + id, [(<any>event).__proto__, bounds]);
electronSocket.emit('tray-right-click-event' + id, { eventArgs: (<any>event).__proto__, bounds: bounds });
});
}
});
@@ -24,7 +24,7 @@ export = (socket: Socket) => {
socket.on('register-tray-double-click', (id) => {
if (tray.value) {
tray.value.on('double-click', (event, bounds) => {
electronSocket.emit('tray-double-click-event' + id, [(<any>event).__proto__, bounds]);
electronSocket.emit('tray-double-click-event' + id, { eventArgs: (<any>event).__proto__, bounds: bounds });
});
}
});

View File

@@ -181,7 +181,7 @@ export = (socket: Socket) => {
browserWindow.webContents.session.cookies.removeAllListeners('changed');
browserWindow.webContents.session.cookies.on('changed', (event, cookie, cause, removed) => {
electronSocket.emit('webContents-session-cookies-changed' + id, [cookie, cause, removed]);
electronSocket.emit('webContents-session-cookies-changed' + id, { cookie: cookie, cause: cause, removed: removed });
});
});