void SnorePlugin::Freedesktop::slotActionInvoked(const uint id, const QString &actionID) { qCDebug(SNORE) << id << m_dbusIdMap[id]; Snore::Notification noti = m_dbusIdMap[id]; if (!noti.isValid()) { return; } slotNotificationActionInvoked(noti, noti.actions().value(actionID.toInt()));; }
void SnorePlugin::Freedesktop::slotNotificationClosed(const uint id, const uint reason) { /* * * The reason the notification was closed. * * 1 - The notification expired. * * 2 - The notification was dismissed by the user. * * 3 - The notification was closed by a call to CloseNotification. * * 4 - Undefined/reserved reasons. */ Snore::Notification::CloseReasons closeReason; switch (reason) { case (1): closeReason = Snore::Notification::TimedOut; break; case (2): closeReason = Snore::Notification::Dismissed; break; case (3): closeReason = Snore::Notification::Closed; break; default: closeReason = Snore::Notification::None; } qCDebug(SNORE) << id << "|" << closeReason << reason; if (id == 0) { return; } Snore::Notification noti = m_dbusIdMap.take(id); if (noti.isValid()) { closeNotification(noti, closeReason); } }