From 028d0ac7f8e2b66f9450efe89842a7e87a3c9be0 Mon Sep 17 00:00:00 2001 From: Jonas Schwabe Date: Tue, 12 Jul 2016 22:14:32 +0200 Subject: [PATCH] implements #122, urgent hint on linux --- src/browser/settings.jsx | 2 +- src/main.js | 5 ++++- test/specs/browser/settings_test.js | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/browser/settings.jsx b/src/browser/settings.jsx index 4acf5db4..99e12e0d 100644 --- a/src/browser/settings.jsx +++ b/src/browser/settings.jsx @@ -202,7 +202,7 @@ var SettingsPage = React.createClass({ ) : null; var notifications_row = null; - if (process.platform === 'win32') { + if (process.platform === 'win32' || process.platform === 'linux') { var notificationSettings = [ { label: 'Never', diff --git a/src/main.js b/src/main.js index ddcf0a25..fe4b8575 100644 --- a/src/main.js +++ b/src/main.js @@ -261,10 +261,13 @@ app.on('ready', function() { mainWindow.focus(); }); ipcMain.on('notified', function(event, arg) { - if (process.platform === 'win32') { + if (process.platform === 'win32' || process.platform == 'linux') { if (config.notifications.flashWindow === 2) { mainWindow.flashFrame(true); } + } + + if (process.platform === 'win32') { // On Windows 8.1 and Windows 8, a shortcut with a Application User Model ID must be installed to the Start screen. // In current version, use tray balloon for notification if (osVersion.isLowerThanOrEqualWindows8_1()) { diff --git a/test/specs/browser/settings_test.js b/test/specs/browser/settings_test.js index 17e3969e..66bc44be 100644 --- a/test/specs/browser/settings_test.js +++ b/test/specs/browser/settings_test.js @@ -172,8 +172,8 @@ describe('browser/settings.html', function() { }); describe('Notifications', function() { - it('should appear on win32', function() { - const expected = (process.platform === 'win32'); + it('should appear on win32 and linux', function() { + const expected = (process.platform === 'win32' || process.platform === 'linux'); env.addClientCommands(this.app.client); return this.app.client .loadSettingsPage()