Commit 24745100 by pvuorela

Merge branch 'cancel_notification' into 'master'

[transfer-engine] Fix canceled download keeping progress notification. Fixes JB#41489

See merge request !6
parents ff6c5eb6 e1efa031
Name: nemo-transferengine-qt5
Version: 0.1.6
Version: 0.3.1
Release: 0
Summary: Transfer Engine for uploading media content and tracking transfers.
Group: System Environment/Daemon
......
......@@ -335,7 +335,7 @@ void TransferEnginePrivate::sendNotification(TransferEngineData::TransferType ty
bool useProgress = false;
Notification::Urgency urgency = Notification::Normal;
QString appIcon = QStringLiteral("icon-lock-information");
QString icon = QStringLiteral("x-nemo-icon=icon-lock-transfer");
QString icon = QStringLiteral("icon-lock-transfer");
// TODO: explicit grouping of transfer notifications is now removed, as grouping
// will now be performed by lipstick. We may need to reinstate group summary
......@@ -383,6 +383,7 @@ void TransferEnginePrivate::sendNotification(TransferEngineData::TransferType ty
} else if (status == TransferEngineData::TransferInterrupted) {
urgency = Notification::Critical;
appIcon = QStringLiteral("icon-lock-information");
category = TRANSFER_ERROR_EVENT_CATEGORY;
icon.clear();
switch (type) {
......@@ -466,6 +467,10 @@ void TransferEnginePrivate::sendNotification(TransferEngineData::TransferType ty
notification.setPreviewBody(previewBody);
notification.setUrgency(urgency);
if (!icon.isEmpty()) {
notification.setIcon(icon);
}
if (useProgress) {
notification.setHintValue(TRANSFER_PROGRESS_HINT, static_cast<double>(progress));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment