diff --git a/Office365/package.json b/Office365/package.json index 13074cb..f51774b 100644 --- a/Office365/package.json +++ b/Office365/package.json @@ -1,7 +1,7 @@ { "name": "mail.office365.com", "productName": "Outlook for Office365", - "version": "1.0.2", + "version": "1.0.3", "description": "Outlook for Office365 Desktop application", "main": "src/main.js", "author": "Tom Laird-McConnell", diff --git a/Office365/src/controller/mail-window-controller.js b/Office365/src/controller/mail-window-controller.js index eb695ef..4af189d 100644 --- a/Office365/src/controller/mail-window-controller.js +++ b/Office365/src/controller/mail-window-controller.js @@ -1,4 +1,4 @@ -const { BrowserWindow, shell, ipcMain } = require('electron') +const { BrowserWindow, shell, ipcMain, Menu } = require('electron') const settings = require('electron-settings') const CssInjector = require('../js/css-injector') const path = require('path') @@ -65,6 +65,28 @@ class MailWindowController { // Open the new window in external browser this.win.webContents.on('new-window', this.openInBrowser) + + // Create the Application's main menu + var template = [{ + label: "Application", + submenu: [ + { label: "About Application", selector: "orderFrontStandardAboutPanel:" }, + { type: "separator" }, + { label: "Quit", accelerator: "Command+Q", click: function() { app.quit(); }} + ]}, { + label: "Edit", + submenu: [ + { label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:" }, + { label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", selector: "redo:" }, + { type: "separator" }, + { label: "Cut", accelerator: "CmdOrCtrl+X", selector: "cut:" }, + { label: "Copy", accelerator: "CmdOrCtrl+C", selector: "copy:" }, + { label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:" }, + { label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:" } + ]} + ]; + + Menu.setApplicationMenu(Menu.buildFromTemplate(template)); } addUnreadNumberObserver() { diff --git a/Outlook.com/package.json b/Outlook.com/package.json index 770ac23..c0d618e 100644 --- a/Outlook.com/package.json +++ b/Outlook.com/package.json @@ -1,7 +1,7 @@ { "name": "outlook.com", "productName": "Outlook for Outlook.com", - "version": "1.0.2", + "version": "1.0.3", "description": "Outlook for Outlook.com Desktop application", "main": "src/main.js", "author": "Tom Laird-McConnell", diff --git a/Outlook.com/src/controller/mail-window-controller.js b/Outlook.com/src/controller/mail-window-controller.js index c6002c8..1298d71 100644 --- a/Outlook.com/src/controller/mail-window-controller.js +++ b/Outlook.com/src/controller/mail-window-controller.js @@ -1,4 +1,4 @@ -const { BrowserWindow, shell, ipcMain } = require('electron') +const { BrowserWindow, shell, ipcMain, Menu } = require('electron') const settings = require('electron-settings') const CssInjector = require('../js/css-injector') const path = require('path') @@ -63,7 +63,29 @@ class MailWindowController { }) // Open the new window in external browser - this.win.webContents.on('new-window', this.openInBrowser) + this.win.webContents.on('new-window', this.openInBrowser); + + // Create the Application's main menu + var template = [{ + label: "Application", + submenu: [ + { label: "About Application", selector: "orderFrontStandardAboutPanel:" }, + { type: "separator" }, + { label: "Quit", accelerator: "Command+Q", click: function() { app.quit(); }} + ]}, { + label: "Edit", + submenu: [ + { label: "Undo", accelerator: "CmdOrCtrl+Z", selector: "undo:" }, + { label: "Redo", accelerator: "Shift+CmdOrCtrl+Z", selector: "redo:" }, + { type: "separator" }, + { label: "Cut", accelerator: "CmdOrCtrl+X", selector: "cut:" }, + { label: "Copy", accelerator: "CmdOrCtrl+C", selector: "copy:" }, + { label: "Paste", accelerator: "CmdOrCtrl+V", selector: "paste:" }, + { label: "Select All", accelerator: "CmdOrCtrl+A", selector: "selectAll:" } + ]} + ]; + + Menu.setApplicationMenu(Menu.buildFromTemplate(template)); } addUnreadNumberObserver() {