File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed
Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,6 @@ import { createEmitIpcMenuItemHandler } from './ipc'
44
55const mac = process . platform === 'darwin'
66
7- const preferencesMenuOption : MenuItemConstructorOptions = {
8- label : 'Preferences' ,
9- accelerator : 'Command+,' ,
10- click : async ( _menuItem , browserWindow ) => {
11- if ( browserWindow == null ) {
12- console . warn ( 'Browser window for the menu item does not exist.' )
13- return
14- }
15- browserWindow . webContents . send ( 'preferences' )
16- } ,
17- }
18-
197export const template : MenuItemConstructorOptions [ ] = [
208 ...( mac
219 ? [
@@ -24,7 +12,11 @@ export const template: MenuItemConstructorOptions[] = [
2412 submenu : [
2513 { role : 'about' } ,
2614 { type : 'separator' } ,
27- preferencesMenuOption ,
15+ {
16+ label : 'Preferences' ,
17+ accelerator : 'Cmd+,' ,
18+ click : createEmitIpcMenuItemHandler ( 'preferences' ) ,
19+ } ,
2820 { type : 'separator' } ,
2921 {
3022 label : 'Check For Updates' ,
@@ -94,7 +86,11 @@ export const template: MenuItemConstructorOptions[] = [
9486 click : checkForUpdates ,
9587 } ,
9688 { type : 'separator' } ,
97- preferencesMenuOption ,
89+ {
90+ label : 'Preferences' ,
91+ accelerator : 'Ctrl+,' ,
92+ click : createEmitIpcMenuItemHandler ( 'preferences' ) ,
93+ } ,
9894 { type : 'separator' } ,
9995 { role : 'quit' } ,
10096 ] as MenuItemConstructorOptions [ ] ) ,
You can’t perform that action at this time.
0 commit comments