summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-03-19 17:49:50 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-03-19 17:49:50 (GMT)
commitcd1801ca176553c2c1727745228cdd2f076b62a5 (patch)
tree4804f34a5a2fbba70e7487022ddf198a5af95db4 /Swift/Controllers/EventWindowController.cpp
parent580d3d49ea3df7bb1c00cb1052203d17ccaa9a8e (diff)
downloadswift-cd1801ca176553c2c1727745228cdd2f076b62a5.zip
swift-cd1801ca176553c2c1727745228cdd2f076b62a5.tar.bz2
Don't show messages forever in the EventViewer.
Diffstat (limited to 'Swift/Controllers/EventWindowController.cpp')
-rw-r--r--Swift/Controllers/EventWindowController.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Swift/Controllers/EventWindowController.cpp b/Swift/Controllers/EventWindowController.cpp
index 4bc5c22..a6611fc 100644
--- a/Swift/Controllers/EventWindowController.cpp
+++ b/Swift/Controllers/EventWindowController.cpp
@@ -11,8 +11,18 @@ EventWindowController::EventWindowController(EventController* eventController, E
eventController_->onEventQueueEventAdded.connect(boost::bind(&EventWindowController::handleEventQueueEventAdded, this, _1));
}
+EventWindowController::~EventWindowController() {
+ delete window_;
+}
+
void EventWindowController::handleEventQueueEventAdded(boost::shared_ptr<Event> event) {
+ event->onConclusion.connect(boost::bind(&EventWindowController::handleEventConcluded, this, event));
window_->addEvent(event, true);
}
+void EventWindowController::handleEventConcluded(boost::shared_ptr<Event> event) {
+ window_->removeEvent(event);
+ window_->addEvent(event, false);
+}
+
}