Commit 69f43660 authored by Scott Wheeler's avatar Scott Wheeler

It looks less arbitrary like this. Use an enum rather than seemingly random

values.

svn path=/trunk/kdemultimedia/juk/; revision=359632
parent 68c9716f
......@@ -35,6 +35,8 @@ using namespace ActionCollection;
PlayerManager *PlayerManager::m_instance = 0;
enum Status { StatusStopped = -1, StatusPaused = 1, StatusPlaying = 2 };
////////////////////////////////////////////////////////////////////////////////
// helper functions
////////////////////////////////////////////////////////////////////////////////
......@@ -125,18 +127,14 @@ float PlayerManager::volume() const
int PlayerManager::status() const
{
// DCOP call to interface better with the Media Control applet
// Constant values provided by mETz.
// mETz: You can thank me later. :-)
if(!player())
return -1;
return StatusStopped;
if(player()->paused())
return 1;
return StatusPaused;
if(player()->playing())
return 2;
return StatusPlaying;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment