on xenial help sign in
Try to trigger action via notification object directly
e53e2a0Mirco Müller
Notifications/Notification.qml+4−4
@@ -16,7 +16,7 @@
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19−import NotificationsBackend 1.0
19+import Unity.Notifications 1.0
20
20
21UbuntuShape {
21UbuntuShape {
22 id: notification
22 id: notification
@@ -28,7 +28,7 @@ UbuntuShape {
28 property var actions
28 property var actions
29 property var notificationId
29 property var notificationId
30 property var type
30 property var type
31− property var notification
31+ property var notificationobj
32
32
33 signal actionInvoked(string buttonId)
33 signal actionInvoked(string buttonId)
34
34
@@ -47,7 +47,7 @@ UbuntuShape {
47 anchors.fill: contentColumn
47 anchors.fill: contentColumn
48 objectName: "interactiveArea"
48 objectName: "interactiveArea"
49 enabled: notification.type == Notification.Interactive
49 enabled: notification.type == Notification.Interactive
50− onClicked: notificationRenderer.model.triggerAction(notificationId, actionRepeater.model.actionId(0))
50+ onClicked: notification.notificationobj.invokeAction(actionRepeater.model.actionId(0))
51 }
51 }
52
52
53 Column {
53 Column {
@@ -153,7 +153,7 @@ UbuntuShape {
153 width: (buttonRow.width - buttonRow.spacing) / 2
153 width: (buttonRow.width - buttonRow.spacing) / 2
154 height: units.gu(4)
154 height: units.gu(4)
155 text: label
155 text: label
156− onClicked: notificationRenderer.model.triggerAction(notificationId, id)
156+ onClicked: notification.notificationobj.invokeAction(id)
157 }
157 }
158 }
158 }
159 }
159 }
Notifications/Notifications.qml+1−1
@@ -39,7 +39,7 @@ ListView {
39 body: model.body
39 body: model.body
40 actions: model.actions
40 actions: model.actions
41 notificationId: model.id
41 notificationId: model.id
42− notification: model.notification
42+ notificationobj: model.notificationobj
43 }
43 }
44
44
45 populate: Transition {
45 populate: Transition {
Shell.qml+1−1
@@ -28,7 +28,7 @@ import "Components/Math.js" as MathLocal
28import "Bottombar"
28import "Bottombar"
29import "SideStage"
29import "SideStage"
30import "Notifications"
30import "Notifications"
31−import NotificationsBackend 1.0
31+import Unity.Notifications 1.0
32
32
33FocusScope {
33FocusScope {
34 id: shell
34 id: shell