diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-04-21 16:00:36 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-04-21 16:00:36 +0200 |
| commit | 106937e21d66b19a9a291e7014b9f81a412e9933 (patch) | |
| tree | 111eff60bf18dd8421f7ea19901ce7b52f82e255 /gui/src/main | |
| parent | 171530b04a5fdbc8c27fa4f29ee37a98545ab335 (diff) | |
| parent | 3526d44121d07b4ea1a4098f1d33d7b6bee43b17 (diff) | |
| download | mullvadvpn-106937e21d66b19a9a291e7014b9f81a412e9933.tar.xz mullvadvpn-106937e21d66b19a9a291e7014b9f81a412e9933.zip | |
Merge branch 'revert-electron-8'
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/index.ts | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 6f9185688a..c0dd326429 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -4,7 +4,6 @@ import log from 'electron-log'; import mkdirp from 'mkdirp'; import moment from 'moment'; import * as path from 'path'; -import { sprintf } from 'sprintf-js'; import * as uuid from 'uuid'; import AccountExpiry from '../shared/account-expiry'; import BridgeSettingsBuilder from '../shared/bridge-settings-builder'; @@ -190,10 +189,6 @@ class ApplicationMain { this.guiSettings.load(); - // The default value has previously been false but will be changed to true in Electron 9. The - // false value has been deprecated in Electron 8. This can be removed when Electron 9 is used. - app.allowRendererProcessReuse = true; - app.on('activate', this.onActivate); app.on('ready', this.onReady); app.on('window-all-closed', () => app.quit()); @@ -377,7 +372,6 @@ class ApplicationMain { this.installGenericMenubarAppWindowHandlers(tray, windowController); this.installLinuxWindowCloseHandler(windowController); this.setLinuxAppMenu(); - this.setLinuxTrayMenu(tray, windowController); window.setMenuBarVisibility(false); break; default: @@ -1361,28 +1355,6 @@ class ApplicationMain { Menu.setApplicationMenu(Menu.buildFromTemplate(template)); } - private setLinuxTrayMenu(tray: Tray, windowController: WindowController) { - tray.setContextMenu( - Menu.buildFromTemplate([ - { - label: sprintf( - // TRANSLATORS: The label displayed in the context menu that is opened when the user - // TRANSLATORS: clicks the icon in the linux system tray/status bar. - // TRANSLATORS: Available placeholder: - // TRANSLATORS: %(appname) - Name of the app, i.e. Mullvad VPN - messages.pgettext('status-icon-menu', 'Open %(appname)s'), - { - appname: app.getName(), - }, - ), - click: () => { - windowController.show(); - }, - }, - ]), - ); - } - private addContextMenu(window: BrowserWindow) { const menuTemplate: Electron.MenuItemConstructorOptions[] = [ { role: 'cut' }, |
