Fixed two little issue with OSD toggling and new lines

This commit is contained in:
Andrea Decorte 2011-06-05 13:34:12 +00:00
parent 527171fadb
commit 0a5c8e3995
3 changed files with 10 additions and 3 deletions

View File

@ -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);
}

View File

@ -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

View File

@ -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();
}