Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 10009ea4 authored by Michael Pyne's avatar Michael Pyne

The change to PlaylistBox::currentPlaylist() to support keeping the playing...

The change to PlaylistBox::currentPlaylist() to support keeping the playing playlist in the status bar has caused too many problems, so revert that and add the support directly to StatusLabel.

Unfortunately it is a hack, but it has the virtue of working, and of fixing bug 90607.

svn path=/trunk/kdemultimedia/juk/; revision=351037
parent 80df4906
......@@ -221,9 +221,7 @@ Playlist *PlaylistBox::currentPlaylist() const
return m_dynamicPlaylist;
return Playlist::playingItem()->playlist();
else if(currentItem() && static_cast<Item *>(currentItem())->playlist())
if(currentItem() && static_cast<Item *>(currentItem())->playlist())
return static_cast<Item *>(currentItem())->playlist();
return PlaylistCollection::currentPlaylist();
......@@ -28,6 +28,8 @@
#include "playlistinterface.h"
#include "actioncollection.h"
#include "tag.h"
#include "playlist.h"
#include "playlistitem.h"
using namespace ActionCollection;
......@@ -99,10 +101,16 @@ StatusLabel::~StatusLabel()
void StatusLabel::updateCurrent()
kdDebug(65432) << k_funcinfo << endl;
//kdDebug(65432) << k_funcinfo << endl;
if(playlist()->playing()) {
FileHandle file = playlist()->currentFile();
// Use a hack to always show the currently playing playlist in the status
// bar. We can't change PlaylistBox::currentPlaylist() to do this as that
// has too many sideeffects at this point.
if(Playlist::playingItem()) {
PlaylistInterface *playlist = Playlist::playingItem()->playlist();
FileHandle file = playlist->currentFile();
QString mid = file.tag()->artist().isEmpty() || file.tag()->title().isEmpty()
? QString::null : QString(" - ");
......@@ -110,7 +118,7 @@ void StatusLabel::updateCurrent()
QString text = file.tag()->artist() + mid + file.tag()->title();
......@@ -118,7 +126,7 @@ void StatusLabel::updateCurrent()
void StatusLabel::updateData()
kdDebug(65432) << k_funcinfo << endl;
//kdDebug(65432) << k_funcinfo << endl;
if(!playlist()->playing()) {
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