Replaced the heart icon with a star for local files

This commit is contained in:
dmdmdm 2020-08-05 12:46:07 -04:00 committed by John Maguire
parent 16843da416
commit c60c523185
2 changed files with 18 additions and 4 deletions

View File

@ -172,6 +172,8 @@
<file>icons/32x32/phone-palm-pre.png</file>
<file>icons/32x32/phone.png</file>
<file>icons/32x32/qtlogo.png</file>
<file>icons/32x32/rate-disabled.png</file>
<file>icons/32x32/rate-enabled.png</file>
<file>icons/32x32/search.png</file>
<file>icons/32x32/tools-wizard.png</file>
<file>icons/32x32/view-choose.png</file>

View File

@ -1163,17 +1163,29 @@ void MainWindow::MediaPlaying() {
IconLoader::Load("media-playback-pause", IconLoader::Base));
ui_->action_play_pause->setText(tr("Pause"));
bool enable_play_pause = !(app_->player()->GetCurrentItem()->options() &
PlaylistItem::PauseDisabled);
const PlaylistItemPtr item = app_->player()->GetCurrentItem();
bool enable_play_pause = !(item->options() & PlaylistItem::PauseDisabled);
ui_->action_play_pause->setEnabled(enable_play_pause);
bool can_seek = !(app_->player()->GetCurrentItem()->options() &
PlaylistItem::SeekDisabled);
bool can_seek = !(item->options() & PlaylistItem::SeekDisabled);
ui_->track_slider->SetCanSeek(can_seek);
// We now always enable Love when playing since it works for local files
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));
}
}
#ifdef HAVE_LIBLASTFM
bool enable_love = app_->scrobbler()->IsScrobblingEnabled();
if (tray_icon_) {