mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 16:44:48 -07:00
properly enable notification checkboxes (#4356)
This commit is contained in:
parent
19a7c4092c
commit
66d24f086e
2 changed files with 8 additions and 3 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue