on xenial help sign in
Try to trigger action via notification object directly
commite53e2a0e54b3fd441e886271f42ab83a1fed6620 authorMirco Müller <mirco.mueller@canonical.com> dateWed 12 Jun 2013, 17:29 (13 years ago) parente9ea2e4
3 files changed+6−6
Notifications/Notification.qml+4−4 Notifications/Notifications.qml+1−1 Shell.qml+1−1
Notifications/Notification.qml+4−4
@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
19−import NotificationsBackend 1.0
19+import Unity.Notifications 1.0
2020
2121UbuntuShape {
2222 id: notification
@@ -28,7 +28,7 @@ UbuntuShape {
2828 property var actions
2929 property var notificationId
3030 property var type
31− property var notification
31+ property var notificationobj
3232
3333 signal actionInvoked(string buttonId)
3434
@@ -47,7 +47,7 @@ UbuntuShape {
4747 anchors.fill: contentColumn
4848 objectName: "interactiveArea"
4949 enabled: notification.type == Notification.Interactive
50− onClicked: notificationRenderer.model.triggerAction(notificationId, actionRepeater.model.actionId(0))
50+ onClicked: notification.notificationobj.invokeAction(actionRepeater.model.actionId(0))
5151 }
5252
5353 Column {
@@ -153,7 +153,7 @@ UbuntuShape {
153153 width: (buttonRow.width - buttonRow.spacing) / 2
154154 height: units.gu(4)
155155 text: label
156− onClicked: notificationRenderer.model.triggerAction(notificationId, id)
156+ onClicked: notification.notificationobj.invokeAction(id)
157157 }
158158 }
159159 }
Notifications/Notifications.qml+1−1
@@ -39,7 +39,7 @@ ListView {
3939 body: model.body
4040 actions: model.actions
4141 notificationId: model.id
42− notification: model.notification
42+ notificationobj: model.notificationobj
4343 }
4444
4545 populate: Transition {
Shell.qml+1−1
@@ -28,7 +28,7 @@ import "Components/Math.js" as MathLocal
2828import "Bottombar"
2929import "SideStage"
3030import "Notifications"
31−import NotificationsBackend 1.0
31+import Unity.Notifications 1.0
3232
3333FocusScope {
3434 id: shell