blob: 0fdd4b500c750050dcabfc4d906d5dc7374cb728 (
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);
}
}
|