mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-09 20:36:32 +00:00
Cleaned up File
menu.
Removed: - `New File`, - `New Window`. Closes #1014. Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
parent
f5cee97fef
commit
27dd120e5d
@ -296,6 +296,8 @@ import {
|
||||
SurveyNotificationService,
|
||||
SurveyNotificationServicePath,
|
||||
} from '../common/protocol/survey-service';
|
||||
import { WindowContribution } from './theia/core/window-contribution';
|
||||
import { WindowContribution as TheiaWindowContribution } from '@theia/core/lib/browser/window-contribution';
|
||||
|
||||
MonacoThemingService.register({
|
||||
id: 'arduino-theme',
|
||||
@ -605,6 +607,10 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
||||
bind(OutputToolbarContribution).toSelf().inSingletonScope();
|
||||
rebind(TheiaOutputToolbarContribution).toService(OutputToolbarContribution);
|
||||
|
||||
// To remove `New Window` from the `File` menu
|
||||
bind(WindowContribution).toSelf().inSingletonScope();
|
||||
rebind(TheiaWindowContribution).toService(WindowContribution);
|
||||
|
||||
bind(ArduinoDaemon)
|
||||
.toDynamicValue((context) =>
|
||||
WebSocketConnectionProvider.createProxy(
|
||||
|
@ -21,6 +21,7 @@ export class CommonFrontendContribution extends TheiaCommonFrontendContribution
|
||||
CommonCommands.TOGGLE_MAXIMIZED,
|
||||
CommonCommands.PIN_TAB,
|
||||
CommonCommands.UNPIN_TAB,
|
||||
CommonCommands.NEW_FILE,
|
||||
]) {
|
||||
commandRegistry.unregisterCommand(command);
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
import { injectable } from '@theia/core/shared/inversify';
|
||||
import { WindowContribution as TheiaWindowContribution } from '@theia/core/lib/browser/window-contribution';
|
||||
|
||||
@injectable()
|
||||
export class WindowContribution extends TheiaWindowContribution {
|
||||
override registerCommands(): void {
|
||||
// NOOP
|
||||
}
|
||||
override registerKeybindings(): void {
|
||||
// NOO
|
||||
}
|
||||
override registerMenus(): void {
|
||||
// NOOP;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user