Append '(Read Only)' to favourites if file is from HTTP server, or is not writable

This commit is contained in:
craig.p.drummond
2013-07-10 18:33:32 +00:00
parent 88c55f648f
commit c080471cf8
4 changed files with 13 additions and 24 deletions

View File

@@ -138,7 +138,11 @@ QVariant StreamSearchModel::data(const QModelIndex &index, int role) const
}
} else {
QVariant v;
v.setValue<QList<Action *> >(QList<Action *>() << StdActions::self()->replacePlayQueueAction << addToFavouritesAction);
if (StreamsModel::self()->isFavoritesWritable()) {
v.setValue<QList<Action *> >(QList<Action *>() << StdActions::self()->replacePlayQueueAction << addToFavouritesAction);
} else {
v.setValue<QList<Action *> >(QList<Action *>() << StdActions::self()->replacePlayQueueAction);
}
return v;
}
break;