dbus-notifications-html-and-no-hints.patch
qtui/mainwin.cpp 2008-08-13 20:16:46.000000000 +1000 | ||
---|---|---|
620 | 620 |
QMap<QString, QVariant> hints; |
621 | 621 |
UiSettings uiSettings; |
622 | 622 | |
623 |
/* Commenting out the following: Don't send hints, let notify daemon decide |
|
623 | 624 |
hints["x"] = uiSettings.value("NotificationDesktopHintX", QVariant(0)).toInt(); // Standard hint: x location for the popup to show up |
624 | 625 |
hints["y"] = uiSettings.value("NotificationDesktopHintY", QVariant(0)).toInt(); // Standard hint: y location for the popup to show up |
625 | ||
626 |
*/ |
|
626 | 627 |
actions << "click" << "Click Me!"; |
627 | 628 | |
628 | 629 |
QDBusReply<uint> reply = desktopNotifications->Notify( |
... | ... | |
630 | 631 |
notificationId, // ID of previous notification to replace |
631 | 632 |
"", // Icon to display |
632 | 633 |
title, // Summary / Header of the message to display |
633 |
QString("%1: %2:\n%3").arg(QTime::currentTime().toString()).arg(title).arg(message), // Body of the message to display |
|
634 |
QString("%1: %2:\n%3").arg(QTime::currentTime().toString()).arg(title).arg(message).replace(QRegExp("&"),"&").replace( QRegExp("<"),"<").replace(QRegExp(">"),">"), // Body of the message to display
|
|
634 | 635 |
actions, // Actions from which the user may choose |
635 | 636 |
hints, // Hints to the server displaying the message |
636 | 637 |
uiSettings.value("NotificationDesktopTimeout", QVariant(5000)).toInt() // Timeout in milliseconds |