renamed CLOSE_RESON::CLOSED to ACTIVATED

This commit is contained in:
Patrick von Reth 2015-04-06 11:26:40 +02:00
parent 18e655f542
commit 3ba2f24ba2
8 changed files with 14 additions and 9 deletions

View File

@ -171,7 +171,7 @@ QDebug operator <<(QDebug debug, const Snore::Notification::CloseReasons &flags)
debugPrintEnum(Notification::NONE);
debugPrintEnum(Notification::TIMED_OUT);
debugPrintEnum(Notification::DISMISSED);
debugPrintEnum(Notification::CLOSED);
debugPrintEnum(Notification::ACTIVATED);
debugPrintEnum(Notification::REPLACED);
default:
debug << QByteArray::number(flags, 16) << ")";

View File

@ -62,9 +62,14 @@ public:
DISMISSED = 2,
/**
* The Notification was closed after an action was invoked.
* The Notification was activated, an action was invoked.
* @see actionInvoked()
*/
ACTIVATED = 3,
/**
* @deprecated same as ACTIVATED
*/
CLOSED = 3,
/**

View File

@ -122,7 +122,7 @@ void GrowlBackend::gntpCallback(growl_callback_data *data)
} else if (reason == "CLOSED") {
r = Notification::DISMISSED;
} else if (reason == "CLICK") {
r = Notification::CLOSED;
r = Notification::ACTIVATED;
SnoreCorePrivate::instance()->notificationActionInvoked(n);
}
s_instance->closeNotification(n, r);

View File

@ -67,10 +67,10 @@ public:
Notification::CloseReasons reason = Notification::NONE;
switch (action) {
case SnarlEnums::CallbackInvoked:
reason = Notification::CLOSED;
reason = Notification::ACTIVATED;
break;
case SnarlEnums::NotifyAction:
reason = Notification::CLOSED;
reason = Notification::ACTIVATED;
if (notification.isValid()) {
notification.data()->setActionInvoked(data);
SnoreCorePrivate::instance()->notificationActionInvoked(notification);

View File

@ -101,7 +101,7 @@ void SnoreNotifier::slotInvoked()
NotifyWidget *widget = qobject_cast<NotifyWidget *>(sender());
Notification notification = widget->notification();
SnoreCorePrivate::instance()->notificationActionInvoked(notification);
closeNotification(notification, Notification::CLOSED);
closeNotification(notification, Notification::ACTIVATED);
slotCloseNotification(notification);
}

View File

@ -111,7 +111,7 @@ void SnoreToast::slotToastNotificationClosed(int code, QProcess::ExitStatus)
switch (code) {
case 0:
reason = Notification::CLOSED;
reason = Notification::ACTIVATED;
SnoreCorePrivate::instance()->notificationActionInvoked(n);
break;
case 1:

View File

@ -93,7 +93,7 @@ void TrayIconNotifer::actionInvoked()
QSystemTrayIcon *icon = trayIcon(n.application());
if (icon && n.isValid()) {
SnoreCorePrivate::instance()->notificationActionInvoked(n);
closeNotification(n, Notification::CLOSED);
closeNotification(n, Notification::ACTIVATED);
m_currentlyDisplaying = false;
displayNotification(icon);
}

View File

@ -74,7 +74,7 @@ void SnarlNetworkFrontend::notificationClosed(Snore::Notification notification)
case Notification::TIMED_OUT:
callback(notification, "SNP/1.1/303/Notification timed out/");
break;
case Notification::CLOSED:
case Notification::ACTIVATED:
callback(notification, "SNP/1.1/307/Notification closed/");
break;
case Notification::DISMISSED: