Skip to content

Commit

Permalink
Replaced the heart icon with a star for local files
Browse files Browse the repository at this point in the history
  • Loading branch information
dmdmdm authored and hatstand committed Aug 25, 2020
1 parent 183a3f9 commit 44af6f9
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/ui/mainwindow.cpp
Expand Up @@ -1164,6 +1164,10 @@ void MainWindow::MediaPlaying() {
ui_->action_play_pause->setText(tr("Pause"));

const PlaylistItemPtr item = app_->player()->GetCurrentItem();
if (!item) {
qLog(Debug) << "MediaPlaying: no current item -- not enabling buttons etc";
return;
}

bool enable_play_pause = !(item->options() & PlaylistItem::PauseDisabled);
ui_->action_play_pause->setEnabled(enable_play_pause);
Expand All @@ -1175,15 +1179,12 @@ void MainWindow::MediaPlaying() {
ui_->action_love->setEnabled(true);

// Set the rate/love icon
if (item) {
if (item->IsLocalLibraryItem()) {
ui_->action_love->setIcon(IconLoader::Load("rate-enabled",
IconLoader::Base));
}
else {
ui_->action_love->setIcon(IconLoader::Load("love",
IconLoader::Lastfm));
}
if (item->IsLocalLibraryItem()) {
ui_->action_love->setIcon(IconLoader::Load("rate-enabled",
IconLoader::Base));
}
else {
ui_->action_love->setIcon(IconLoader::Load("love", IconLoader::Lastfm));
}

#ifdef HAVE_LIBLASTFM
Expand Down

0 comments on commit 44af6f9

Please sign in to comment.