Unverified Commit 66d24f08 authored by ebbit1q's avatar ebbit1q Committed by GitHub
Browse files

properly enable notification checkboxes (#4356)

parent 19a7c409
......@@ -411,7 +411,7 @@ UserInterfaceSettingsPage::UserInterfaceSettingsPage()
notificationsEnabledCheckBox.setChecked(SettingsCache::instance().getNotificationsEnabled());
connect(&notificationsEnabledCheckBox, SIGNAL(stateChanged(int)), &SettingsCache::instance(),
SLOT(setNotificationsEnabled(int)));
connect(&notificationsEnabledCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setSpecNotificationEnabled(int)));
connect(&notificationsEnabledCheckBox, 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()
......
......@@ -108,7 +108,7 @@ class UserInterfaceSettingsPage : public AbstractSettingsPage
{
Q_OBJECT
private slots:
void setSpecNotificationEnabled(int);
void setNotificationEnabled(int);
private:
QCheckBox notificationsEnabledCheckBox;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment