implement temporary status bar messages

This commit is contained in:
Martin Rotter 2021-11-01 14:41:02 +01:00
parent 00dee012f1
commit c9ca548ebb

View File

@ -496,14 +496,15 @@ void Application::showGuiMessage(Notification::Event event,
const GuiAction& action, const GuiAction& action,
QWidget* parent) { QWidget* parent) {
if (SystemTrayIcon::areNotificationsEnabled() && dest.m_tray) { if (SystemTrayIcon::areNotificationsEnabled()) {
auto notification = m_notifications->notificationForEvent(event); auto notification = m_notifications->notificationForEvent(event);
notification.playSound(this); notification.playSound(this);
if (SystemTrayIcon::isSystemTrayDesired() && if (SystemTrayIcon::isSystemTrayDesired() &&
SystemTrayIcon::isSystemTrayAreaAvailable() && SystemTrayIcon::isSystemTrayAreaAvailable() &&
notification.balloonEnabled()) { notification.balloonEnabled() &&
dest.m_tray) {
trayIcon()->showMessage(msg.m_title, msg.m_message, msg.m_type, TRAY_ICON_BUBBLE_TIMEOUT, std::move(action.m_action)); trayIcon()->showMessage(msg.m_title, msg.m_message, msg.m_type, TRAY_ICON_BUBBLE_TIMEOUT, std::move(action.m_action));
return; return;
} }