From kde-commits Fri Feb 24 17:33:12 2012 From: Martin Tobias Holmedahl Sandsmark Date: Fri, 24 Feb 2012 17:33:12 +0000 To: kde-commits Subject: KDE/kdemultimedia/juk Message-Id: <20120224173312.1C075AC895 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=133010482209071 SVN commit 1282111 by sandsmark: Display artist and title of currently playing file in the window title. FEATURE: BUG:64895 M +11 -0 playermanager.cpp --- trunk/KDE/kdemultimedia/juk/playermanager.cpp #1282110:1282111 @@ -47,6 +47,7 @@ #include "coverinfo.h" #include "tag.h" #include "scrobbler.h" +#include "juk.h" using namespace ActionCollection; @@ -518,6 +519,9 @@ // 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 @@ 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(); } }