fixes
This commit is contained in:
parent
a54da391b8
commit
63e15d1358
|
@ -229,7 +229,7 @@ void SnarlBackend::slotNotify(Notification notification){
|
|||
break;
|
||||
}
|
||||
|
||||
if(notification.updateID() == (uint)-1)
|
||||
if(notification.isUpdate())
|
||||
{
|
||||
ULONG32 id = snarlInterface->Notify(notification.alert().name().toUtf8().constData(),
|
||||
Snore::toPlainText(notification.title()).toUtf8().constData(),
|
||||
|
@ -250,7 +250,7 @@ void SnarlBackend::slotNotify(Notification notification){
|
|||
else
|
||||
{
|
||||
//update message
|
||||
snarlInterface->Update(m_idMap[notification.updateID()],
|
||||
snarlInterface->Update(m_idMap[notification.notificationToReplace().id()],
|
||||
notification.alert().name().toUtf8().constData(),
|
||||
Snore::toPlainText(notification.title()).toUtf8().constData(),
|
||||
Snore::toPlainText(notification.text()).toUtf8().constData(),
|
||||
|
@ -258,7 +258,7 @@ void SnarlBackend::slotNotify(Notification notification){
|
|||
notification.icon().isLocalFile()?notification.icon().localUrl().toUtf8().constData():0,
|
||||
!notification.icon().isLocalFile()?notification.icon().imageData().toBase64().constData():0,
|
||||
priority);
|
||||
m_idMap[notification.id()] = m_idMap[notification.updateID()];
|
||||
m_idMap[notification.id()] = m_idMap[notification.notificationToReplace().id()];
|
||||
startTimeout(notification);
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ void SnoreToast::slotNotify(Notification notification)
|
|||
arguements << "-t"
|
||||
<< Snore::toPlainText(notification.title())
|
||||
<< "-m"
|
||||
<< Snore::toPlainText(notification.text());
|
||||
<< Snore::toPlainText(notification.text()).replace("\n","\\n");
|
||||
if(notification.icon().isValid())
|
||||
{
|
||||
arguements << "-p"
|
||||
|
|
|
@ -129,7 +129,7 @@ uint FreedesktopFrontend::Notify(const QString &app_name, uint replaces_id,
|
|||
Notification noti(app, *app.alerts().begin(), summary, body, icon, timeout==-1?Notification::defaultTimeout():timeout/1000, priotity);
|
||||
if(replaces_id != 0)
|
||||
{
|
||||
noti.setUpdateID(replaces_id);
|
||||
noti.setNotificationToReplace(snore()->getActiveNotificationByID(replaces_id));
|
||||
}
|
||||
noti.data()->setSource(this);
|
||||
for(int i = 0;i < actions.length(); i+=2)
|
||||
|
|
Loading…
Reference in New Issue