disable some more stuff in the cover manager's window if there are no active cover providers
This commit is contained in:
parent
fdda938c53
commit
10fbbca82f
@ -98,6 +98,8 @@ AlbumCoverManager::AlbumCoverManager(LibraryBackend* backend, QWidget* parent,
|
||||
|
||||
QShortcut* close = new QShortcut(QKeySequence::Close, this);
|
||||
connect(close, SIGNAL(activated()), SLOT(close()));
|
||||
|
||||
ResetFetchCoversButton();
|
||||
}
|
||||
|
||||
AlbumCoverManager::~AlbumCoverManager() {
|
||||
@ -232,12 +234,14 @@ void AlbumCoverManager::CancelRequests() {
|
||||
|
||||
cover_fetching_tasks_.clear();
|
||||
cover_fetcher_->Clear();
|
||||
ui_->fetch->setEnabled(true);
|
||||
progress_bar_->hide();
|
||||
statusBar()->clearMessage();
|
||||
ResetFetchCoversButton();
|
||||
}
|
||||
|
||||
void AlbumCoverManager::Reset() {
|
||||
ResetFetchCoversButton();
|
||||
|
||||
if (!backend_)
|
||||
return;
|
||||
|
||||
@ -253,6 +257,10 @@ void AlbumCoverManager::Reset() {
|
||||
}
|
||||
}
|
||||
|
||||
void AlbumCoverManager::ResetFetchCoversButton() {
|
||||
ui_->fetch->setEnabled(CoverProviders::instance().HasAnyProviders());
|
||||
}
|
||||
|
||||
void AlbumCoverManager::ArtistChanged(QListWidgetItem* current) {
|
||||
if (!backend_ || !cover_loader_->Worker())
|
||||
return;
|
||||
@ -392,8 +400,9 @@ void AlbumCoverManager::AlbumCoverFetched(quint64 id, const QImage &image) {
|
||||
SaveAndSetCover(item, image);
|
||||
}
|
||||
|
||||
if (cover_fetching_tasks_.isEmpty())
|
||||
ui_->fetch->setEnabled(true);
|
||||
if (cover_fetching_tasks_.isEmpty()) {
|
||||
ResetFetchCoversButton();
|
||||
}
|
||||
|
||||
UpdateStatusText();
|
||||
}
|
||||
|
@ -56,6 +56,8 @@ class AlbumCoverManager : public QMainWindow {
|
||||
void Reset();
|
||||
void Init();
|
||||
|
||||
void ResetFetchCoversButton();
|
||||
|
||||
SongList GetSongsInAlbum(const QModelIndex& index) const;
|
||||
SongList GetSongsInAlbums(const QModelIndexList& indexes) const;
|
||||
SongMimeData* GetMimeDataForAlbums(const QModelIndexList& indexes) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user