Commit 00f2a39c authored by Michael Pyne's avatar Michael Pyne

Do not check to see if we're playing right after we issue the command. Phonon...

Do not check to see if we're playing right after we issue the command.  Phonon will let the program know
when it is playing.  Fixed in 4.0 branch.

svn path=/trunk/KDE/kdemultimedia/juk/; revision=809541
parent e2ff1af4
......@@ -251,22 +251,8 @@ void PlayerManager::play(const FileHandle &file)
}
}
// Make sure that the player() actually starts before doing anything.
if(!playing()) {
kWarning(65432) << "Unable to play " << file.absFilePath();
stop();
return;
}
action("pause")->setEnabled(true);
action("stop")->setEnabled(true);
action("forward")->setEnabled(true);
if(action<KToggleAction>("albumRandomPlay")->isChecked())
action("forwardAlbum")->setEnabled(true);
action("back")->setEnabled(true);
emit signalPlay();
// Our state changed handler will perform the follow up actions necessary
// once we actually start playing.
}
void PlayerManager::play(const QString &file)
......@@ -520,6 +506,16 @@ void PlayerManager::slotStateChanged(Phonon::State newstate)
emit signalStop();
}
else if(newstate == Phonon::PlayingState) {
action("pause")->setEnabled(true);
action("stop")->setEnabled(true);
action("forward")->setEnabled(true);
if(action<KToggleAction>("albumRandomPlay")->isChecked())
action("forwardAlbum")->setEnabled(true);
action("back")->setEnabled(true);
emit signalPlay();
}
}
void PlayerManager::slotKillSender()
......
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