on xenial help sign in
make it a showNotification property and a respective onFooChanged handler
a6428e1Lukáš Tinkl
qml/Components/VolumeControl.qml+4−10
@@ -27,6 +27,10 @@ Item {
27 readonly property int stepDown: -1
27 readonly property int stepDown: -1
28
28
29 property var indicators // passed from Shell.qml
29 property var indicators // passed from Shell.qml
30+ readonly property bool showNotification: indicators && indicators.fullyOpened && indicators.currentIndicator === "indicator-sound"
31+ onShowNotificationChanged: { // disallow the volume notification when using the slider, lpbug#1484126
32+ actionGroup.indicatorsAction.updateState(root.showNotification);
33+ }
30
34
31 QDBusActionGroup {
35 QDBusActionGroup {
32 id: actionGroup
36 id: actionGroup
@@ -46,15 +50,5 @@ Item {
46 actionGroup.actionObject.activate(stepDown);
50 actionGroup.actionObject.activate(stepDown);
47 }
51 }
48
52
49− Connections {
50− target: indicators // disallow the volume notification when using the slider, lpbug#1484126
51− onFullyOpenedChanged: {
52− actionGroup.indicatorsAction.updateState(indicators.fullyOpened && indicators.currentIndicator === "indicator-sound");
53− }
54− onCurrentIndicatorChanged: {
55− actionGroup.indicatorsAction.updateState(indicators.fullyOpened && indicators.currentIndicator === "indicator-sound");
56− }
57− }
58−
59 Component.onCompleted: actionGroup.start()
53 Component.onCompleted: actionGroup.start()
60}
54}