mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-13 07:36:32 +00:00
Added quit app for windows and linux
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
parent
587eb87416
commit
271b06d98a
@ -8,24 +8,30 @@ import { ArduinoMenus } from '../menu/arduino-menus';
|
|||||||
export class QuitApp extends Contribution {
|
export class QuitApp extends Contribution {
|
||||||
|
|
||||||
registerCommands(registry: CommandRegistry): void {
|
registerCommands(registry: CommandRegistry): void {
|
||||||
registry.registerCommand(QuitApp.Commands.QUIT_APP, {
|
if (!isOSX) {
|
||||||
execute: () => remote.app.quit()
|
registry.registerCommand(QuitApp.Commands.QUIT_APP, {
|
||||||
});
|
execute: () => remote.app.quit()
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
registerMenus(registry: MenuModelRegistry): void {
|
registerMenus(registry: MenuModelRegistry): void {
|
||||||
registry.registerMenuAction(ArduinoMenus.FILE__QUIT_GROUP, {
|
if (!isOSX) {
|
||||||
commandId: QuitApp.Commands.QUIT_APP.id,
|
registry.registerMenuAction(ArduinoMenus.FILE__QUIT_GROUP, {
|
||||||
label: 'Quit',
|
commandId: QuitApp.Commands.QUIT_APP.id,
|
||||||
order: '0'
|
label: 'Quit',
|
||||||
});
|
order: '0'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
registerKeybindings(registry: KeybindingRegistry): void {
|
registerKeybindings(registry: KeybindingRegistry): void {
|
||||||
registry.registerKeybinding({
|
if (!isOSX) {
|
||||||
command: QuitApp.Commands.QUIT_APP.id,
|
registry.registerKeybinding({
|
||||||
keybinding: isOSX ? 'CtrlCmd+Q' : isWindows ? 'Alt+F4' : 'Ctrl+Q'
|
command: QuitApp.Commands.QUIT_APP.id,
|
||||||
});
|
keybinding: isWindows ? 'Alt+F4' : 'Ctrl+Q'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ export class CommonFrontendContribution extends TheiaCommonFrontendContribution
|
|||||||
CommonCommands.FIND,
|
CommonCommands.FIND,
|
||||||
CommonCommands.REPLACE,
|
CommonCommands.REPLACE,
|
||||||
CommonCommands.AUTO_SAVE,
|
CommonCommands.AUTO_SAVE,
|
||||||
|
CommonCommands.OPEN_PREFERENCES,
|
||||||
CommonCommands.SELECT_ICON_THEME,
|
CommonCommands.SELECT_ICON_THEME,
|
||||||
CommonCommands.SELECT_COLOR_THEME
|
CommonCommands.SELECT_COLOR_THEME
|
||||||
]) {
|
]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user