Add tray icon for linux (Ubuntu ambiance style for now).

This commit is contained in:
Jonas Schwabe
2016-05-07 22:21:07 +02:00
parent f5e31a7534
commit 5020031235
5 changed files with 26 additions and 1 deletions

View File

@@ -486,6 +486,21 @@ var showUnreadBadgeOSX = function(unreadCount, mentionCount) {
});
}
var showUnreadBadgeLinux = function(unreadCount, mentionCount) {
/*if (mentionCount > 0) {
remote.app.dock.setBadge(mentionCount.toString());
} else if (unreadCount > 0) {
remote.app.dock.setBadge('•');
} else {
remote.app.dock.setBadge('');
}*/
electron.ipcRenderer.send('update-unread', {
unreadCount: unreadCount,
mentionCount: mentionCount
});
}
var showUnreadBadge = function(unreadCount, mentionCount) {
switch (process.platform) {
case 'win32':
@@ -494,6 +509,10 @@ var showUnreadBadge = function(unreadCount, mentionCount) {
case 'darwin':
showUnreadBadgeOSX(unreadCount, mentionCount);
break;
case 'linux':
console.log(unreadCount);
showUnreadBadgeLinux(unreadCount, mentionCount);
break;
default:
}
}