on xenial help sign in
Don't show the volume notification when the sound indicator is shown Fixes: #1484126
a2ecab0Lukáš Tinkl
qml/Components/VolumeControl.qml+7
@@ -26,6 +26,12 @@ Item {
26 readonly property int stepUp: 1
26 readonly property int stepUp: 1
27 readonly property int stepDown: -1
27 readonly property int stepDown: -1
28
28
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+
29 QDBusActionGroup {
35 QDBusActionGroup {
30 id: actionGroup
36 id: actionGroup
31 busType: 1
37 busType: 1
@@ -33,6 +39,7 @@ Item {
33 objectPath: "/com/canonical/indicator/sound"
39 objectPath: "/com/canonical/indicator/sound"
34
40
35 property variant actionObject: action("volume")
41 property variant actionObject: action("volume")
42+ property variant indicatorsAction: action("indicator-shown")
36 }
43 }
37
44
38 function volumeUp() {
45 function volumeUp() {
qml/Panel/IndicatorsBar.qml+1
@@ -28,6 +28,7 @@ Item {
28 property alias overFlowWidth: row.overFlowWidth
28 property alias overFlowWidth: row.overFlowWidth
29 readonly property alias currentItemIndex: row.currentItemIndex
29 readonly property alias currentItemIndex: row.currentItemIndex
30 property real lateralPosition: -1
30 property real lateralPosition: -1
31+ readonly property string currentIndicator: row.currentItem ? row.currentItem.identifier : ""
31
32
32 function selectItemAt(lateralPosition) {
33 function selectItemAt(lateralPosition) {
33 if (!expanded) {
34 if (!expanded) {
qml/Panel/IndicatorsMenu.qml+1
@@ -27,6 +27,7 @@ Showable {
27 property alias hideDragHandle: __hideDragHandle
27 property alias hideDragHandle: __hideDragHandle
28 property alias overFlowWidth: bar.overFlowWidth
28 property alias overFlowWidth: bar.overFlowWidth
29 property alias verticalVelocityThreshold: yVelocityCalculator.velocityThreshold
29 property alias verticalVelocityThreshold: yVelocityCalculator.velocityThreshold
30+ property alias currentIndicator: bar.currentIndicator
30 property int minimizedPanelHeight: units.gu(3)
31 property int minimizedPanelHeight: units.gu(3)
31 property int expandedPanelHeight: units.gu(7)
32 property int expandedPanelHeight: units.gu(7)
32 property real openedHeight: units.gu(71)
33 property real openedHeight: units.gu(71)
qml/Shell.qml+1
@@ -169,6 +169,7 @@ Item {
169
169
170 VolumeControl {
170 VolumeControl {
171 id: volumeControl
171 id: volumeControl
172+ indicators: panel.indicators
172 }
173 }
173
174
174 DashCommunicator {
175 DashCommunicator {