From 964dacce521edb1ac6b3f392a2c30d0c55f4ef6f Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Thu, 16 Jan 2014 09:55:56 +0100 Subject: [PATCH] fixed tray icon --- .../backends/trayicon/trayiconnotifer.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/plugins/backends/trayicon/trayiconnotifer.cpp b/src/plugins/backends/trayicon/trayiconnotifer.cpp index d7a78a7..1fbf4b7 100644 --- a/src/plugins/backends/trayicon/trayiconnotifer.cpp +++ b/src/plugins/backends/trayicon/trayiconnotifer.cpp @@ -43,6 +43,7 @@ bool TrayIconNotifer::deinitialize() { disconnect(m_trayIcon,SIGNAL(messageClicked()),this,SLOT(actionInvoked())); m_trayIcon = NULL; + m_currentlyDisplaying = false; } return true; } @@ -52,16 +53,15 @@ bool TrayIconNotifer::deinitialize() void TrayIconNotifer::slotNotify( Notification notification ) { m_notificationQue.append(notification); - qDebug() << notification << m_currentlyDisplaying; - if(!m_currentlyDisplaying) - { - m_currentlyDisplaying = true; - displayNotification(); - } + displayNotification(); } void TrayIconNotifer::displayNotification() { + if(m_currentlyDisplaying) + { + return; + } if(m_notificationQue.isEmpty()) { m_currentlyDisplaying = false; @@ -80,19 +80,20 @@ void TrayIconNotifer::slotCloseNotificationByTimeout() if(n.isValid()) { closeNotification(n,NotificationEnums::CloseReasons::TIMED_OUT); + m_currentlyDisplaying = false; + displayNotification(); } - displayNotification(); } void TrayIconNotifer::actionInvoked() { - qDebug()<<"Traicon invoked"<d()->notificationActionInvoked(n); closeNotification(n,NotificationEnums::CloseReasons::CLOSED); + m_currentlyDisplaying = false; + displayNotification(); } }