This commit is contained in:
Patrick von Reth 2014-01-19 14:00:54 +01:00
parent a54da391b8
commit 63e15d1358
3 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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"

View File

@ -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)