Introducing: Audio Notifications!
[quassel.git] / src / qtui / mainwin.cpp
index 0468152..32b9834 100644 (file)
@@ -56,6 +56,9 @@
 #ifdef HAVE_DBUS
 #  include "desktopnotificationbackend.h"
 #endif
+#ifdef HAVE_PHONON
+#  include "phononnotificationbackend.h"
+#endif
 #include "systraynotificationbackend.h"
 #include "taskbarnotificationbackend.h"
 
@@ -95,6 +98,9 @@ MainWin::MainWin(QWidget *parent)
 
   QtUi::registerNotificationBackend(new TaskbarNotificationBackend(this));
   QtUi::registerNotificationBackend(new SystrayNotificationBackend(this));
+#ifdef HAVE_PHONON
+  QtUi::registerNotificationBackend(new PhononNotificationBackend(this));
+#endif
 #ifdef HAVE_DBUS
   QtUi::registerNotificationBackend(new DesktopNotificationBackend(this));
 #endif
@@ -114,6 +120,7 @@ void MainWin::init() {
   connect(QApplication::instance(), SIGNAL(aboutToQuit()), SLOT(saveLayout()));
   connect(Client::instance(), SIGNAL(networkCreated(NetworkId)), SLOT(clientNetworkCreated(NetworkId)));
   connect(Client::instance(), SIGNAL(networkRemoved(NetworkId)), SLOT(clientNetworkRemoved(NetworkId)));
+  connect(Client::mainUi()->actionProvider(), SIGNAL(showChannelList(NetworkId)), SLOT(showChannelList(NetworkId)));
 
   // Setup Dock Areas
   setDockNestingEnabled(true);
@@ -271,8 +278,6 @@ void MainWin::addBufferView(BufferViewConfig *config) {
   view->setFilteredModel(Client::bufferModel(), config);
   view->show();
 
-  connect(&view->showChannelList, SIGNAL(triggered()), this, SLOT(showChannelList()));
-
   Client::bufferModel()->synchronizeView(view);
 
   dock->setWidget(view);
@@ -482,7 +487,7 @@ void MainWin::connectedToCore() {
   connect(Client::bufferViewManager(), SIGNAL(bufferViewConfigAdded(int)), this, SLOT(addBufferView(int)));
   connect(Client::bufferViewManager(), SIGNAL(bufferViewConfigDeleted(int)), this, SLOT(removeBufferView(int)));
   connect(Client::bufferViewManager(), SIGNAL(initDone()), this, SLOT(loadLayout()));
-  
+
   setConnectedState();
 }