Commit 7ff5a548 authored by Michael Pyne's avatar Michael Pyne
Browse files

Fun thing to do with JuK:

Pause playback.
Type in something into the search widget
Press enter to play the first matched song.

A song will play alright, but the playingFile will be thought to be null for some reason.  I've
tracked down that this is probably due to there being no selected item in the visible results
when enter is pressed, so I've made the search widget's returnPressed() signal manually play
the first listed match instead of relying on Playlist's returnPressed() signal to work.

svn path=/trunk/KDE/kdemultimedia/juk/; revision=855548
parent 8713819a
......@@ -205,6 +205,8 @@ void PlaylistSplitter::setupLayout()
m_playlistBox->object(), SLOT(slotCreateSearchPlaylist()));
connect(m_searchWidget, SIGNAL(signalShown(bool)),
m_playlistBox->object(), SLOT(slotSetSearchEnabled(bool)));
connect(m_searchWidget, SIGNAL(returnPressed()),
m_playlistBox->object(), SLOT(slotPlayFirst()));
connect(ActionCollection::action<KToggleAction>("showSearch"), SIGNAL(toggled(bool)),
m_searchWidget, SLOT(setEnabled(bool)));
......
......@@ -209,6 +209,7 @@ SearchWidget::SearchWidget(QWidget *parent)
connect(&m_searchLine, SIGNAL(signalQueryChanged()), this, SIGNAL(signalQueryChanged()));
connect(&m_searchLine, SIGNAL(signalDownPressed()), this, SIGNAL(signalDownPressed()));
connect(m_searchLine.m_lineEdit, SIGNAL(returnPressed()), this, SIGNAL(returnPressed()));
// I've decided that I think this is ugly, for now.
/*
......
......@@ -30,11 +30,14 @@ class QEvent;
class KComboBox;
class KLineEdit;
class SearchWidget;
class SearchLine : public QFrame
{
Q_OBJECT
friend class SearchWidget;
public:
enum Mode { Default = 0, CaseSensitive = 1, Pattern = 2 };
......@@ -88,6 +91,7 @@ public slots:
signals:
void signalQueryChanged();
void signalAdvancedSearchClicked();
void returnPressed();
// This signal is only emitted when the Show/Hide action is triggered.
// Minimizing/closing the JuK window will not trigger this signal.
......
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