Implement libunity launcher badge counter to be set via electron, fixes #4193
This commit is contained in:
parent
90ea0a365c
commit
b22ce93477
4 changed files with 41 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
|||
#include "atom/browser/window_list.h"
|
||||
#include "atom/common/atom_version.h"
|
||||
#include "brightray/common/application_info.h"
|
||||
#include "chrome/browser/ui/libgtk2ui/unity_service.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
|
@ -54,4 +55,17 @@ std::string Browser::GetExecutableFileProductName() const {
|
|||
return brightray::GetApplicationName();
|
||||
}
|
||||
|
||||
bool Browser::UnityLauncherAvailable() {
|
||||
return unity::IsRunning();
|
||||
}
|
||||
|
||||
void Browser::UnityLauncherSetBadgeCount(int count) {
|
||||
current_badge_count_ = count;
|
||||
unity::SetDownloadCount(count);
|
||||
}
|
||||
|
||||
int Browser::UnityLauncherGetBadgeCount() {
|
||||
return current_badge_count_;
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue