mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-09 20:36: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.OPEN_PREFERENCES,
|
||||
CommonCommands.SELECT_ICON_THEME,
|
||||
CommonCommands.SELECT_COLOR_THEME,
|
||||
CommonCommands.OPEN_PREFERENCES
|
||||
CommonCommands.SELECT_COLOR_THEME
|
||||
]) {
|
||||
registry.unregisterMenuAction(command);
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { injectable } from 'inversify';
|
||||
import { isOSX } from '@theia/core/lib/common/os';
|
||||
import { MenuModelRegistry } from '@theia/core/lib/common/menu';
|
||||
import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
|
||||
import { CommonCommands, CommonMenus } from '@theia/core/lib/browser';
|
||||
@ -10,10 +9,9 @@ export class PreferencesContribution extends TheiaPreferencesContribution {
|
||||
|
||||
registerMenus(registry: MenuModelRegistry): void {
|
||||
super.registerMenus(registry);
|
||||
if (isOSX) {
|
||||
// The settings group: preferences, CLI config is not part of the `File` menu on macOS.
|
||||
registry.unregisterMenuAction(CommonCommands.OPEN_PREFERENCES.id, CommonMenus.FILE_SETTINGS_SUBMENU_OPEN);
|
||||
}
|
||||
// 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);
|
||||
}
|
||||
|
||||
registerKeybindings(registry: KeybindingRegistry): void {
|
||||
|
Loading…
x
Reference in New Issue
Block a user