Ref T491, style/minor tweaks

This commit is contained in:
Klaus Basan
2018-12-30 04:12:56 +01:00
committed by Mat Sutcliffe
parent e810dfecf5
commit 03ac54cefa
3 changed files with 3 additions and 2 deletions

View File

@@ -430,7 +430,7 @@ namespace BlackGui
textEdit->insertTextMessage(textMessage);
// sound
if (!m_usedAsOverlayWidget && sGui && sGui->getIContextAudio())
if (!m_usedAsOverlayWidget && sGui && !sGui->isShuttingDown() && sGui->getIContextAudio())
{
sGui->getIContextAudio()->playNotification(CNotificationSounds::NotificationTextMessagePrivate, true);
}

View File

@@ -106,7 +106,7 @@ namespace BlackGui
QScopedPointer<Ui::CTextMessageComponent> ui;
BlackMisc::CIdentifier m_identifier { "TextMessageComponent", this };
BlackMisc::CSetting<Settings::TextMessageSettings> m_messageSettings { this, &CTextMessageComponent::onSettingsChanged };
bool m_usedAsOverlayWidget = false; //!< disables dockwidget parts
bool m_usedAsOverlayWidget = false; //!< disables dockwidget parts if used as overlay widget
//! Enum to widget
QWidget *getTabWidget(TextMessageTab tab) const;

View File

@@ -447,6 +447,7 @@ void SwiftGuiStd::playNotifcationSound(CNotificationSounds::Notification notific
{
if (!m_contextAudioAvailable) { return; }
if (!ui->comp_MainInfoArea->getSettingsComponent()->playNotificationSounds()) { return; }
if (!sGui || sGui->isShuttingDown()) { return; }
sGui->getIContextAudio()->playNotification(notification, true);
}