diff --git a/cockatrice/src/dlg_settings.cpp b/cockatrice/src/dlg_settings.cpp index 5a397d5d..85b0f8a5 100644 --- a/cockatrice/src/dlg_settings.cpp +++ b/cockatrice/src/dlg_settings.cpp @@ -411,7 +411,7 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage() notificationsEnabledCheckBox.setChecked(SettingsCache::instance().getNotificationsEnabled()); connect(¬ificationsEnabledCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(), SLOT(setNotificationsEnabled(int))); - connect(¬ificationsEnabledCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setSpecNotificationEnabled(int))); + connect(¬ificationsEnabledCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setNotificationEnabled(int))); specNotificationsEnabledCheckBox.setChecked(SettingsCache::instance().getSpectatorNotificationsEnabled()); specNotificationsEnabledCheckBox.setEnabled(SettingsCache::instance().getNotificationsEnabled()); @@ -473,9 +473,14 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage() setLayout(mainLayout); } -void UserInterfaceSettingsPage::setSpecNotificationEnabled(int i) +void UserInterfaceSettingsPage::setNotificationEnabled(int i) { specNotificationsEnabledCheckBox.setEnabled(i != 0); + buddyConnectNotificationsEnabledCheckBox.setEnabled(i != 0); + if (i == 0) { + specNotificationsEnabledCheckBox.setChecked(false); + buddyConnectNotificationsEnabledCheckBox.setChecked(false); + } } void UserInterfaceSettingsPage::retranslateUi() diff --git a/cockatrice/src/dlg_settings.h b/cockatrice/src/dlg_settings.h index d742b383..c23a2969 100644 --- a/cockatrice/src/dlg_settings.h +++ b/cockatrice/src/dlg_settings.h @@ -108,7 +108,7 @@ class UserInterfaceSettingsPage : public AbstractSettingsPage { Q_OBJECT private slots: - void setSpecNotificationEnabled(int); + void setNotificationEnabled(int); private: QCheckBox notificationsEnabledCheckBox;