Skip to content

Commit

Permalink
MythMusic: Remove some code left over from the old UI. Fixes #10415.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Harrison committed Mar 7, 2012
1 parent e9e021a commit a8131eb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
31 changes: 0 additions & 31 deletions mythplugins/mythmusic/mythmusic/musiccommon.cpp
Expand Up @@ -46,7 +46,6 @@ MusicCommon::MusicCommon(MythScreenStack *parent, const QString &name)
: MythScreenType(parent, name)
{
m_mainvisual = NULL;
m_visualModeTimer = NULL;
m_moveTrackMode = false;
m_movingTrack = false;
m_currentTime = 0;
Expand All @@ -72,12 +71,6 @@ MusicCommon::~MusicCommon(void)
{
gPlayer->removeListener(this);

if (m_visualModeTimer)
{
delete m_visualModeTimer;
m_visualModeTimer = NULL;
}

if (m_mainvisual)
{
stopVisualizer();
Expand Down Expand Up @@ -218,18 +211,6 @@ bool MusicCommon::CreateCommon(void)
m_currentVisual = 0;
}

QString visual_delay = gCoreContext->GetSetting("VisualModeDelay");
bool delayOK;
m_visualModeDelay = visual_delay.toInt(&delayOK);
if (!delayOK)
m_visualModeDelay = 0;
if (m_visualModeDelay > 0)
{
m_visualModeTimer = new QTimer(this);
m_visualModeTimer->start(m_visualModeDelay * 1000);
connect(m_visualModeTimer, SIGNAL(timeout()), this, SLOT(visEnable()));
}

switchVisualizer(m_currentVisual);

if (gPlayer->isPlaying())
Expand Down Expand Up @@ -473,8 +454,6 @@ bool MusicCommon::keyPressEvent(QKeyEvent *e)
{
bool handled = false;

resetVisualiserTimer();

QStringList actions;
handled = GetMythMainWindow()->TranslateKeyPress("Music", e, actions, true);

Expand Down Expand Up @@ -814,14 +793,6 @@ void MusicCommon::showSpeed(bool show)
#endif
}


void MusicCommon::resetVisualiserTimer()
{
//FIXME do we still need the timer?
if (m_visualModeDelay > 0 && m_visualModeTimer)
m_visualModeTimer->start(m_visualModeDelay * 1000);
}

void MusicCommon::switchVisualizer(const QString &visual)
{
switchVisualizer(m_visualModes.indexOf(visual));
Expand All @@ -837,8 +808,6 @@ void MusicCommon::switchVisualizer(int visual)

m_currentVisual = visual;

resetVisualiserTimer();

m_mainvisual->setVisual(m_visualModes[m_currentVisual]);

if (m_visualText)
Expand Down
3 changes: 0 additions & 3 deletions mythplugins/mythmusic/mythmusic/musiccommon.h
Expand Up @@ -130,7 +130,6 @@ class MPUBLIC MusicCommon : public MythScreenType
void cycleVisualizer(void);
void switchVisualizer(const QString &visual);
void switchVisualizer(int visual);
void resetVisualiserTimer(void);

void playFirstTrack();
bool restorePosition(int trackID);
Expand All @@ -145,8 +144,6 @@ class MPUBLIC MusicCommon : public MythScreenType

QStringList m_visualModes;
unsigned int m_currentVisual;
int m_visualModeDelay;
QTimer *m_visualModeTimer;

bool m_moveTrackMode;
bool m_movingTrack;
Expand Down

0 comments on commit a8131eb

Please sign in to comment.