Skip to content

Commit f605994

Browse files
author
Akos Kitta
committed
fixed duplicate preferences menu item.
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
1 parent e72e794 commit f605994

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

arduino-ide-extension/src/browser/theia/core/common-frontend-contribution.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ export class CommonFrontendContribution extends TheiaCommonFrontendContribution
1919
CommonCommands.AUTO_SAVE,
2020
CommonCommands.OPEN_PREFERENCES,
2121
CommonCommands.SELECT_ICON_THEME,
22-
CommonCommands.SELECT_COLOR_THEME,
23-
CommonCommands.OPEN_PREFERENCES
22+
CommonCommands.SELECT_COLOR_THEME
2423
]) {
2524
registry.unregisterMenuAction(command);
2625
}

arduino-ide-extension/src/browser/theia/preferences/preferences-contribution.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { injectable } from 'inversify';
2-
import { isOSX } from '@theia/core/lib/common/os';
32
import { MenuModelRegistry } from '@theia/core/lib/common/menu';
43
import { KeybindingRegistry } from '@theia/core/lib/browser/keybinding';
54
import { CommonCommands, CommonMenus } from '@theia/core/lib/browser';
@@ -10,10 +9,9 @@ export class PreferencesContribution extends TheiaPreferencesContribution {
109

1110
registerMenus(registry: MenuModelRegistry): void {
1211
super.registerMenus(registry);
13-
if (isOSX) {
14-
// The settings group: preferences, CLI config is not part of the `File` menu on macOS.
15-
registry.unregisterMenuAction(CommonCommands.OPEN_PREFERENCES.id, CommonMenus.FILE_SETTINGS_SUBMENU_OPEN);
16-
}
12+
// The settings group: preferences, CLI config is not part of the `File` menu on macOS.
13+
// On Windows and Linux, we rebind it to `Preferences...`. It is safe to remove here.
14+
registry.unregisterMenuAction(CommonCommands.OPEN_PREFERENCES.id, CommonMenus.FILE_SETTINGS_SUBMENU_OPEN);
1715
}
1816

1917
registerKeybindings(registry: KeybindingRegistry): void {

0 commit comments

Comments
 (0)