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 f45bb729 authored by Scott Wheeler's avatar Scott Wheeler

Some (minor) cleanups to Antonio's commit.

CCMAIL:arrosa@kde.org

svn path=/trunk/kdemultimedia/juk/; revision=211964
parent 3b78eb3a
......@@ -254,7 +254,7 @@ void Playlist::setName(const QString &n)
// public slots
////////////////////////////////////////////////////////////////////////////////
void Playlist::playNext()
void Playlist::slotPlayNext()
{
if(m_splitter)
m_splitter->playSelectedFileNext();
......@@ -523,7 +523,8 @@ void Playlist::setup()
m_rmbMenu = new KPopupMenu(this);
m_rmbMenu->insertItem(SmallIcon("player_play"), i18n("Play Next"), this, SLOT(playNext()));
m_rmbMenu->insertItem(SmallIcon("player_play"), i18n("Play Next"), this, SLOT(slotPlayNext()));
m_rmbMenu->insertSeparator();
m_rmbMenu->insertItem(SmallIcon("editcut"), i18n("Cut"), this, SLOT(cut()));
m_rmbMenu->insertItem(SmallIcon("editcopy"), i18n("Copy"), this, SLOT(copy()));
m_rmbPasteID = m_rmbMenu->insertItem(SmallIcon("editpaste"), i18n("Paste"), this, SLOT(paste()));
......@@ -533,8 +534,6 @@ void Playlist::setup()
m_rmbMenu->insertItem(SmallIcon("editdelete"), i18n("Remove From Disk"), this, SLOT(slotDeleteSelectedItems()));
m_rmbMenu->insertSeparator();
m_rmbEditID = m_rmbMenu->insertItem(SmallIcon("edittool"), i18n("Edit"), this, SLOT(slotRenameTag()));
connect(this, SIGNAL(selectionChanged()),
......
......@@ -126,13 +126,17 @@ public slots:
* Remove the currently selected items from the playlist and disk.
*/
void slotDeleteSelectedItems() { deleteFromDisk(selectedItems()); };
virtual void slotPlayNext();
/*
* The edit slots are required to use the canonical names so that they are
* detected by the application wide framework.
*/
virtual void cut() { copy(); clear(); }
virtual void copy();
virtual void paste();
virtual void clear();
virtual void selectAll() { KListView::selectAll(true); }
virtual void playNext();
protected:
/**
......
......@@ -64,6 +64,7 @@ PlaylistSplitter::PlaylistSplitter(QWidget *parent, bool restore, const char *na
setupLayout();
readConfig();
connect(this, SIGNAL(signalDoubleClicked()), this, SLOT(slotClearNextItem()));
}
PlaylistSplitter::~PlaylistSplitter()
......@@ -169,10 +170,9 @@ QString PlaylistSplitter::playSelectedFileNext()
{
PlaylistItemList items = playlistSelection();
if(items.isEmpty())
{
m_nextPlaylistItem = 0L;
return QString::null;
if(items.isEmpty()) {
m_nextPlaylistItem = 0L;
return QString::null;
}
m_nextPlaylistItem = items.first();
......
......@@ -285,6 +285,7 @@ private slots:
void slotPlaylistItemRemoved(PlaylistItem *item);
void slotScanDirectories() { open(m_directoryList); }
void slotClearNextItem() { m_nextPlaylistItem = 0; }
private:
PlaylistItem *m_playingItem;
......
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