blob: 23a94fa221df29dab9e1f82d140964ebc32b3651 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/*
* Copyright (c) 2010 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#include "Swift/Controllers/SystemTrayController.h"
#include <boost/bind.hpp>
#include "Swift/Controllers/XMPPEvents/EventController.h"
#include "Swift/Controllers/SystemTray.h"
namespace Swift {
SystemTrayController::SystemTrayController(EventController* eventController, SystemTray* systemTray) {
systemTray_ = systemTray;
eventController_ = eventController;
eventController_->onEventQueueLengthChange.connect(boost::bind(&SystemTrayController::handleEventQueueLengthChange, this, _1));
}
void SystemTrayController::handleEventQueueLengthChange(int length) {
systemTray_->setUnreadMessages(length > 0);
}
void SystemTrayController::setMyStatusType(StatusShow::Type type) {
systemTray_->setStatusType(type);
}
}
|