Merge pull request #200 from jnugh/linuxUrgentHint

Urgent hint on linux
This commit is contained in:
Yuya Ochiai 2016-07-24 20:56:04 +09:00 committed by GitHub
commit ad1a1cb1b4
4 changed files with 12 additions and 4 deletions

View file

@ -4,6 +4,11 @@
### Improvements
#### Linux
- Added an option to make the taskbar icon flash on new messages
### Improvements
### Bug Fixes

View file

@ -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',

View file

@ -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()) {

View file

@ -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()