mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
plasma: notification applet warnings fix
requires 30ed152379f89649211ad4fcc349674d740dd60a from kdelibs Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
01eaf07e85
commit
391c0ef5f5
2 changed files with 18 additions and 13 deletions
|
@ -44,10 +44,9 @@ Column {
|
|||
return
|
||||
}
|
||||
var message = runningJobs[source]["label1"] ? runningJobs[source]["label1"] : runningJobs[source]["label0"]
|
||||
notifications.addNotification(
|
||||
notifications.addJobNotification(
|
||||
source,
|
||||
runningJobs[source]["appIconName"],
|
||||
0,
|
||||
runningJobs[source]["appName"],
|
||||
i18n("%1 [Finished]", runningJobs[source]["infoMessage"]),
|
||||
message,
|
||||
|
|
|
@ -51,17 +51,19 @@ Column {
|
|||
if (notificationsModel.count > 20) {
|
||||
notificationsModel.remove(notificationsModel.count-1)
|
||||
}
|
||||
var notification = {"source" : source,
|
||||
"appIcon" : appIcon,
|
||||
"image" : image,
|
||||
"appName" : appName,
|
||||
"summary" : summary,
|
||||
"body" : body,
|
||||
"expireTimeout": expireTimeout,
|
||||
"urgency" : urgency,
|
||||
"configurable": configurable,
|
||||
"appRealName": appRealName,
|
||||
"actions" : actions}
|
||||
var notification = {
|
||||
"source" : source,
|
||||
"appIcon" : appIcon,
|
||||
"image" : image,
|
||||
"appName" : appName,
|
||||
"summary" : summary,
|
||||
"body" : body,
|
||||
"expireTimeout": expireTimeout,
|
||||
"urgency" : urgency,
|
||||
"configurable": configurable,
|
||||
"appRealName": appRealName,
|
||||
"actions" : actions
|
||||
}
|
||||
notificationsModel.inserting = true;
|
||||
notificationsModel.insert(0, notification);
|
||||
notificationsModel.inserting = false;
|
||||
|
@ -74,6 +76,10 @@ Column {
|
|||
lastNotificationPopup.popup(notification)
|
||||
}
|
||||
|
||||
function addJobNotification(source, appIcon, appName, summary, body, expireTimeout, urgency, actions) {
|
||||
addNotification(source, appIcon, new QImage, appName, summary, body, expireTimeout, urgency, appName, false, actions)
|
||||
}
|
||||
|
||||
function executeAction(source, id) {
|
||||
//try to use the service
|
||||
if (source.indexOf("notification") !== -1) {
|
||||
|
|
Loading…
Add table
Reference in a new issue