@@ -27,11 +27,14 @@ import Unity.Notifications 1.0
27import QtMultimedia 5.0
27import QtMultimedia 5.0
30 width: notificationsRect.width + interactiveControls.width
32 width: notificationsRect.width + interactiveControls.width
31 height: notificationsRect.height
33 height: notificationsRect.height
33 property list<Notification> mockList: [
35 property list<Notification> mockList: [
34 Notification {
36 Notification {
36 type: Notification.PlaceHolder
39 type: Notification.PlaceHolder
37 summary: ""
40 summary: ""
@@ -39,8 +42,12 @@ Item {
40 secondaryIcon: ""
43 secondaryIcon: ""
41 rawActions: ["reply_id", "Dummy"]
44 rawActions: ["reply_id", "Dummy"]
45+ Component.onCompleted: {
46+ n0.completed.connect(mockModel.remove)
43 Notification {
49 Notification {
45 type: Notification.SnapDecision
52 type: Notification.SnapDecision
46 hints: {"x-canonical-private-affirmative-tint": "true"}
53 hints: {"x-canonical-private-affirmative-tint": "true"}
@@ -51,8 +58,12 @@ Item {
51 rawActions: ["ok_id", "Ok",
58 rawActions: ["ok_id", "Ok",
52 "snooze_id", "Snooze",
59 "snooze_id", "Snooze",
53 "view_id", "View"]
60 "view_id", "View"]
61+ Component.onCompleted: {
62+ n1.completed.connect(mockModel.remove)
55 Notification {
65 Notification {
57 type: Notification.Ephemeral
68 type: Notification.Ephemeral
58 summary: "Cole Raby"
69 summary: "Cole Raby"
@@ -60,8 +71,12 @@ Item {
60 icon: "../graphics/avatars/amanda.png"
71 icon: "../graphics/avatars/amanda.png"
61 secondaryIcon: "../graphics/applicationIcons/facebook.png"
72 secondaryIcon: "../graphics/applicationIcons/facebook.png"
62 rawActions: ["reply_id", "Dummy"]
73 rawActions: ["reply_id", "Dummy"]
74+ Component.onCompleted: {
75+ n2.completed.connect(mockModel.remove)
64 Notification {
78 Notification {
66 type: Notification.Ephemeral
81 type: Notification.Ephemeral
67 hints: {"x-canonical-non-shaped-icon": "true"}
82 hints: {"x-canonical-non-shaped-icon": "true"}
@@ -70,8 +85,12 @@ Item {
70 icon: "../graphics/applicationIcons/contacts-app.png"
85 icon: "../graphics/applicationIcons/contacts-app.png"
71 secondaryIcon: ""
86 secondaryIcon: ""
72 rawActions: ["reply_id", "Dummy"]
87 rawActions: ["reply_id", "Dummy"]
88+ Component.onCompleted: {
89+ n3.completed.connect(mockModel.remove)
74 Notification {
92 Notification {
76 type: Notification.Ephemeral
95 type: Notification.Ephemeral
77 hints: {"x-canonical-non-shaped-icon": "false"}
96 hints: {"x-canonical-non-shaped-icon": "false"}
@@ -80,8 +99,12 @@ Item {
80 icon: "../graphics/applicationIcons/facebook.png"
99 icon: "../graphics/applicationIcons/facebook.png"
81 secondaryIcon: ""
100 secondaryIcon: ""
82 rawActions: ["reply_id", "Dummy"]
101 rawActions: ["reply_id", "Dummy"]
102+ Component.onCompleted: {
103+ n4.completed.connect(mockModel.remove)
84 Notification {
106 Notification {
86 type: Notification.Interactive
109 type: Notification.Interactive
87 summary: "Interactive notification"
110 summary: "Interactive notification"
@@ -89,8 +112,12 @@ Item {
89 icon: "../graphics/avatars/anna_olsson.png"
112 icon: "../graphics/avatars/anna_olsson.png"
90 secondaryIcon: ""
113 secondaryIcon: ""
91 rawActions: ["reply_id", "Dummy"]
114 rawActions: ["reply_id", "Dummy"]
115+ Component.onCompleted: {
116+ n5.completed.connect(mockModel.remove)
93 Notification {
119 Notification {
95 type: Notification.Confirmation
122 type: Notification.Confirmation
96 hints: {"x-canonical-non-shaped-icon": "true"}
123 hints: {"x-canonical-non-shaped-icon": "true"}
@@ -100,8 +127,12 @@ Item {
100 secondaryIcon: ""
127 secondaryIcon: ""
101 value: 50
128 value: 50
102 rawActions: ["reply_id", "Dummy"]
129 rawActions: ["reply_id", "Dummy"]
130+ Component.onCompleted: {
131+ n6.completed.connect(mockModel.remove)
104 Notification {
134 Notification {
106 type: Notification.Confirmation
137 type: Notification.Confirmation
107 hints: {"x-canonical-non-shaped-icon": "true",
138 hints: {"x-canonical-non-shaped-icon": "true",
@@ -112,6 +143,9 @@ Item {
112 secondaryIcon: ""
143 secondaryIcon: ""
113 value: 85
144 value: 85
114 rawActions: ["reply_id", "Dummy"]
145 rawActions: ["reply_id", "Dummy"]
146+ Component.onCompleted: {
147+ n7.completed.connect(mockModel.remove)
@@ -159,13 +193,13 @@ Item {
160 function clearNotifications() {
194 function clearNotifications() {
161 while(mockModel.count > 1) {
195 while(mockModel.count > 1) {
162− remove1stNotification()
196+ //remove1stNotification()
166 function remove1stNotification() {
200 function remove1stNotification() {
167 if (mockModel.count > 1) {
201 if (mockModel.count > 1) {
168− mockModel.remove(1)
202+ //mockModel.remove(1)