Commit 5f3c032c authored by Michael Pyne's avatar Michael Pyne

Fix bug where if you were using the search widget, JuK would forget you had

enabled it if you minimized/closed the JuK window (or even put it on a
different virtual desktop).

svn path=/trunk/kdemultimedia/juk/; revision=334301
parent c2743b26
......@@ -115,7 +115,7 @@ void PlaylistSplitter::setupLayout()
connect(m_searchWidget, SIGNAL(signalShown(bool)),
m_playlistBox->object(), SLOT(slotSetSearchEnabled(bool)));
connect(action<KToggleAction>("showSearch"), SIGNAL(toggled(bool)),
m_searchWidget, SLOT(setShown(bool)));
m_searchWidget, SLOT(setEnabled(bool)));
topLayout->addWidget(m_searchWidget);
topLayout->addWidget(m_playlistStack);
......
......@@ -209,20 +209,10 @@ void SearchWidget::clear()
m_searchLine->clear();
}
////////////////////////////////////////////////////////////////////////////////
// SearchWidget protected methods
////////////////////////////////////////////////////////////////////////////////
void SearchWidget::showEvent(QShowEvent *e)
{
emit signalShown(true);
KToolBar::showEvent(e);
}
void SearchWidget::hideEvent(QHideEvent *e)
void SearchWidget::setEnabled(bool enable)
{
emit signalShown(false);
KToolBar::hideEvent(e);
emit signalShown(enable);
setShown(enable);
}
////////////////////////////////////////////////////////////////////////////////
......
......@@ -76,14 +76,15 @@ public:
public slots:
void clear();
protected:
virtual void showEvent(QShowEvent *e);
virtual void hideEvent(QHideEvent *e);
void setEnabled(bool enable);
signals:
void signalQueryChanged();
void signalAdvancedSearchClicked();
// This signal is only emitted when the Show/Hide action is triggered.
// Minimizing/closing the JuK window will not trigger this signal.
void signalShown(bool shown);
private:
......
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