mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-10 21:06:33 +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,
|
SurveyNotificationService,
|
||||||
SurveyNotificationServicePath,
|
SurveyNotificationServicePath,
|
||||||
} from '../common/protocol/survey-service';
|
} 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({
|
MonacoThemingService.register({
|
||||||
id: 'arduino-theme',
|
id: 'arduino-theme',
|
||||||
@ -605,6 +607,10 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
bind(OutputToolbarContribution).toSelf().inSingletonScope();
|
bind(OutputToolbarContribution).toSelf().inSingletonScope();
|
||||||
rebind(TheiaOutputToolbarContribution).toService(OutputToolbarContribution);
|
rebind(TheiaOutputToolbarContribution).toService(OutputToolbarContribution);
|
||||||
|
|
||||||
|
// To remove `New Window` from the `File` menu
|
||||||
|
bind(WindowContribution).toSelf().inSingletonScope();
|
||||||
|
rebind(TheiaWindowContribution).toService(WindowContribution);
|
||||||
|
|
||||||
bind(ArduinoDaemon)
|
bind(ArduinoDaemon)
|
||||||
.toDynamicValue((context) =>
|
.toDynamicValue((context) =>
|
||||||
WebSocketConnectionProvider.createProxy(
|
WebSocketConnectionProvider.createProxy(
|
||||||
|
@ -21,6 +21,7 @@ export class CommonFrontendContribution extends TheiaCommonFrontendContribution
|
|||||||
CommonCommands.TOGGLE_MAXIMIZED,
|
CommonCommands.TOGGLE_MAXIMIZED,
|
||||||
CommonCommands.PIN_TAB,
|
CommonCommands.PIN_TAB,
|
||||||
CommonCommands.UNPIN_TAB,
|
CommonCommands.UNPIN_TAB,
|
||||||
|
CommonCommands.NEW_FILE,
|
||||||
]) {
|
]) {
|
||||||
commandRegistry.unregisterCommand(command);
|
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