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

Create a new virtual to decide if the edit search option should be shown for

a given Playlist subclass.  This makes it such that the tree view playlists
no longer have their searches editable.

svn path=/trunk/kdemultimedia/juk/; revision=354114
parent cc49b620
......@@ -289,6 +289,12 @@ public:
*/
virtual bool canReload() const { return !m_fileName.isNull(); }
/**
* Returns true if the playlist is a search playlist and the search should be
* editable.
*/
virtual bool searchIsEditable() const { return false; }
/**
* Playlists have a common set of shared settings such as visible columns
* that should be applied just before the playlist is shown. Calling this
......
......@@ -647,9 +647,8 @@ void PlaylistBox::slotPlaylistChanged()
if(m_k3bAction)
m_k3bAction->setEnabled(!playlists.isEmpty());
bool searchList = singlePlaylist && dynamic_cast<SearchPlaylist *>(playlists.front());
action("editSearch")->setEnabled(searchList);
action("editSearch")->setEnabled(singlePlaylist &&
playlists.front()->searchIsEditable());
if(singlePlaylist) {
playlists.front()->applySharedSettings();
......
......@@ -29,6 +29,7 @@ public:
PlaylistSearch playlistSearch() const { return m_search; }
void setPlaylistSearch(const PlaylistSearch &s, bool update = true);
virtual bool searchIsEditable() const { return true; }
protected:
/**
......
......@@ -31,6 +31,7 @@ public:
const QString &name = QString::null,
bool setupPlaylist = true);
virtual bool searchIsEditable() const { return false; }
void retag(const QStringList &files, Playlist *donorPlaylist);
signals:
......
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