diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index 6a5164a265382..fc26ea8d8ae12 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -143,6 +143,10 @@ GeneralSettings::GeneralSettings(QWidget *parent) this, &GeneralSettings::slotToggleOptionalServerNotifications); _ui->serverNotificationsCheckBox->setToolTip(tr("Server notifications that require attention.")); + connect(_ui->chatNotificationsCheckBox, &QAbstractButton::toggled, + this, &GeneralSettings::slotToggleChatNotifications); + _ui->chatNotificationsCheckBox->setToolTip(tr("Show chat notification dialogs.")); + connect(_ui->callNotificationsCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::slotToggleCallNotifications); _ui->callNotificationsCheckBox->setToolTip(tr("Show call notification dialogs.")); @@ -248,7 +252,9 @@ void GeneralSettings::loadMiscSettings() ConfigFile cfgFile; _ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons()); _ui->serverNotificationsCheckBox->setChecked(cfgFile.optionalServerNotifications()); - _ui->callNotificationsCheckBox->setEnabled(_ui->serverNotificationsCheckBox->isEnabled()); + _ui->chatNotificationsCheckBox->setEnabled(cfgFile.optionalServerNotifications()); + _ui->chatNotificationsCheckBox->setChecked(cfgFile.showChatNotifications()); + _ui->callNotificationsCheckBox->setEnabled(cfgFile.optionalServerNotifications()); _ui->callNotificationsCheckBox->setChecked(cfgFile.showCallNotifications()); _ui->showInExplorerNavigationPaneCheckBox->setChecked(cfgFile.showInExplorerNavigationPane()); _ui->crashreporterCheckBox->setChecked(cfgFile.crashReporter()); @@ -440,9 +446,16 @@ void GeneralSettings::slotToggleOptionalServerNotifications(bool enable) { ConfigFile cfgFile; cfgFile.setOptionalServerNotifications(enable); + _ui->chatNotificationsCheckBox->setEnabled(enable); _ui->callNotificationsCheckBox->setEnabled(enable); } +void GeneralSettings::slotToggleChatNotifications(bool enable) +{ + ConfigFile cfgFile; + cfgFile.setShowChatNotifications(enable); +} + void GeneralSettings::slotToggleCallNotifications(bool enable) { ConfigFile cfgFile; diff --git a/src/gui/generalsettings.h b/src/gui/generalsettings.h index 94688c078b860..da701fad95b99 100644 --- a/src/gui/generalsettings.h +++ b/src/gui/generalsettings.h @@ -48,6 +48,7 @@ private slots: void saveMiscSettings(); void slotToggleLaunchOnStartup(bool); void slotToggleOptionalServerNotifications(bool); + void slotToggleChatNotifications(bool); void slotToggleCallNotifications(bool); void slotShowInExplorerNavigationPane(bool); void slotIgnoreFilesEditor();