Commit 4657d06e authored by Michael Pyne's avatar Michael Pyne

Fix bug 84616 by disabling the tag editor pane and the Edit... context-menu...

Fix bug 84616 by disabling the tag editor pane and the Edit... context-menu option when only one file is selected, and it's read-only.

CCMAIL:84616-done@bugs.kde.org
CCMAIL:wheeler@kde.org

svn path=/trunk/kdemultimedia/juk/; revision=328163
parent 2f6b8f50
......@@ -1663,6 +1663,16 @@ void Playlist::slotShowRMBMenu(QListViewItem *item, const QPoint &point, int col
m_rmbMenu->setItemVisible(m_rmbEditID, showEdit);
// Disable edit menu if only one file is selected, and it's read-only
QFileInfo fi(static_cast<PlaylistItem*>(item)->file().absFilePath());
bool enableEdit = true;
if(!fi.isWritable() && selectedItems().count() == 1)
enableEdit = false;
m_rmbMenu->setItemEnabled(m_rmbEditID, enableEdit);
m_rmbMenu->popup(point);
m_currentColumn = column;
}
......
......@@ -163,6 +163,10 @@ void TagEditor::slotRefresh()
Tag *tag = item->file().tag();
QFileInfo fi(item->file().absFilePath());
if(!fi.isWritable() && m_items.count() == 1)
setEnabled(false);
m_artistNameBox->setEditText(tag->artist());
m_trackNameBox->setText(tag->title());
m_albumNameBox->setEditText(tag->album());
......
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