on xenial help sign in
On the PC platform (as opposed to running on $devices), use the "mute" action instead of silent mode
1951ac0Lukáš Tinkl
qml/Components/VolumeControl.qml+3−3
@@ -17,6 +17,7 @@
17import QtQuick 2.4
17import QtQuick 2.4
18import QMenuModel 0.1 as QMenuModel
18import QMenuModel 0.1 as QMenuModel
19import GlobalShortcut 1.0
19import GlobalShortcut 1.0
20+import Unity.Platform 1.0
20
21
21Item {
22Item {
22 id: root
23 id: root
@@ -27,8 +28,6 @@ Item {
27 readonly property int stepUp: 1
28 readonly property int stepUp: 1
28 readonly property int stepDown: -1
29 readonly property int stepDown: -1
29
30
30− property var indicators // passed from Shell.qml
31−
32 GlobalShortcut {
31 GlobalShortcut {
33 id: muteShortcut
32 id: muteShortcut
34 shortcut: Qt.Key_VolumeMute
33 shortcut: Qt.Key_VolumeMute
@@ -42,7 +41,8 @@ Item {
42 objectPath: "/com/canonical/indicator/sound"
41 objectPath: "/com/canonical/indicator/sound"
43
42
44 property variant actionObject: action("volume")
43 property variant actionObject: action("volume")
44+ // temporary workaround for lp:1623166
45− property variant muteActionObject: indicators.indicatorsModel.profile === "desktop" ? action("mute") : action("silent-mode")
45+ property variant muteActionObject: Platform.isPC ? action("mute") : action("silent-mode")
46 }
46 }
47
47
48 function volumeUp() {
48 function volumeUp() {
qml/Shell.qml−1
@@ -215,7 +215,6 @@ StyledItem {
215
215
216 VolumeControl {
216 VolumeControl {
217 id: volumeControl
217 id: volumeControl
218− indicators: panel.indicators
219 }
218 }
220
219
221 DashCommunicator {
220 DashCommunicator {