forked from blue/squawk
better notification sending, edited message now modifies notification (or sends), little structure change
This commit is contained in:
parent
18859cb960
commit
83cb220175
13 changed files with 31 additions and 16 deletions
|
@ -357,8 +357,9 @@ void Shared::Global::notify(const QString& account, const Shared::Message& msg)
|
|||
QString name = QString(instance->rosterModel->getContactName(account, msg.getPenPalJid()));
|
||||
QString path = QString(instance->rosterModel->getContactIconPath(account, msg.getPenPalJid(), msg.getPenPalResource()));
|
||||
QVariantList args;
|
||||
args << QString(QCoreApplication::applicationName());
|
||||
args << QVariant(QVariant::UInt); //TODO some normal id
|
||||
args << QString();
|
||||
|
||||
args << qHash(msg.getId());
|
||||
if (path.size() > 0) {
|
||||
args << path;
|
||||
} else {
|
||||
|
@ -378,8 +379,13 @@ void Shared::Global::notify(const QString& account, const Shared::Message& msg)
|
|||
|
||||
args << body;
|
||||
args << QStringList();
|
||||
args << QVariantMap();
|
||||
args << 3000;
|
||||
args << QVariantMap({
|
||||
{"desktop-entry", QString(QCoreApplication::applicationName())},
|
||||
{"category", QString("message")},
|
||||
// {"sound-file", "/path/to/macaw/squawk"},
|
||||
{"sound-name", QString("message-new-instant")}
|
||||
});
|
||||
args << -1;
|
||||
instance->dbus.callWithArgumentList(QDBus::AutoDetect, "Notify", args);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue