From 028d0ac7f8e2b66f9450efe89842a7e87a3c9be0 Mon Sep 17 00:00:00 2001 From: Jonas Schwabe Date: Tue, 12 Jul 2016 22:14:32 +0200 Subject: [PATCH 1/2] 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() From 6f5c907ca6ffce82b401e1153711942cb035c211 Mon Sep 17 00:00:00 2001 From: Jonas Schwabe Date: Sat, 23 Jul 2016 14:08:18 +0200 Subject: [PATCH 2/2] :memo: Add changelog entry for taskbar flashing on linux --- CHANGELOG.md | 5 +++++ src/main.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 660dc9a8..438e41db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ ### Improvements +#### Linux + - Added an option to make the taskbar icon flash on new messages + +### Improvements + ### Bug Fixes diff --git a/src/main.js b/src/main.js index fe4b8575..8780e0e7 100644 --- a/src/main.js +++ b/src/main.js @@ -261,7 +261,7 @@ app.on('ready', function() { mainWindow.focus(); }); ipcMain.on('notified', function(event, arg) { - if (process.platform === 'win32' || process.platform == 'linux') { + if (process.platform === 'win32' || process.platform === 'linux') { if (config.notifications.flashWindow === 2) { mainWindow.flashFrame(true); }