[Applet]Improvements for unavailable port.
ClosedPublic

Authored by gvgeo on Feb 15 2020, 10:55 AM.

Details

Summary

Restore capability of unavailable ports to be active, which was prevented
with 10ab204a62cf.
Enable port selection in case an unavailable port is active.

Test Plan

Before: Choosing an unavailable port from pavucontrol was impossible.
After: Activating an unavailable port is possible. Can test with D27422.

Diff Detail

Repository
R115 Plasma Audio Volume Applet
Branch
freeThePort (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22564
Build 22582: arc lint + arc unit
gvgeo created this revision.Feb 15 2020, 10:55 AM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 15 2020, 10:55 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
gvgeo requested review of this revision.Feb 15 2020, 10:55 AM
gvgeo edited the test plan for this revision. (Show Details)Feb 15 2020, 1:02 PM
ngraham accepted this revision.Feb 15 2020, 6:12 PM

That's a clever fix. Very nice how it solves the reporter's problem without changing the UI at all for everyone else who doesn't need it. No regressions found in testing.

What do you think; should we target 5.18.1 for this bugfix?

This revision is now accepted and ready to land.Feb 15 2020, 6:12 PM

Or has the code diverged between 5.18 and master too much?

pino added a subscriber: pino.Feb 15 2020, 6:20 PM
pino added inline comments.
applet/contents/ui/ListItemBase.qml
357

please avoid i18n puzzles, and use placeholders instead; for example

i18nc("Port is unavailable", "%1 (unavailable)", port_description);
359

ditto

gvgeo added a comment.Feb 16 2020, 8:23 AM

...it solves the reporter's problem...

Not exactly. When an available port gets selected(or is active) port option will disappear again. Only enables complete port selection while an unavailable is the default.

Or has the code diverged between 5.18 and master too much?

Yeah, too many patches. In master, you know, we changed the UI, limited the port selection... :D

applet/contents/ui/ListItemBase.qml
357

I wanted to do this change, but this is old code from 5.17. I believe that translated history must exist, and will automatically be used.

gvgeo edited the summary of this revision. (Show Details)Feb 16 2020, 8:25 AM
ngraham added inline comments.Feb 16 2020, 5:01 PM
applet/contents/ui/ListItemBase.qml
357

Better to change it now to avoid the string puzzle entirely IMO

gvgeo updated this revision to Diff 75817.Feb 17 2020, 11:01 AM

avoid i18n puzzles

gvgeo marked 4 inline comments as done.Feb 17 2020, 11:02 AM
ngraham accepted this revision.Feb 18 2020, 5:14 AM

LGTM. Plasma folks?

gvgeo added a comment.Feb 25 2020, 7:16 PM

Don't see anyone objecting, will commit later.

This revision was automatically updated to reflect the committed changes.