summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-11-14 23:14:13 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-11-15 22:29:13 (GMT)
commit0f4fad3929097dca24d1ca92b06283811661e1f4 (patch)
treeeecdeb5928b01342b2824e83202571e7c465512c /Swift/Controllers/XMPPEvents
parent1c95b70465d43c26a99c362fa2e512edc5b2b68d (diff)
downloadswift-0f4fad3929097dca24d1ca92b06283811661e1f4.zip
swift-0f4fad3929097dca24d1ca92b06283811661e1f4.tar.bz2
Don't show unread events after signout.
Resolves: #685 Release-Notes: Signing out with unread events will no longer trap your system tray with unread messages.
Diffstat (limited to 'Swift/Controllers/XMPPEvents')
-rw-r--r--Swift/Controllers/XMPPEvents/EventController.cpp5
-rw-r--r--Swift/Controllers/XMPPEvents/EventController.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/Swift/Controllers/XMPPEvents/EventController.cpp b/Swift/Controllers/XMPPEvents/EventController.cpp
index f2fdcfe..8e31d30 100644
--- a/Swift/Controllers/XMPPEvents/EventController.cpp
+++ b/Swift/Controllers/XMPPEvents/EventController.cpp
@@ -47,4 +47,9 @@ void EventController::disconnectAll() {
onEventQueueEventAdded.disconnect_all_slots();
}
+void EventController::clear() {
+ events_.clear();
+ onEventQueueLengthChange(0);
+}
+
}
diff --git a/Swift/Controllers/XMPPEvents/EventController.h b/Swift/Controllers/XMPPEvents/EventController.h
index 1e0a069..827dce8 100644
--- a/Swift/Controllers/XMPPEvents/EventController.h
+++ b/Swift/Controllers/XMPPEvents/EventController.h
@@ -28,6 +28,7 @@ namespace Swift {
boost::signal<void (boost::shared_ptr<StanzaEvent>)> onEventQueueEventAdded;
const EventList& getEvents() const {return events_;}
void disconnectAll();
+ void clear();
private:
void handleEventConcluded(boost::shared_ptr<StanzaEvent> event);