diff --git a/src/core/notification/notification_p.cpp b/src/core/notification/notification_p.cpp index 855d267..56907ba 100644 --- a/src/core/notification/notification_p.cpp +++ b/src/core/notification/notification_p.cpp @@ -52,7 +52,7 @@ NotificationData::NotificationData (const Snore::Application &application, const NotificationData::~NotificationData() { notificationCount--; - qDebug() << "Deleting Notification: ActiveNotifications" << notificationCount << "id" << m_id; + qDebug() << "Deleting Notification: ActiveNotifications" << notificationCount << "id" << m_id << "Close Reason:" << m_closeReason; } diff --git a/src/core/plugins/snorebackend.cpp b/src/core/plugins/snorebackend.cpp index 416a9b2..c813dba 100644 --- a/src/core/plugins/snorebackend.cpp +++ b/src/core/plugins/snorebackend.cpp @@ -51,6 +51,7 @@ bool SnoreBackend::initialize( SnoreCore *snore ) { return false; } + connect( snore->d(), SIGNAL(applicationRegistered(const Snore::Application&)), this, SLOT(slotRegisterApplication(const Snore::Application&))); connect( snore->d(), SIGNAL(applicationDeregistered(const Snore::Application&)), this, SLOT(slotDeregisterApplication(const Snore::Application&))); @@ -147,6 +148,12 @@ bool SnoreBackend::deinitialize() { if(SnorePlugin::deinitialize()) { + foreach(Notification n,m_activeNotifications) + { + requestCloseNotification(n, NotificationEnums::CloseReasons::DISMISSED); + } + + foreach(const Application &a,snore()->aplications()) { slotDeregisterApplication(a); diff --git a/src/plugins/backends/snarl/snarl.cpp b/src/plugins/backends/snarl/snarl.cpp index 61c67d1..9462be5 100644 --- a/src/plugins/backends/snarl/snarl.cpp +++ b/src/plugins/backends/snarl/snarl.cpp @@ -243,7 +243,6 @@ void SnarlBackend::slotNotify(Notification notification){ snarlInterface->AddAction(id,a.name().toUtf8().constData(),QString("@").append(QString::number(a.id())).toUtf8().constData()); } m_idMap[notification.id()] = id; - qDebug() << "snarl" << id << notification.id(); startTimeout(notification.id(),notification.timeout()); } @@ -259,7 +258,6 @@ void SnarlBackend::slotNotify(Notification notification){ !notification.icon().isLocalFile()?notification.icon().imageData().toBase64().constData():0, priority); m_idMap[notification.id()] = m_idMap[notification.updateID()]; - qDebug() << "snarl update" << m_idMap[notification.updateID()] << notification.id(); startTimeout(notification.updateID(),notification.timeout()); } diff --git a/src/trayicon.cpp b/src/trayicon.cpp index ca53494..ebcd898 100644 --- a/src/trayicon.cpp +++ b/src/trayicon.cpp @@ -91,6 +91,6 @@ void TrayIcon::slotTestNotification() n.addAction(Action(1,"Test Action")); m_snore->broadcastNotification(n); m_snore->broadcastNotification(Notification(app, *app.alerts().begin(), "Hello World", "This is Snore, color test", Icon("http://jweatherwatch.googlecode.com/svn/trunk/iconset/04.png"))); - m_snore->deregisterApplication(app); +// m_snore->deregisterApplication(app); }