blob: 8caf79aec6e9931af05c8f314d38f3830e5c96d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "Swift/Controllers/SystemTrayController.h"
#include <boost/bind.hpp>
#include "Swift/Controllers/EventController.h"
#include "Swift/Controllers/SystemTray.h"
namespace Swift {
SystemTrayController::SystemTrayController(EventController* eventController, SystemTray* systemTray) {
eventController_ = eventController;
systemTray_ = systemTray;
eventController_->onEventQueueLengthChange.connect(boost::bind(&SystemTrayController::handleEventQueueLengthChange, this, _1));
}
void SystemTrayController::handleEventQueueLengthChange(int length) {
systemTray_->setUnreadMessages(length > 0 ? true : false);
}
}
|