on xenial help sign in
hide the volume notification when the indicator is shown
a0f1cb9Lukáš Tinkl
qml/Components/VolumeControl.qml+11
@@ -33,6 +33,7 @@ Item {
33 objectPath: "/com/canonical/indicator/sound"
33 objectPath: "/com/canonical/indicator/sound"
34
34
35 property variant actionObject: action("volume")
35 property variant actionObject: action("volume")
36+ property variant indicatorsAction: action("indicator-shown")
36 }
37 }
37
38
38 function volumeUp() {
39 function volumeUp() {
@@ -43,5 +44,15 @@ Item {
43 actionGroup.actionObject.activate(stepDown);
44 actionGroup.actionObject.activate(stepDown);
44 }
45 }
45
46
47+ Connections {
48+ target: panel.indicators
49+ onFullyOpenedChanged: { // disallow the volume notification when using the slider
50+ if (target.fullyOpened)
51+ actionGroup.indicatorsAction.updateState(true)
52+ else
53+ actionGroup.indicatorsAction.updateState(false)
54+ }
55+ }
56+
46 Component.onCompleted: actionGroup.start()
57 Component.onCompleted: actionGroup.start()
47}
58}