bump © years
[quassel.git] / src / qtui / qtui.cpp
index f3bb9a6..f2b0ec9 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2010 by the Quassel Project                        *
+ *   Copyright (C) 2005-2012 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -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);
+  }
+}