Commit 66b88738 authored by Scott Wheeler's avatar Scott Wheeler

Do a string compare rather than an int compare as with more than two systems

we aren't sure what ID a backend will have if some are available and others aren't.

svn path=/trunk/kdemultimedia/juk/; revision=377030
parent 7db0e9c7
......@@ -503,11 +503,16 @@ void PlayerManager::slotPollPlay()
m_noSeek = false;
}
void PlayerManager::slotSetOutput(int system)
void PlayerManager::slotSetOutput(const QString &system)
{
stop();
delete m_player;
m_player = createPlayer(system);
if(system == i18n("aRts"))
m_player = createPlayer(ArtsBackend);
else if(system == i18n("GStreamer"))
m_player = createPlayer(GStreamerBackend);
else if(system == i18n("aKode"))
m_player = createPlayer(AkodeBackend);
setup();
}
......@@ -599,7 +604,7 @@ void PlayerManager::setup()
if (mediaSystem == ArtsBackend) mediaSystem = GStreamerBackend;
#endif
m_player = createPlayer(mediaSystem);
connect(outputAction, SIGNAL(activated(int)), this, SLOT(slotSetOutput(int)));
connect(outputAction, SIGNAL(activated(const QString &)), this, SLOT(slotSetOutput(const QString &)));
}
else
m_player = createPlayer();
......
......@@ -91,7 +91,7 @@ private:
private slots:
void slotPollPlay();
void slotUpdateTime(int position);
void slotSetOutput(int system);
void slotSetOutput(const QString &);
void slotSetVolume(int volume);
private:
......
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