Display artist and title of currently playing file in the window title.

FEATURE:

BUG:64895


svn path=/trunk/KDE/kdemultimedia/juk/; revision=1282111
parent 6d24776b
......@@ -47,6 +47,7 @@
#include "coverinfo.h"
#include "tag.h"
#include "scrobbler.h"
#include "juk.h"
using namespace ActionCollection;
......@@ -518,6 +519,9 @@ void PlayerManager::slotStateChanged(Phonon::State newstate, Phonon::State oldst
// song when one is playing now), since it didn't occur in the error handler. Just
// in case we really did abruptly stop, handle that case in a couple of seconds.
QTimer::singleShot(2000, this, SLOT(slotUpdateGuiIfStopped()));
JuK::JuKInstance()->setWindowTitle(i18n("JuK"));
emit signalStop();
}
else if(newstate == Phonon::PlayingState) {
......@@ -528,6 +532,13 @@ void PlayerManager::slotStateChanged(Phonon::State newstate, Phonon::State oldst
action("forwardAlbum")->setEnabled(true);
action("back")->setEnabled(true);
JuK::JuKInstance()->setWindowTitle(i18nc(
"%1 is the artist and %2 is the title of the currently playing track.",
"%1 - %2 :: JuK",
m_file.tag()->artist(),
m_file.tag()->title()));
emit signalPlay();
}
}
......
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