Commit 387966d7 authored by Scott Wheeler's avatar Scott Wheeler

Take advantage of now having global access to the action collection and don't

mess with propagating these signals up several levels.

svn path=/trunk/kdemultimedia/juk/; revision=303114
parent 928f4d0f
......@@ -116,12 +116,6 @@ void JuK::setupLayout()
m_splitter = new PlaylistSplitter(this, "playlistSplitter");
setCentralWidget(m_splitter);
// playlist item activation connection
connect(m_splitter, SIGNAL(signalActivated()),
this, SLOT(slotPlayCurrent()));
connect(m_splitter, SIGNAL(signalListBoxDoubleClicked()),
this, SLOT(slotPlayCurrent()));
// create status bar
m_statusLabel = new StatusLabel(statusBar());
......@@ -605,16 +599,6 @@ void JuK::slotEditKeys()
KeyDialog::configure(m_accel, actions(), this);
}
////////////////////////////////////////////////////////////////////////////////
// additional player slots
////////////////////////////////////////////////////////////////////////////////
void JuK::slotPlayCurrent()
{
m_player->stop();
action("play")->activate();
}
void JuK::slotConfigureTagGuesser()
{
TagGuesserConfigDlg(this).exec();
......
......@@ -96,30 +96,20 @@ private:
const KShortcut &shortcut = KShortcut());
private slots:
/**
* Toggles the shown / hidden state of the main window.
*/
void slotShowHide();
void slotPlaylistChanged();
// file menu
void slotQuit();
// settings menu
void slotToggleSystemTray(bool enabled);
void slotEditKeys();
void slotConfigureTagGuesser();
void slotConfigureFileRenamer();
void slotPlayCurrent();
void slotGuessTagInfoFromFile();
void slotGuessTagInfoFromInternet();
private:
// layout objects
PlaylistSplitter *m_splitter;
StatusLabel *m_statusLabel;
SystemTray *m_systemTray;
......@@ -127,7 +117,6 @@ private:
typedef QPair<KAction *, const char *> SplitterConnection;
QValueList<SplitterConnection> m_splitterConnections;
// actions
SliderAction *m_sliderAction;
KToggleAction *m_showSearchAction;
KToggleAction *m_showEditorAction;
......
......@@ -506,7 +506,8 @@ void PlaylistBox::slotPlaylistChanged()
void PlaylistBox::slotDoubleClicked(QListViewItem *)
{
emit signalDoubleClicked();
action("stop")->activate();
action("play")->activate();
}
void PlaylistBox::slotShowContextMenu(QListViewItem *, const QPoint &point, int)
......
......@@ -523,8 +523,6 @@ void PlaylistSplitter::setupLayout()
connect(m_playlistBox, SIGNAL(signalCurrentChanged(const PlaylistList &)),
this, SLOT(slotChangePlaylist(const PlaylistList &)));
connect(m_playlistBox, SIGNAL(signalDoubleClicked()), this, SIGNAL(signalListBoxDoubleClicked()));
// Create the collection list; this should always exist. This has a
// slightly different creation process than normal playlists (since it in
// fact is a subclass) so it is created here rather than by using
......@@ -659,10 +657,10 @@ void PlaylistSplitter::setupPlaylist(Playlist *p, bool raise, const char *icon,
m_editor, SLOT(slotSetItems(const PlaylistItemList &)));
connect(p, SIGNAL(doubleClicked(QListViewItem *)),
this, SIGNAL(signalActivated()));
this, SLOT(slotPlayCurrent()));
connect(p, SIGNAL(returnPressed(QListViewItem *)),
this, SIGNAL(signalActivated()));
this, SLOT(slotPlayCurrent()));
connect(p, SIGNAL(signalCountChanged(Playlist *)),
this, SLOT(slotPlaylistCountChanged(Playlist *)));
......@@ -1031,6 +1029,12 @@ void PlaylistSplitter::slotCreateSearchList(const PlaylistSearch &search,
setupPlaylist(p, false, 0);
}
void PlaylistSplitter::slotPlayCurrent()
{
action("stop")->activate();
action("play")->activate();
}
void PlaylistSplitter::stop()
{
m_nextPlaylistItem = 0;
......
......@@ -221,8 +221,6 @@ public slots:
void slotDeletePlaylist();
signals:
void signalActivated();
void signalListBoxDoubleClicked();
void signalPlaylistChanged();
void signalSelectedPlaylistCountChanged(int);
void signalSelectedPlaylistTimeChanged(int);
......@@ -346,6 +344,8 @@ private slots:
void slotCreateSearchList(const PlaylistSearch &search, const QString &searchCategory,
const QString &name);
void slotPlayCurrent();
/**
* Since the player is handled at a higher level, this just clears the
* pointer to the currently playing item and updates the icon.
......
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