Stop blinking of tray icon on first click
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 13 Apr 2010 20:01:52 +0000 (22:01 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 13 Apr 2010 20:07:47 +0000 (22:07 +0200)
Users have requested that the icon stop blinking after the first highlight has been
activated, even if there are more highlights pending.
If this change causes an uproar in the community, I think we'll make it an option...

src/qtui/knotificationbackend.cpp
src/qtui/systraynotificationbackend.cpp

index f189f9e..6cc25a6 100644 (file)
@@ -84,7 +84,7 @@ void KNotificationBackend::removeNotificationById(uint notificationId) {
 
 void KNotificationBackend::close(uint notificationId) {
   removeNotificationById(notificationId);
-  if(!_notifications.count())
+  //if(!_notifications.count()) // FIXME make configurable
     QtUi::mainWindow()->systemTray()->setAlert(false);
 }
 
index b6d1ff5..dade708 100644 (file)
@@ -79,7 +79,7 @@ void SystrayNotificationBackend::close(uint notificationId) {
 
   QtUi::mainWindow()->systemTray()->closeMessage(notificationId);
 
-  if(!_notifications.count())
+  //if(!_notifications.count()) //FIXME make configurable
     QtUi::mainWindow()->systemTray()->setAlert(false);
 
   updateToolTip();
@@ -87,7 +87,7 @@ void SystrayNotificationBackend::close(uint notificationId) {
 
 void SystrayNotificationBackend::notificationActivated(uint notificationId) {
   if(!_blockActivation) {
-    if(QtUi::mainWindow()->systemTray()->isAlerted()) {
+    if(_notifications.count()) {
       _blockActivation = true; // prevent double activation because both tray icon and bubble might send a signal
       if(!notificationId)
         notificationId = _notifications.count()? _notifications.last().notificationId : 0;