on xenial help sign in
Added the frontend part for the sound-hint support.
e04a2ffMirco Müller
qml/Notifications/Notification.qml+12
@@ -15,6 +15,7 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18+import QtMultimedia 5.0
18import Ubuntu.Components 0.1
19import Ubuntu.Components 0.1
19import Unity.Notifications 1.0
20import Unity.Notifications 1.0
20import QMenuModel 0.1
21import QMenuModel 0.1
@@ -66,6 +67,17 @@ Item {
66 return result;
67 return result;
67 }
68 }
68
69
70+ Audio {
71+ id: sound
72+ source: hints["sound-file"]
73+ }
74+
75+ Component.onCompleted: {
76+ if (hints["suppress-sound"] != "true") {
77+ sound.play ()
78+ }
79+ }
80+
69 Behavior on height {
81 Behavior on height {
70 id: normalHeightBehavior
82 id: normalHeightBehavior
71
83