Add rudimentary keyboard navigation for previous/next buffer
[quassel.git] / src / qtui / phononnotificationbackend.cpp
index 27d7afe..1a106d4 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
-*   Copyright (C) 2005-08 by the Quassel Project                          *
+*   Copyright (C) 2005-09 by the Quassel Project                          *
 *   devel@quassel-irc.org                                                 *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
@@ -47,8 +47,8 @@ PhononNotificationBackend::~PhononNotificationBackend() {
 }
 
 void PhononNotificationBackend::notify(const Notification &notification) {
-  Q_UNUSED(notification)
-  if(_enabled && _media) {
+  if(_enabled && _media && (notification.type == Highlight || notification.type == PrivMsg)) {
+    _media->stop();
     _media->play();
   }
 }
@@ -89,6 +89,7 @@ PhononNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent)
   audioPreview(0)
 {
   ui.setupUi(this);
+  ui.enabled->setIcon(SmallIcon("media-playback-start"));
   ui.play->setIcon(SmallIcon("media-playback-start"));
   ui.open->setIcon(SmallIcon("document-open"));