Changeset View
Changeset View
Standalone View
Standalone View
applet/contents/ui/DeviceListItem.qml
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 27 | ListItemBase { | |||
---|---|---|---|---|---|
57 | 57 | | |||
58 | onCurrentMutedChanged: { | 58 | onCurrentMutedChanged: { | ||
59 | if (type === "sink" && globalMute && !Muted) { | 59 | if (type === "sink" && globalMute && !Muted) { | ||
60 | plasmoid.configuration.globalMuteDevices = []; | 60 | plasmoid.configuration.globalMuteDevices = []; | ||
61 | plasmoid.configuration.globalMute = false; | 61 | plasmoid.configuration.globalMute = false; | ||
62 | globalMute = false; | 62 | globalMute = false; | ||
63 | } | 63 | } | ||
64 | } | 64 | } | ||
65 | | ||||
66 | // Prevent an unavailable port selection. UI allows selection of an unavailable port, until it gets refresh, | | |||
67 | // because there is no call from pulseaudio for availability change. | | |||
68 | onActivePortIndexChanged: { | | |||
69 | if (currentPort && currentPort.availability === Port.Unavailable) { | | |||
70 | for (var i = 0; i < Ports.length; i++) { | | |||
71 | if (Ports[i].availability === Port.Available) { | | |||
72 | ActivePortIndex = i; | | |||
73 | return | | |||
74 | } | | |||
75 | } | | |||
76 | } | | |||
77 | } | | |||
78 | } | 65 | } |