summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-06-18 20:34:41 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-06-18 20:35:22 (GMT)
commit9a457c621bd75a9929cc0616b7659dba2945fdac (patch)
treefa1b7e541355edb1983dea78728892ddf89f08ff /Swift/Controllers/SystemTrayController.cpp
parent38e83db22eed41e115c1483323a62c62be34dbec (diff)
downloadswift-9a457c621bd75a9929cc0616b7659dba2945fdac.zip
swift-9a457c621bd75a9929cc0616b7659dba2945fdac.tar.bz2
System Tray
We need to have a look at the icons somewhat, but these will do for the second.
Diffstat (limited to 'Swift/Controllers/SystemTrayController.cpp')
-rw-r--r--Swift/Controllers/SystemTrayController.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/Swift/Controllers/SystemTrayController.cpp b/Swift/Controllers/SystemTrayController.cpp
new file mode 100644
index 0000000..8caf79a
--- /dev/null
+++ b/Swift/Controllers/SystemTrayController.cpp
@@ -0,0 +1,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);
+}
+
+
+}