diff --git a/internal_packages/system-tray/lib/system-tray.es6 b/internal_packages/system-tray/lib/system-tray.es6 index b371bb3b5..903917402 100644 --- a/internal_packages/system-tray/lib/system-tray.es6 +++ b/internal_packages/system-tray/lib/system-tray.es6 @@ -11,6 +11,7 @@ class SystemTray { this._tray = new Tray(this._store.icon()); this._tray.setToolTip(this._store.tooltip()); + // Check in case there is no menu for the current platform const menu = this._store.menu(); if (menu != null) this._tray.setContextMenu(menu); diff --git a/internal_packages/system-tray/lib/tray-store.es6 b/internal_packages/system-tray/lib/tray-store.es6 index 3505f6a31..b97772150 100644 --- a/internal_packages/system-tray/lib/tray-store.es6 +++ b/internal_packages/system-tray/lib/tray-store.es6 @@ -11,7 +11,7 @@ const {canvasWithSystemTrayIconAndText} = CanvasUtils; const BASE_ICON_PATH = path.join(__dirname, '..', 'assets', process.platform, 'ic-systemtray-nylas.png'); const UNREAD_ICON_PATH = path.join(__dirname, '..', 'assets', process.platform, 'ic-systemtray-nylas-unread.png'); -const menuTemplate = [ +const _menuTemplate = [ { label: 'New Message', click: ()=> ipcRenderer.send('command', 'application:new-message'), @@ -29,15 +29,15 @@ const menuTemplate = [ }, ]; -if (process.platform === 'darwin') { - menuTemplate.unshift({ +if (process.platform !== 'win32') { + _menuTemplate.unshift({ label: 'Open Inbox', click: ()=> ipcRenderer.send('command', 'application:show-main-window'), }); } const _buildMenu = ()=> { - return Menu.buildFromTemplate(menuTemplate); + return Menu.buildFromTemplate(_menuTemplate); }; class TrayStore extends NylasStore { diff --git a/src/config-schema.coffee b/src/config-schema.coffee index 2cba75157..d2765444d 100644 --- a/src/config-schema.coffee +++ b/src/config-schema.coffee @@ -12,8 +12,8 @@ module.exports = systemTray: type: 'boolean' default: true - title: "Show icon in Mac OS X menu bar" - platforms: ['darwin'] + title: "Show icon in menu bar" + platforms: ['darwin', 'linux'] showImportant: type: 'boolean' default: true