Close notifications on other connected clients as well
[quassel.git] / src / qtui / qtui.cpp
index f3bb9a6..8844848 100644 (file)
@@ -62,6 +62,7 @@ QtUi::QtUi() : GraphicalUi() {
 
   connect(_mainWin, SIGNAL(connectToCore(const QVariantMap &)), this, SIGNAL(connectToCore(const QVariantMap &)));
   connect(_mainWin, SIGNAL(disconnectFromCore()), this, SIGNAL(disconnectFromCore()));
+  connect(Client::instance(), SIGNAL(bufferMarkedAsRead(BufferId)), SLOT(closeNotifications(BufferId)));
 }
 
 QtUi::~QtUi() {
@@ -200,3 +201,9 @@ void QtUi::notificationActivated(uint notificationId) {
 
   activateMainWidget();
 }
+
+void QtUi::bufferMarkedAsRead(BufferId bufferId) {
+  if(bufferId.isValid()) {
+    closeNotifications(bufferId);
+  }
+}