mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-10 12:56:32 +00:00
fixed duplicate preferences menu item.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
parent
e72e794266
commit
f605994d7d
@ -19,8 +19,7 @@ export class CommonFrontendContribution extends TheiaCommonFrontendContribution
|
|||||||
CommonCommands.AUTO_SAVE,
|
CommonCommands.AUTO_SAVE,
|
||||||
CommonCommands.OPEN_PREFERENCES,
|
CommonCommands.OPEN_PREFERENCES,
|
||||||
CommonCommands.SELECT_ICON_THEME,
|
CommonCommands.SELECT_ICON_THEME,
|
||||||
CommonCommands.SELECT_COLOR_THEME,
|
CommonCommands.SELECT_COLOR_THEME
|
||||||
CommonCommands.OPEN_PREFERENCES
|
|
||||||
]) {
|
]) {
|
||||||
registry.unregisterMenuAction(command);
|
registry.unregisterMenuAction(command);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { injectable } from 'inversify';
|
import { injectable } from 'inversify';
|
||||||
import { isOSX } from '@theia/core/lib/common/os';
|
|
||||||
import { MenuModelRegistry } from '@theia/core/lib/common/menu';
|
import { MenuModelRegistry } from '@theia/core/lib/common/menu';
|
||||||
import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
|
import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
|
||||||
import { CommonCommands, CommonMenus } from '@theia/core/lib/browser';
|
import { CommonCommands, CommonMenus } from '@theia/core/lib/browser';
|
||||||
@ -10,11 +9,10 @@ export class PreferencesContribution extends TheiaPreferencesContribution {
|
|||||||
|
|
||||||
registerMenus(registry: MenuModelRegistry): void {
|
registerMenus(registry: MenuModelRegistry): void {
|
||||||
super.registerMenus(registry);
|
super.registerMenus(registry);
|
||||||
if (isOSX) {
|
|
||||||
// The settings group: preferences, CLI config is not part of the `File` menu on macOS.
|
// The settings group: preferences, CLI config is not part of the `File` menu on macOS.
|
||||||
|
// On Windows and Linux, we rebind it to `Preferences...`. It is safe to remove here.
|
||||||
registry.unregisterMenuAction(CommonCommands.OPEN_PREFERENCES.id, CommonMenus.FILE_SETTINGS_SUBMENU_OPEN);
|
registry.unregisterMenuAction(CommonCommands.OPEN_PREFERENCES.id, CommonMenus.FILE_SETTINGS_SUBMENU_OPEN);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
registerKeybindings(registry: KeybindingRegistry): void {
|
registerKeybindings(registry: KeybindingRegistry): void {
|
||||||
// https://github.com/eclipse-theia/theia/issues/8202
|
// https://github.com/eclipse-theia/theia/issues/8202
|
||||||
|
Loading…
x
Reference in New Issue
Block a user