Only show available ports in port selection
AbandonedPublic

Authored by nicolasfella on Jun 27 2018, 8:55 PM.

Details

Reviewers
drosca
Summary

Unavailable ports are marked as unavailable, but can be selected nevertheless, which does not make
sense. This removes them from the combobox. If the availability is unknown they are left in because they
might be useful.

Test Plan

Works on my card where always excactly one port is available. (Un-)plugging the headphone shows the
appropriate port in the Combobox (if I remove the 'visible: portbox.count > 1' line).
I can't produce a setup where two ports are available at the same time, so switching ports via combobox is
untested.

Diff Detail

Repository
R115 Plasma Audio Volume Applet
Branch
portbox
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 394
Build 394: arc lint + arc unit
nicolasfella created this revision.Jun 27 2018, 8:55 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 27 2018, 8:55 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
nicolasfella requested review of this revision.Jun 27 2018, 8:55 PM

I don't think hiding it makes sense, indicating that it is unavailable/unplugged as pavucontrol does is enough.
User should see that pulse knows about those ports, but they are just not plugged so if user choose them, it won't play audio.

nicolasfella abandoned this revision.May 18 2020, 3:44 PM