Flash taskbar if new important message arrives

This commit is contained in:
Lars Toenning
2020-07-26 14:13:32 +02:00
parent f987b81e6d
commit 71c980446d

View File

@@ -32,6 +32,7 @@
#include "blackmisc/sequence.h"
#include "blackmisc/verify.h"
#include <QApplication>
#include <QLayout>
#include <QLineEdit>
#include <QPushButton>
@@ -243,6 +244,8 @@ namespace BlackGui
if (relevantForMe && audioCsMentioned && ownAircraft.hasCallsign() && message.mentionsCallsign(ownAircraft.getCallsign()))
{
sGui->getCContextAudioBase()->playNotification(CNotificationSounds::NotificationTextCallsignMentioned, false);
// Flash taskbar icon
QApplication::alert(QWidget::topLevelWidget());
}
}
else if (message.isPrivateMessage())
@@ -250,6 +253,8 @@ namespace BlackGui
// private message
this->addPrivateChannelTextMessage(message);
relevantForMe = true;
// Flash taskbar icon
QApplication::alert(QWidget::topLevelWidget());
}
else
{