mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-08 11:56:36 +00:00
Fixed the application name on macOS.
Patch for eclipse-theia/theia#8701. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
parent
874c3efa2c
commit
781747fe80
@ -3,11 +3,20 @@ import { app } from 'electron';
|
||||
import { fork } from 'child_process';
|
||||
import { AddressInfo } from 'net';
|
||||
import { ElectronSecurityToken } from '@theia/core/lib/electron-common/electron-token';
|
||||
import { FrontendApplicationConfig } from '@theia/application-package/lib/application-props';
|
||||
import { ElectronMainApplication as TheiaElectronMainApplication, TheiaBrowserWindowOptions } from '@theia/core/lib/electron-main/electron-main-application';
|
||||
|
||||
@injectable()
|
||||
export class ElectronMainApplication extends TheiaElectronMainApplication {
|
||||
|
||||
async start(config: FrontendApplicationConfig): Promise<void> {
|
||||
// Explicitly set the app name to have better menu items on macOS. ("About", "Hide", and "Quit")
|
||||
// See: https://github.com/electron-userland/electron-builder/issues/2468
|
||||
// Regression in Theia: https://github.com/eclipse-theia/theia/issues/8701
|
||||
app.on('ready', () => app.setName(config.applicationName));
|
||||
return super.start(config);
|
||||
}
|
||||
|
||||
protected async getDefaultBrowserWindowOptions(): Promise<TheiaBrowserWindowOptions> {
|
||||
const options = await super.getDefaultBrowserWindowOptions();
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user