diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-07-10 11:35:24 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-07-10 11:56:40 (GMT) |
commit | 8cd2cc3660a4af19ae74b7271571e7e2c3a3e35c (patch) | |
tree | 3d84f43aec462cd8c341d23dcd5852270f00c807 /Swift/Controllers | |
parent | 3911f30a92ae971aebdbf1d733b4261aafde4950 (diff) | |
download | swift-contrib-8cd2cc3660a4af19ae74b7271571e7e2c3a3e35c.zip swift-contrib-8cd2cc3660a4af19ae74b7271571e7e2c3a3e35c.tar.bz2 |
Don't include readable events (i.e. chat messages) in the Notices view
Release-Notes: The Notices tab will no longer record messages that're being shown in chat windows. Instead the Chats tab will keep track of conversations.
Diffstat (limited to 'Swift/Controllers')
-rw-r--r-- | Swift/Controllers/EventWindowController.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Swift/Controllers/EventWindowController.cpp b/Swift/Controllers/EventWindowController.cpp index fbe9a8a..47554ce 100644 --- a/Swift/Controllers/EventWindowController.cpp +++ b/Swift/Controllers/EventWindowController.cpp @@ -27,8 +27,11 @@ void EventWindowController::handleEventQueueEventAdded(boost::shared_ptr<StanzaE if (event->getConcluded()) { handleEventConcluded(event); } else { - event->onConclusion.connect(boost::bind(&EventWindowController::handleEventConcluded, this, event)); - window_->addEvent(event, true); + boost::shared_ptr<MessageEvent> message = boost::dynamic_pointer_cast<MessageEvent>(event); + if (!(message && message->isReadable())) { + event->onConclusion.connect(boost::bind(&EventWindowController::handleEventConcluded, this, event)); + window_->addEvent(event, true); + } } } |