on xenial help sign in
Don't show the volume notification when the sound indicator is shown Fixes: #1484126

Approved by: Michael Zanetti

commita2ecab08e53c22e03c9675922a8b091333abf2a3 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateMon 31 Aug 2015, 10:25 (11 years ago) parentf952f2ea6428e1
4 files changed+10
qml/Components/VolumeControl.qml+7 qml/Panel/IndicatorsBar.qml+1 qml/Panel/IndicatorsMenu.qml+1 qml/Shell.qml+1
qml/Components/VolumeControl.qml+7
@@ -26,6 +26,12 @@ Item {
2626 readonly property int stepUp: 1
2727 readonly property int stepDown: -1
2828
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+ }
34+
2935 QDBusActionGroup {
3036 id: actionGroup
3137 busType: 1
@@ -33,6 +39,7 @@ Item {
3339 objectPath: "/com/canonical/indicator/sound"
3440
3541 property variant actionObject: action("volume")
42+ property variant indicatorsAction: action("indicator-shown")
3643 }
3744
3845 function volumeUp() {
qml/Panel/IndicatorsBar.qml+1
@@ -28,6 +28,7 @@ Item {
2828 property alias overFlowWidth: row.overFlowWidth
2929 readonly property alias currentItemIndex: row.currentItemIndex
3030 property real lateralPosition: -1
31+ readonly property string currentIndicator: row.currentItem ? row.currentItem.identifier : ""
3132
3233 function selectItemAt(lateralPosition) {
3334 if (!expanded) {
qml/Panel/IndicatorsMenu.qml+1
@@ -27,6 +27,7 @@ Showable {
2727 property alias hideDragHandle: __hideDragHandle
2828 property alias overFlowWidth: bar.overFlowWidth
2929 property alias verticalVelocityThreshold: yVelocityCalculator.velocityThreshold
30+ property alias currentIndicator: bar.currentIndicator
3031 property int minimizedPanelHeight: units.gu(3)
3132 property int expandedPanelHeight: units.gu(7)
3233 property real openedHeight: units.gu(71)
qml/Shell.qml+1
@@ -169,6 +169,7 @@ Item {
169169
170170 VolumeControl {
171171 id: volumeControl
172+ indicators: panel.indicators
172173 }
173174
174175 DashCommunicator {