Fixed two little issue with OSD toggling and new lines
This commit is contained in:
parent
527171fadb
commit
0a5c8e3995
|
@ -1679,9 +1679,11 @@ void MainWindow::CommandlineOptionsReceived(const CommandlineOptions &options) {
|
|||
}
|
||||
|
||||
void MainWindow::ForceShowOSD(const Song &song, const bool toggle) {
|
||||
if (toggle)
|
||||
if (toggle) {
|
||||
osd_->SetPrettyOSDToggleMode(toggle);
|
||||
osd_->ForceShowNextNotification();
|
||||
} else {
|
||||
osd_->ForceShowNextNotification();
|
||||
}
|
||||
osd_->SongChanged(song);
|
||||
}
|
||||
|
||||
|
|
|
@ -350,9 +350,12 @@ QString OSD::ReplaceVariable(const QString& variable, const Song& song) {
|
|||
#endif
|
||||
#ifdef Q_OS_WIN32
|
||||
// Other OS don't support native notifications
|
||||
qLog(Debug) << "New line not supported by this notification type";
|
||||
qLog(Debug) << "New line not supported by this notification type under Windows";
|
||||
return "";
|
||||
#endif
|
||||
case TrayPopup:
|
||||
qLog(Debug) << "New line not supported by this notification type";
|
||||
return "";
|
||||
case Pretty:
|
||||
default:
|
||||
// When notifications are disabled, we force the PrettyOSD
|
||||
|
|
|
@ -256,6 +256,8 @@ void OSDPretty::ShowMessage(const QString& summary, const QString& message,
|
|||
timeout_->start(); // Restart the timer
|
||||
}
|
||||
} else {
|
||||
if (toggle_mode())
|
||||
set_toggle_mode(false);
|
||||
// The OSD is not visible, show it
|
||||
show();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue