-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Refactor menus to avoid passing null to menu array, which caused an …
…immediate crash on Windows -Begin replacing double quotes with single quotes
- Loading branch information
1 parent
df625ba
commit 560abf1
Showing
5 changed files
with
55 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,21 @@ | ||
import { app } from 'electron'; | ||
import { IS_MAC } from '../constants'; | ||
import { aboutMenu } from './items/about'; | ||
|
||
// This is the "Application" menu, which is only used on macOS | ||
let appMenuTemplate = null; | ||
|
||
if (IS_MAC) { | ||
appMenuTemplate = { | ||
label: 'Android Messages', | ||
submenu: [, | ||
{ | ||
label: 'About Android Messages Desktop', | ||
click: () => aboutMenu() | ||
}, | ||
{ | ||
type: 'separator', | ||
}, | ||
{ | ||
label: 'Quit', | ||
accelerator: 'Command+Q', | ||
click: () => app.quit(), | ||
} | ||
] | ||
}; | ||
} | ||
|
||
export { appMenuTemplate }; | ||
export const appMenuTemplate = { | ||
label: 'Android Messages', | ||
submenu: [, | ||
{ | ||
label: 'About Android Messages Desktop', | ||
click: () => aboutMenu() | ||
}, | ||
{ | ||
type: 'separator', | ||
}, | ||
{ | ||
label: 'Quit', | ||
accelerator: 'Command+Q', | ||
click: () => app.quit(), | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { appMenuTemplate } from './app_menu_template'; | ||
import { editMenuTemplate } from './edit_menu_template'; | ||
import { IS_MAC } from '../constants'; | ||
|
||
const baseMenuTemplate = [editMenuTemplate]; | ||
|
||
if (IS_MAC) { | ||
baseMenuTemplate.unshift(appMenuTemplate); | ||
} | ||
|
||
export { baseMenuTemplate }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters