[applets/taskmanager] Show PA-related features even when audio indicators are disabled
ClosedPublic

Authored by ngraham on Feb 26 2020, 7:55 PM.

Details

Summary

There is a checkbox in the Task Manager settings with the text "Mark applications that
play audio". Unchecking it does much more than no longer marking applications that play
audio though; it disables all PulseAudio-related features. This not only makes the label
inaccurate, but it also seems undesirable; a user could quite reasonably wish to disable
the audio indicators while still using PulseAudio-related functionality through the Task
Manager (e.g. muting an app from the context menu).

This patch makes the setting in question really and truly only show and hide the audio
indicator icon on the Task; other PA-related functionality is always loaded when
available.

Test Plan

Open an app or window that can play audio and start playing audio with it
Make sure that audio indicators are visible
Right-click on the task and see that there's Mute item (provided by PA
Configure the Task Manager and disable audio indicators
See that the audio indicator icon is gone from the task
Right-click on the task and see that the Mute item is still there
Configure the Task Manager again and re-enable audio indicators
See that the audio indicator icon re-appears on the task

BUG: 418164
FIXED-IN: 5.18.3

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Feb 26 2020, 7:55 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 26 2020, 7:55 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Feb 26 2020, 7:55 PM
ngraham edited the summary of this revision. (Show Details)Feb 26 2020, 7:56 PM
gvgeo added a subscriber: gvgeo.Feb 26 2020, 8:37 PM
gvgeo added inline comments.
applets/taskmanager/package/contents/ui/Task.qml
230

Better include hasAudioStream too, or will be active for all tasks, even if it is not visible.

ngraham updated this revision to Diff 76494.Feb 26 2020, 8:43 PM

Also check audioIndicatorsEnabled for safety

ngraham marked an inline comment as done.Feb 26 2020, 8:43 PM
ngraham updated this revision to Diff 76495.Feb 26 2020, 8:45 PM

Brain fart; do it right

gvgeo added inline comments.Feb 27 2020, 6:48 AM
applets/taskmanager/package/contents/ui/main.qml
46

I get a feeling there are 2 instances now.

hein accepted this revision.Feb 27 2020, 7:45 PM
hein added a subscriber: hein.

Good stuff.

This revision is now accepted and ready to land.Feb 27 2020, 7:45 PM
This revision was automatically updated to reflect the committed changes.