redesigned the settings menu group.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta
2020-07-20 22:02:54 +02:00
parent 12a13b869c
commit bbf880d187
8 changed files with 98 additions and 16 deletions

View File

@@ -19,7 +19,8 @@ export class CommonFrontendContribution extends TheiaCommonFrontendContribution
CommonCommands.AUTO_SAVE,
CommonCommands.OPEN_PREFERENCES,
CommonCommands.SELECT_ICON_THEME,
CommonCommands.SELECT_COLOR_THEME
CommonCommands.SELECT_COLOR_THEME,
CommonCommands.OPEN_PREFERENCES
]) {
registry.unregisterMenuAction(command);
}

View File

@@ -16,7 +16,6 @@ export class TabBarDecoratorService extends TheiaTabBarDecoratorService {
@inject(ILogger)
protected readonly logger: ILogger;
protected dataDirUri: URI | undefined;
@postConstruct()

View File

@@ -1,11 +1,21 @@
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';
import { PreferencesContribution as TheiaPreferencesContribution } from '@theia/preferences/lib/browser/preference-contribution';
import { CommonCommands } from '@theia/core/lib/browser';
@injectable()
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);
}
}
registerKeybindings(registry: KeybindingRegistry): void {
// https://github.com/eclipse-theia/theia/issues/8202
registry.registerKeybinding({