~neon/juk/master

« back to all changes in this revision

Viewing changes to playermanager.cpp

  • Committer: Michael Pyne
  • Date: 2018-03-06 02:54:34 UTC
  • Revision ID: git-v1:57457aee76ec28a3ed590ff559da60b353864ad6
mpris: Don't toggle playback with "Pause".

We already have a separate playPause action for this, both in the MPRIS2
DBus adaptor, and in PlayerManager.

This also fixes playback resuming when the computer is suspended (Plasma
sends the "Pause" command to each media player regardless of whether
it's playing, and JuK incorrectly treats that as a request to toggle
playback).

BUG:381271
FIXED-IN:18.04

Show diffs side-by-side

added added

removed removed

Lines of Context:
257
257
 
258
258
void PlayerManager::pause()
259
259
{
260
 
    if(!m_setup)
261
 
        return;
262
 
 
263
 
    if(paused()) {
264
 
        play();
265
 
        return;
266
 
    }
 
260
    if(!m_setup || paused())
 
261
        return;
267
262
 
268
263
    action("pause")->setEnabled(false);
269
264