diff --git a/src/osd/osdbase.cpp b/src/osd/osdbase.cpp index d716d7dad..0ac188acc 100644 --- a/src/osd/osdbase.cpp +++ b/src/osd/osdbase.cpp @@ -146,11 +146,14 @@ void OSDBase::ShowPlaying(const Song &song, const QUrl &cover_url, const QImage message_parts << tr("track %1").arg(song.track()); } + summary = summary.remove('&').simplified(); + QString message = message_parts.join(", ").remove('&').simplified(); + if (show_art_) { - ShowMessage(summary, message_parts.join(", "), "notification-audio-play", image); + ShowMessage(summary, message, "notification-audio-play", image); } else { - ShowMessage(summary, message_parts.join(", "), "notification-audio-play", QImage()); + ShowMessage(summary, message, "notification-audio-play", QImage()); } // Reload the saved settings if they were changed for preview @@ -179,6 +182,7 @@ void OSDBase::Paused() { summary.prepend(last_song_.artist()); } } + summary = summary.remove('&').simplified(); if (show_art_) { ShowMessage(summary, tr("Paused"), QString(), last_image_); } @@ -222,6 +226,8 @@ void OSDBase::Stopped() { } } + summary = summary.remove('&').simplified(); + if (show_art_) { ShowMessage(summary, tr("Stopped"), QString(), last_image_); } diff --git a/src/osd/osdbase.h b/src/osd/osdbase.h index c1cb57e89..64422e39b 100644 --- a/src/osd/osdbase.h +++ b/src/osd/osdbase.h @@ -63,6 +63,8 @@ class OSDBase : public QObject { virtual bool SupportsNativeNotifications(); virtual bool SupportsTrayPopups(); + QString app_name() { return app_name_; } + public slots: void ReloadSettings(); diff --git a/src/osd/osddbus.cpp b/src/osd/osddbus.cpp index 36d0f01d9..c413d6a06 100644 --- a/src/osd/osddbus.cpp +++ b/src/osd/osddbus.cpp @@ -146,7 +146,7 @@ void OSDDBus::ShowMessageNative(const QString &summary, const QString &message, id = notification_id_; } - QDBusPendingReply reply = interface_->Notify(QCoreApplication::applicationName(), id, icon, summary, message, QStringList(), hints, timeout_msec()); + QDBusPendingReply reply = interface_->Notify(app_name(), id, icon, summary, message, QStringList(), hints, timeout_msec()); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this); connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(CallFinished(QDBusPendingCallWatcher*)));