mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-31 19:27:00 -06:00
ELECTRON-720 - Set menu to null (#513)
This commit is contained in:
parent
bae410ebbb
commit
0d44901180
@ -9,6 +9,7 @@ const logLevels = require('../enums/logLevels.js');
|
|||||||
const { version, clientVersion, buildNumber } = require('../../package.json');
|
const { version, clientVersion, buildNumber } = require('../../package.json');
|
||||||
const { initCrashReporterMain, initCrashReporterRenderer } = require('../crashReporter.js');
|
const { initCrashReporterMain, initCrashReporterRenderer } = require('../crashReporter.js');
|
||||||
const i18n = require('../translation/i18n');
|
const i18n = require('../translation/i18n');
|
||||||
|
const { isMac } = require('../utils/misc');
|
||||||
|
|
||||||
let aboutWindow;
|
let aboutWindow;
|
||||||
|
|
||||||
@ -88,6 +89,10 @@ function openAboutWindow(windowName) {
|
|||||||
initCrashReporterMain({ process: 'about app window' });
|
initCrashReporterMain({ process: 'about app window' });
|
||||||
initCrashReporterRenderer(aboutWindow, { process: 'render | about app window' });
|
initCrashReporterRenderer(aboutWindow, { process: 'render | about app window' });
|
||||||
aboutWindow.webContents.send('versionInfo', { version, clientVersion, buildNumber });
|
aboutWindow.webContents.send('versionInfo', { version, clientVersion, buildNumber });
|
||||||
|
if (!isMac) {
|
||||||
|
// prevents from displaying menu items when "alt" key is pressed
|
||||||
|
aboutWindow.setMenu(null);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
aboutWindow.webContents.on('crashed', function () {
|
aboutWindow.webContents.on('crashed', function () {
|
||||||
|
@ -105,6 +105,10 @@ function openBasicAuthWindow(windowName, hostname, isValidCredentials, clearSett
|
|||||||
initCrashReporterRenderer(basicAuthWindow, { process: 'render | basic auth window' });
|
initCrashReporterRenderer(basicAuthWindow, { process: 'render | basic auth window' });
|
||||||
basicAuthWindow.webContents.send('hostname', hostname);
|
basicAuthWindow.webContents.send('hostname', hostname);
|
||||||
basicAuthWindow.webContents.send('isValidCredentials', isValidCredentials);
|
basicAuthWindow.webContents.send('isValidCredentials', isValidCredentials);
|
||||||
|
if (!isMac) {
|
||||||
|
// prevents from displaying menu items when "alt" key is pressed
|
||||||
|
basicAuthWindow.setMenu(null);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
basicAuthWindow.webContents.on('crashed', function () {
|
basicAuthWindow.webContents.on('crashed', function () {
|
||||||
|
@ -12,6 +12,7 @@ const notify = require('./../electron-notify');
|
|||||||
const eventEmitter = require('./../../eventEmitter');
|
const eventEmitter = require('./../../eventEmitter');
|
||||||
const { updateConfigField } = require('../../config');
|
const { updateConfigField } = require('../../config');
|
||||||
const i18n = require('../../translation/i18n');
|
const i18n = require('../../translation/i18n');
|
||||||
|
const { isMac } = require('../../utils/misc');
|
||||||
|
|
||||||
let configurationWindow;
|
let configurationWindow;
|
||||||
let screens;
|
let screens;
|
||||||
@ -129,6 +130,10 @@ function openConfigurationWindow(windowName) {
|
|||||||
configurationWindow.webContents.send('screens', screens);
|
configurationWindow.webContents.send('screens', screens);
|
||||||
}
|
}
|
||||||
configurationWindow.webContents.send('notificationSettings', {position: position, display: display});
|
configurationWindow.webContents.send('notificationSettings', {position: position, display: display});
|
||||||
|
if (!isMac) {
|
||||||
|
// prevents from displaying menu items when "alt" key is pressed
|
||||||
|
configurationWindow.setMenu(null);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
configurationWindow.on('close', () => {
|
configurationWindow.on('close', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user