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 f36f2435 authored by Michael Pyne's avatar Michael Pyne

Cancel the now playing bar's filter if the now playing bar gets hidden. This will be

in KDE 4.4 (but not 4.4 beta 1)

I will also backport to 4.3.4.

CCBUG:112238

svn path=/trunk/KDE/kdemultimedia/juk/; revision=1054459
parent c0204770
......@@ -100,6 +100,7 @@ void NowPlaying::slotUpdate(const FileHandle &file)
m_file = file;
if(file.isNull()) {
hide();
emit nowPlayingHidden();
return;
}
else
......@@ -257,6 +258,11 @@ TrackItem::TrackItem(NowPlaying *parent) :
connect(m_label, SIGNAL(linkActivated(const QString &)), this,
SLOT(slotOpenLink(const QString &)));
// Ensure that if we're filtering results, that the filtering is cleared if we
// hide the now playing bar so that the user can select tracks normally.
connect(parent, SIGNAL(nowPlayingHidden()), SLOT(slotClearShowMore()));
}
void TrackItem::update(const FileHandle &file)
......@@ -313,6 +319,13 @@ void TrackItem::slotUpdate()
m_label->setFixedHeight(qMin(imageSize, m_label->heightForWidth(m_label->width())));
}
void TrackItem::slotClearShowMore()
{
PlaylistCollection *collection = NowPlayingItem::parent()->collection();
Q_ASSERT(collection);
collection->clearShowMore();
}
////////////////////////////////////////////////////////////////////////////////
// HistoryItem
////////////////////////////////////////////////////////////////////////////////
......
......@@ -49,6 +49,9 @@ public slots:
void slotUpdate(const FileHandle &file);
void slotReloadCurrentItem();
signals:
void nowPlayingHidden();
private:
struct Observer : public PlaylistObserver
{
......@@ -125,6 +128,7 @@ public:
private slots:
void slotOpenLink(const QString &link);
void slotUpdate();
void slotClearShowMore();
private:
FileHandle m_file;
......
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