normalize urgency in freedesktop backend
This commit is contained in:
parent
b530d7771c
commit
c004504a9d
|
@ -61,9 +61,13 @@ void FreedesktopBackend::slotNotify(Notification noti)
|
||||||
hints["image_data"] = QVariant::fromValue(image);
|
hints["image_data"] = QVariant::fromValue(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (noti.priority() != Notification::NORMAL) {
|
char urgency = '1'
|
||||||
hints["urgency"] = (char)noti.priority() + 1;
|
if(noti.priority() < 0){
|
||||||
|
urgency = '0';
|
||||||
|
} else if(noti.priority() > 2) {
|
||||||
|
urgency = '2';
|
||||||
}
|
}
|
||||||
|
hints["urgency"] = urgency;
|
||||||
|
|
||||||
if (noti.application().constHints().contains("desktop-entry")) {
|
if (noti.application().constHints().contains("desktop-entry")) {
|
||||||
hints["desktop-entry"] = noti.application().constHints().value("desktop-entry");
|
hints["desktop-entry"] = noti.application().constHints().value("desktop-entry");
|
||||||
|
|
Loading…
Reference in New Issue