[taskmanager applet] Fix MPRIS entries in context menu for CanPause==false

Authored by kossebau on Mar 4 2018, 12:32 AM.


Test Plan

Media player entries Start/Pause show matching state and trigger
expected actions both for VLC & MPRIS-patched Gwenview (CanPause=false).

Diff Detail

R119 Plasma Desktop
No Linters Available
No Unit Test Coverage
kossebau created this revision.Mar 4 2018, 12:32 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 4 2018, 12:32 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
kossebau requested review of this revision.Mar 4 2018, 12:32 AM
kossebau updated this revision to Diff 28610.Mar 4 2018, 5:02 PM

cache isPlayingCheck in bool, fix icon update of play/pause menu entry

kossebau updated this revision to Diff 28776.Mar 6 2018, 2:27 AM

push missed update without playpause

almost good


Do two separate vars

var playing = ...;
var menuItem =  ...;

In the media controller you do status == "playing" || status == "paused" whereas here you do status == "stopped"?

kossebau marked an inline comment as done.Mar 6 2018, 9:21 AM
kossebau added inline comments.

Yes, in the media controller the status is going for the applet qml state strings, given those are also used around. So there it is for consistency with rest of media controller code.

Here there is no QML state, so I used the mpris property state directly with shortest logic. Torn by two consistency attractors. Make a call, please :)

kossebau updated this revision to Diff 28799.Mar 6 2018, 9:24 AM

one var per variable

hein accepted this revision.Mar 6 2018, 10:24 AM
This revision is now accepted and ready to land.Mar 6 2018, 10:24 AM
kossebau edited the summary of this revision. (Show Details)Mar 6 2018, 10:38 AM
kossebau edited the test plan for this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.