This commit is contained in:
SteVen Batten
2018-08-02 12:38:14 -07:00
parent 1dc0385e5d
commit b9885b9960
2 changed files with 58 additions and 2 deletions

View File

@@ -502,6 +502,8 @@ export class Menubar {
} else if (isMenubarMenuItemAction(item)) {
if (item.id === 'workbench.action.openRecent') {
this.insertRecentMenuItems(menu);
} else if (item.id === 'workbench.action.showAboutDialog') {
this.insertCheckForUpdatesItems(menu);
}
// Store the keybinding
@@ -523,6 +525,14 @@ export class Menubar {
}
}
private insertCheckForUpdatesItems(menu: Electron.Menu) {
const updateItems = this.getUpdateMenuItems();
if (updateItems.length) {
updateItems.forEach(i => menu.append(i));
menu.append(__separator__());
}
}
private insertRecentMenuItems(menu: Electron.Menu) {
const { workspaces, files } = this.historyMainService.getRecentlyOpened();