Indicate that a port is unavailable
ClosedPublic

Authored by drosca on Feb 28 2017, 9:33 AM.

Details

Summary

Show "portname (unavailable)" in port list if a port is not available.

BUG: 377193

Diff Detail

Repository
R115 Plasma Audio Volume Applet
Branch
kcm-unavailable-ports (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
drosca created this revision.Feb 28 2017, 9:33 AM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 28 2017, 9:33 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

Would it make sense to disable (in the ContextMenu) and/or filter out those ports instead? Or is this so you can configure it to play on headphones and once you plug them in it will work? Not sure about the "unavailable" prefix.

src/kcm/package/contents/ui/DeviceListItem.qml
84

You could also just use a JS Array for this since you're not making use of ListModel's binding capabilities (you always clear and re-populate the model)

91

Better cache port as variable:

var port = ports[i];
...
drosca updated this revision to Diff 11933.Feb 28 2017, 9:56 AM

Use same wording as pavucontrol - unavailable only for internal devices, unplugged otherwise

Would it make sense to disable (in the ContextMenu) and/or filter out those ports instead? Or is this so you can configure it to play on headphones and once you plug them in it will work?

I don't think we should filter/disable it, because if you plug it in, it will play from this port.

drosca edited the summary of this revision. (Show Details)Mar 4 2017, 8:32 AM
davidedmundson accepted this revision.May 2 2017, 11:16 AM
This revision is now accepted and ready to land.May 2 2017, 11:16 AM
This revision was automatically updated to reflect the committed changes.