summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/SystemTrayController.cpp')
-rw-r--r--Swift/Controllers/SystemTrayController.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/Swift/Controllers/SystemTrayController.cpp b/Swift/Controllers/SystemTrayController.cpp
index aa87537..8d4b2b7 100644
--- a/Swift/Controllers/SystemTrayController.cpp
+++ b/Swift/Controllers/SystemTrayController.cpp
@@ -1,42 +1,42 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
-#include "Swift/Controllers/SystemTrayController.h"
+#include <Swift/Controllers/SystemTrayController.h>
#include <boost/bind.hpp>
-#include "Swift/Controllers/XMPPEvents/EventController.h"
-#include "Swift/Controllers/SystemTray.h"
+#include <Swift/Controllers/SystemTray.h>
+#include <Swift/Controllers/XMPPEvents/EventController.h>
namespace Swift {
SystemTrayController::SystemTrayController(EventController* eventController, SystemTray* systemTray) {
- systemTray_ = systemTray;
- eventController_ = eventController;
- eventController_->onEventQueueLengthChange.connect(boost::bind(&SystemTrayController::handleEventQueueLengthChange, this, _1));
+ systemTray_ = systemTray;
+ eventController_ = eventController;
+ eventController_->onEventQueueLengthChange.connect(boost::bind(&SystemTrayController::handleEventQueueLengthChange, this, _1));
}
void SystemTrayController::handleEventQueueLengthChange(int /*length*/) {
- EventList events = eventController_->getEvents();
- bool found = false;
- for (EventList::iterator it = events.begin(); it != events.end(); ++it) {
- if (boost::dynamic_pointer_cast<MessageEvent>(*it)) {
- found = true;
- break;
- }
- }
- systemTray_->setUnreadMessages(found);
+ EventList events = eventController_->getEvents();
+ bool found = false;
+ for (auto& event : events) {
+ if (std::dynamic_pointer_cast<MessageEvent>(event)) {
+ found = true;
+ break;
+ }
+ }
+ systemTray_->setUnreadMessages(found);
}
void SystemTrayController::setMyStatusType(StatusShow::Type type) {
- systemTray_->setStatusType(type);
+ systemTray_->setStatusType(type);
}
void SystemTrayController::setConnecting() {
- systemTray_->setConnecting();
+ systemTray_->setConnecting();
}
}