Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit c6239477 authored by Scott Wheeler's avatar Scott Wheeler

Clear the "now playing" text if we switch playlists.

BUG:98198

svn path=/trunk/kdemultimedia/juk/; revision=390465
parent 1cc25e99
......@@ -46,6 +46,7 @@ struct Line : public QFrame
NowPlaying::NowPlaying(QWidget *parent, PlaylistCollection *collection, const char *name) :
QHBox(parent, name),
m_observer(this, collection),
m_collection(collection)
{
layout()->setMargin(5);
......
......@@ -48,6 +48,17 @@ private slots:
void slotUpdate();
private:
struct Observer : public PlaylistObserver
{
Observer(NowPlaying *parent, PlaylistInterface *playlist) :
PlaylistObserver(playlist),
m_parent(parent) {}
virtual void updateCurrent() {}
virtual void updateData() { m_parent->slotUpdate(); }
NowPlaying *m_parent;
};
Observer m_observer;
PlaylistCollection *m_collection;
QValueList<NowPlayingItem *> m_items;
};
......
......@@ -572,6 +572,7 @@ void PlaylistCollection::raise(Playlist *playlist)
playlist->applySharedSettings();
playlist->setSearchEnabled(m_searchEnabled);
m_playlistStack->raiseWidget(playlist);
clearShowMore(false);
dataChanged();
}
......
......@@ -122,6 +122,9 @@ public:
void dirChanged(const QString &path);
/**
* Returns a pointer to the action handler.
*/
QObject *object() const;
void newItems(const KFileItemList &list) const;
......
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