8000 Added New/Save shortcuts to menu. · arduino/lab-micropython-editor@2791e00 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2791e00

Browse files
committed
Added New/Save shortcuts to menu.
Signed-off-by: ubi de feo <me@ubidefeo.com>
1 parent ff5ca09 commit 2791e00

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

backend/menu.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,14 @@ module.exports = function registerMenu(win, state = {}) {
5555
{
5656
label: 'File',
5757
submenu: [
58+
{ label: 'New',
59+
accelerator: shortcuts.menu.NEW,
60+
enabled: state.view === 'editor',
61+
click: () => win.webContents.send('shortcut-cmd', shortcuts.global.NEW)
62+
},
5863
{ label: 'Save',
5964
accelerator: shortcuts.menu.SAVE,
65+
enabled: state.view === 'editor',
6066
click: () => win.webContents.send('shortcut-cmd', shortcuts.global.SAVE)
6167
},
6268
isMac ? { role: 'close' } : { role: 'quit' }

0 commit comments

Comments
 (0)
0