Fix notification for non-dbus builds

This commit is contained in:
craig.p.drummond
2014-03-06 20:08:00 +00:00
committed by craig.p.drummond
parent e03c3cf685
commit a9e887e1f7
2 changed files with 3 additions and 2 deletions

View File

@@ -36,6 +36,7 @@
reserve space for -MM:SS at each side of position slider. If song duration
is longer than 1hr, then this is increased to -H:MM:SS
22. Show number of tracks under playqueue, even if total time is 0.
23. Enable song notifications n Linux builds without QtDBus.
1.3.2
-----

View File

@@ -212,9 +212,9 @@ void TrayItem::songChanged(const Song &song, bool isPlaying)
if (CurrentCover::self()->isValid() && !CurrentCover::self()->image().isNull()) {
trayItem->setToolTipIconByPixmap(QPixmap::fromImage(CurrentCover::self()->image()));
}
#elif defined Q_OS_WIN
#elif defined Q_OS_WIN || !defined QT_QTDBUS_FOUND
trayItem->setToolTip(i18n("Cantata")+"\n\n"+text);
// The pure Qt implementation needs both, the tray icon and the setting checked.
// The pure Qt implementation needs both the tray icon and the setting checked.
if (Settings::self()->showPopups() && isPlaying) {
trayItem->showMessage(i18n("Cantata"), text, QSystemTrayIcon::Information, 5000);
}