@@ -327,14 +327,83 @@ Item {
327327 }
328328
329329 ComboButton {
330+ id: localButton
331+
330332 width: parent.width
331− text: "Decline"
332− visible: notification.type == Notification.SnapDecision && actionRepeater.count > 2
333+ visible: notification.type == Notification.SnapDecision && actionRepeater.count > 4
333334 gradient: darkgreyGradient
334− onClicked: print ("Clicked on " + text)
335+ onClicked: notification.notification.invokeAction(localRepeater.itemAt(2).actionId)
335336 expanded: false
336− expandedHeight: (actionRepeater.count) * units.gu(5) + units.gu(.5)
337− comboList: ListView {
337+ expandedHeight: (localRepeater.count) * units.gu(5) + units.gu(.5)
338+ comboList: Column {
339+ Repeater {
340+ id: localRepeater
341+
342+ Component.onCompleted: {
343+ // an assignment is ok here, since this
344+ // label is static and does not change
345+ localButton.text = localRepeater.itemAt(2).actionLabel
346+ }
347+
348+ model: notification.actions
349+ delegate: Loader {
350+ property string actionId: id
351+ property string actionLabel: label
352+ Component {
353+ id: myEntry
354+
355+ MouseArea {
356+ id: localInputArea
357+
358+ x: localIcon.x
359+ y: localIcon.y
360+ width: localButton.width
361+ height: localIcon.height + units.gu(2)
362+
363+ onClicked: {
364+ notification.notification.invokeAction(actionId)
365+ }
366+
367+ ListItem.ThinDivider {
368+ visible: index > 3
369+ }
370+
371+ Icon {
372+ id: localIcon
373+
374+ anchors {
375+ left: parent.left
376+ leftMargin: units.gu(.5)
377+ top: parent.top
378+ topMargin: units.gu(1)
379+ bottom: parent.bottom
380+ bottomMargin: units.gu(1)
381+ }
382+ width: units.gu(2)
383+ height: units.gu(2)
384+ name: "messages"
385+ color: "white"
386+ }
387+
388+ Label {
389+ id: localLabel
390+
391+ anchors.left: localIcon.right
392+ anchors.leftMargin: units.gu(1)
393+ anchors.verticalCenter: localIcon.verticalCenter
394+ verticalAlignment: Text.AlignVCenter
395+ height: localIcon.height
396+ fontSize: "small"
397+ color: "white"
398+ text: actionLabel
399+ }
400+ }
401+ }
402+ sourceComponent: (index > 2) ? myEntry : undefined
403+ }
404+ }
405+ }
406+ /*ListView {
338407 id: myView
339408
340409 width: parent.width
@@ -392,8 +461,9 @@ Item {
392461 text: label
393462 }
394463 }
464+
395465 }
396− }
466+ }*/
397467 }
398468 }
399469 }